Commit d650d76d authored by Daniel Leung's avatar Daniel Leung Committed by Anas Nashif
Browse files

tests: mem_protect/mem_protect: join thread at end of test...



...test_inherit_resource_pool. This waits for the newly created
threads to finish before moving on to the next test. This fixes
an issue on qemu_x86_tiny where there would be a double fault
after all tests have run.

Signed-off-by: default avatarDaniel Leung <daniel.leung@intel.com>
parent 11a2107d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -150,6 +150,8 @@ void parent_handler(void *p1, void *p2, void *p3)
			child_handler,
			NULL, NULL, NULL,
			PRIORITY, 0, K_NO_WAIT);

	k_thread_join(&child_thr, K_FOREVER);
}

/**
@@ -183,6 +185,8 @@ ZTEST(mem_protect, test_inherit_resource_pool)
	zassert_true(parent_heap_mem_ptr == child_heap_mem_ptr,
		     "Resource pool of the parent thread not inherited,"
		     " by child thread");

	k_thread_join(&parent_thr, K_FOREVER);
}

void mem_protect_inhert_setup(void)