tests: syscalls: exclude one case on nsim_sem

This works around an issue with this emulator's configuration where
there is no memory address that can be poked to generate a fault,
it is simulating memory for the entire address space.

Fixes: #22561

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2020-02-13 09:47:07 -08:00 committed by Andrew Boie
parent ecfd78776d
commit 2c9f42100c
1 changed files with 6 additions and 0 deletions

View File

@ -169,9 +169,15 @@ void test_string_nlen(void)
zassert_equal(err, 0, "user string faulted");
zassert_equal(ret, strlen(user_string), "incorrect length returned");
/* Skip this scenario for nsim_sem emulated board, unfortunately
* the emulator doesn't set up memory as specified in DTS and poking
* this address doesn't fault
*/
#if !(defined(CONFIG_BOARD_NSIM) && defined(CONFIG_SOC_NSIM_SEM))
/* Try to blow up the kernel */
ret = string_nlen((char *)0xFFFFFFF0, BUF_SIZE, &err);
zassert_equal(err, -1, "nonsense string address did not fault");
#endif
}
/**