summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psx04
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-17 13:39:15 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-05-17 13:41:56 +0200
commit3c20d2810a4951a545ec2de1c21d9fdade18503a (patch)
treecc8e9e1dabaa2f221320c67d3f8a5c226a4b6efc /testsuites/psxtests/psx04
parentpsxtests/psxcancel: Add pthread_detach() tests (diff)
downloadrtems-3c20d2810a4951a545ec2de1c21d9fdade18503a.tar.bz2
posix: Fix return states of pthread_kill()
POSIX mandates that an error code is returned and not -1 plus errno. Close #2715.
Diffstat (limited to 'testsuites/psxtests/psx04')
-rw-r--r--testsuites/psxtests/psx04/init.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/testsuites/psxtests/psx04/init.c b/testsuites/psxtests/psx04/init.c
index 945da76a17..76c76af55b 100644
--- a/testsuites/psxtests/psx04/init.c
+++ b/testsuites/psxtests/psx04/init.c
@@ -548,15 +548,11 @@ void *POSIX_Init(
puts( "Init: pthread_sigmask - EINVAL (timout->nsec invalid to large)" );
status = pthread_kill( Init_id, 999 );
- if ( status != -1 )
- printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_kill - EINVAL (sig invalid)" );
status = pthread_kill( Init_id, 0 );
- if ( status != -1 )
- printf( "status = %d\n", status );
- rtems_test_assert( errno == EINVAL );
+ rtems_test_assert( status == EINVAL );
puts( "Init: pthread_kill - EINVAL (signal = 0)" );
act.sa_handler = SIG_IGN;