Skip to content

Commit 8207801

Browse files
Andrew Boieandrewboie
authored andcommitted
tests: userspace: remove unused partition
No data was ever being put in part2. Signed-off-by: Andrew Boie <[email protected]>
1 parent 823d860 commit 8207801

File tree

1 file changed

+4
-5
lines changed
  • tests/kernel/mem_protect/userspace/src

1 file changed

+4
-5
lines changed

tests/kernel/mem_protect/userspace/src/main.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ K_SEM_DEFINE(expect_fault_sem, 0, 1);
3535

3636
/*
3737
* Create partitions. part0 is for all variables to run
38-
* ztest and this test suite. part1 and part2 are for
38+
* ztest and this test suite. part1 is for
3939
* subsequent test specifically for this new implementation.
4040
*/
41-
FOR_EACH(K_APPMEM_PARTITION_DEFINE, part0, part1, part2);
41+
FOR_EACH(K_APPMEM_PARTITION_DEFINE, part0, part1);
4242

4343
/*
4444
* Create memory domains. dom0 is for the ztest and this
@@ -650,14 +650,13 @@ static void shared_mem_thread(void)
650650
*/
651651
static void access_other_memdomain(void)
652652
{
653-
struct k_mem_partition *parts[] = {&part0, &part2};
653+
struct k_mem_partition *parts[] = {&part0};
654654
/*
655655
* Following tests the ability for a thread to access data
656656
* in a domain that it is denied.
657657
*/
658658

659-
/* initialize domain dom1 with partition part2 */
660-
k_mem_domain_init(&dom1, 2, parts);
659+
k_mem_domain_init(&dom1, ARRAY_SIZE(parts), parts);
661660

662661
/* remove current thread from domain dom0 and add to dom1 */
663662
k_mem_domain_remove_thread(k_current_get());

0 commit comments

Comments
 (0)