tests: kernel: userspace: fix test for non-secure builds

This commit fixes a test in kernel/mem_protect/userspace,
which was attempting to read from an address that was not
necessarily within the image memory range, causing faults
in ARM TrustZone-enabled builds.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2019-02-22 13:56:58 +01:00 committed by Kumar Gala
parent 1d43377db9
commit 67aee1f1f6
1 changed files with 1 additions and 1 deletions

View File

@ -271,7 +271,7 @@ static void write_kerntext(void)
expect_fault = true;
expected_reason = REASON_HW_EXCEPTION;
BARRIER();
memcpy(&_is_thread_essential, 0, 4);
memset(&_is_thread_essential, 0, 4);
zassert_unreachable("Write to kernel text did not fault");
}