Skip to content

Commit 2f64e32

Browse files
committed
tests: posix: single_process: ensure sysconf test passes
Ensure that the sysconf test passes with CONFIG_POSIX_API=y CONFIG_POSIX_AEP_CHOICE_PSE51=y CONFIG_POSIX_SINGLE_PROCESS=y A posix feature that definitely has not been implemented yet in Zephyr needed to be chosen in order to ensure that the sysconf test would return an error predictably. Currently the _POSIX_THREAD_SPORADIC_SERVER feature fits that description. Signed-off-by: Chris Friedt <[email protected]>
1 parent ed52390 commit 2f64e32

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tests/posix/single_process/prj.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
CONFIG_ZTEST=y
2+
CONFIG_POSIX_API=y
3+
CONFIG_POSIX_AEP_CHOICE_PSE51=y
24
CONFIG_POSIX_SINGLE_PROCESS=y
35

46
# Let's explicitly choose PICOLIBC, so it is used if supported even if it would not have been the

tests/posix/single_process/src/sysconf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ZTEST(posix_single_process, test_posix_sysconf)
1818
zassert_equal(ret, _POSIX_VERSION, "sysconf returned unexpected value %d", ret);
1919

2020
/* SC that's not implemented */
21-
ret = sysconf(_SC_MEMLOCK_RANGE);
21+
ret = sysconf(_SC_THREAD_SPORADIC_SERVER);
2222
zassert_equal(ret, -1, "sysconf returned unexpected value %d", ret);
2323

2424
/* SC that value depends on target's configuration */

0 commit comments

Comments
 (0)