diff options
author | Joel Sherrill <joel@rtems.org> | 2022-09-02 12:42:08 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2022-09-06 17:09:11 -0500 |
commit | dbba94304472ebd9d2965741cf75b501a84fb60e (patch) | |
tree | 0c19c73298e0c630b50ea04db4c61330b4db0588 /testsuites | |
parent | bsp/riscv: Add NOEL-V BSP (diff) | |
download | rtems-dbba94304472ebd9d2965741cf75b501a84fb60e.tar.bz2 |
pthread_atfork(): Change to behavior from FACE Technical Standard
Closes #4713.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/psxtests/psxenosys/init.c | 10 | ||||
-rw-r--r-- | testsuites/psxtests/psxenosys/psxenosys.scn | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/testsuites/psxtests/psxenosys/init.c b/testsuites/psxtests/psxenosys/init.c index 40f83aa0f0..d9a4d835f7 100644 --- a/testsuites/psxtests/psxenosys/init.c +++ b/testsuites/psxtests/psxenosys/init.c @@ -104,9 +104,15 @@ void *POSIX_Init( sc = fork(); check_enosys( sc ); - puts( "pthread_atfork -- ENOSYS" ); + /* + * The behavior of pthread_atfork() in single process environments was + * undefined by POSIX but the fACE Technical Standard required returning + * 0. Before ticket #4713, this did return ENOSYS. Just leaving this test + * case here for convenience. + */ + puts( "pthread_atfork -- 0" ); sc = pthread_atfork( NULL, NULL, NULL ); - check_enosys( sc ); + rtems_test_assert( !sc ); puts( "pthread_getcpuclockid -- ENOSYS" ); sc = pthread_getcpuclockid( 0, NULL ); diff --git a/testsuites/psxtests/psxenosys/psxenosys.scn b/testsuites/psxtests/psxenosys/psxenosys.scn index 1ed64f92e9..9e88acd05a 100644 --- a/testsuites/psxtests/psxenosys/psxenosys.scn +++ b/testsuites/psxtests/psxenosys/psxenosys.scn @@ -9,7 +9,7 @@ execv -- ENOSYS execve -- ENOSYS execvp -- ENOSYS fork -- ENOSYS -pthread_atfork -- ENOSYS +pthread_atfork -- 0 pthread_getcpuclockid -- ENOSYS sched_setparam -- ENOSYS sched_getparam -- ENOSYS |