Browse Source
Update the new API to use K_USER as the flags for both CONFIG_USERSPACE and CONFIG_TEST_USERSPACE. Also, fix the linker script to properly include the suites, tests, and rules. Fixes #44108 Signed-off-by: Yuval Peress <peress@google.com>pull/45987/head
23 changed files with 181 additions and 120 deletions
@ -1,15 +1,17 @@ |
|||||||
/* SPDX-License-Identifier: Apache-2.0 */ |
/* SPDX-License-Identifier: Apache-2.0 */ |
||||||
|
|
||||||
#include "common-rom/common-rom-kernel-devices.ld" |
#include <zephyr/linker/common-rom/common-rom-kernel-devices.ld> |
||||||
|
|
||||||
#include "common-rom/common-rom-cpp.ld" |
#include <zephyr/linker/common-rom/common-rom-ztest.ld> |
||||||
|
|
||||||
#include "common-rom/common-rom-net.ld" |
#include <zephyr/linker/common-rom/common-rom-cpp.ld> |
||||||
|
|
||||||
#include "common-rom/common-rom-bt.ld" |
#include <zephyr/linker/common-rom/common-rom-net.ld> |
||||||
|
|
||||||
#include "common-rom/common-rom-logging.ld" |
#include <zephyr/linker/common-rom/common-rom-bt.ld> |
||||||
|
|
||||||
#include "common-rom/common-rom-debug.ld" |
#include <zephyr/linker/common-rom/common-rom-logging.ld> |
||||||
|
|
||||||
#include "common-rom/common-rom-misc.ld" |
#include <zephyr/linker/common-rom/common-rom-debug.ld> |
||||||
|
|
||||||
|
#include <zephyr/linker/common-rom/common-rom-misc.ld> |
||||||
|
@ -0,0 +1,14 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2022 Google Inc |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: Apache-2.0 |
||||||
|
*/ |
||||||
|
|
||||||
|
SECTION_PROLOGUE(ztest,,) |
||||||
|
{ |
||||||
|
Z_LINK_ITERABLE(ztest_suite_node); |
||||||
|
|
||||||
|
Z_LINK_ITERABLE(ztest_unit_test); |
||||||
|
|
||||||
|
Z_LINK_ITERABLE(ztest_test_rule); |
||||||
|
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION) |
@ -0,0 +1,28 @@ |
|||||||
|
/* |
||||||
|
* Copyright 2022 Google LLC |
||||||
|
* |
||||||
|
* SPDX-License-Identifier: Apache-2.0 |
||||||
|
*/ |
||||||
|
|
||||||
|
SECTIONS |
||||||
|
{ |
||||||
|
.data.ztest_suite_node_area : ALIGN(4) |
||||||
|
{ |
||||||
|
_ztest_suite_node_list_start = .; |
||||||
|
KEEP(*(SORT_BY_NAME(._ztest_suite_node.static.*))) |
||||||
|
_ztest_suite_node_list_end = .; |
||||||
|
} |
||||||
|
.data.ztest_unit_test_area : ALIGN(4) |
||||||
|
{ |
||||||
|
_ztest_unit_test_list_start = .; |
||||||
|
KEEP(*(SORT_BY_NAME(._ztest_unit_test.static.*))) |
||||||
|
_ztest_unit_test_list_end = .; |
||||||
|
} |
||||||
|
.data.ztest_test_rule_area : ALIGN(4) |
||||||
|
{ |
||||||
|
_ztest_test_rule_list_start = .; |
||||||
|
KEEP(*(SORT_BY_NAME(._ztest_test_rule.static.*))) |
||||||
|
_ztest_test_rule_list_end = .; |
||||||
|
} |
||||||
|
} |
||||||
|
INSERT AFTER .data; |
Loading…
Reference in new issue