summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxid01/init.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-05 21:32:48 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2010-07-05 21:32:48 +0000
commit95cf41e21e41ce3ee5a791128ee3f8d7f114a3a5 (patch)
tree124b642c61bc5b9e3a919f1fb1233e9fe26fcc28 /testsuites/psxtests/psxid01/init.c
parent2010-07-05 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-95cf41e21e41ce3ee5a791128ee3f8d7f114a3a5.tar.bz2
2010-07-05 Joel Sherrill <joel.sherrill@oarcorp.com>
* psxid01/init.c, psxid01/psxid01.doc, psxid01/psxid01.scn: Add test cases.
Diffstat (limited to 'testsuites/psxtests/psxid01/init.c')
-rw-r--r--testsuites/psxtests/psxid01/init.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxid01/init.c b/testsuites/psxtests/psxid01/init.c
index 3428929ff8..3c64aacb94 100644
--- a/testsuites/psxtests/psxid01/init.c
+++ b/testsuites/psxtests/psxid01/init.c
@@ -90,6 +90,33 @@ void test_pid(void)
sc = issetugid();
rtems_test_assert( sc == 0 );
+
+ puts( "getpgrp - return local node - OK" );
+ pid = getpgrp();
+ printf( "getpgrp returned %d\n", pid );
+
+ puts( "getgroups - return 0 - OK" );
+ sc = getgroups( 0, NULL );
+ rtems_test_assert( sc == 0 );
+
+}
+
+void test_getlogin(void)
+{
+ int sc;
+ char ch;
+
+ printf( "getlogin() -- %s\n", getlogin() );
+
+ puts( "getlogin_r(NULL, LOGIN_NAME_MAX) -- EFAULT" );
+ sc = getlogin_r( NULL, LOGIN_NAME_MAX );
+ rtems_test_assert( sc == EFAULT );
+
+ puts( "getlogin_r(buffer, 0) -- ERANGE" );
+ sc = getlogin_r( &ch, 0 );
+ rtems_test_assert( sc == ERANGE );
+
+
}
rtems_task Init(
@@ -107,6 +134,8 @@ rtems_task Init(
test_pid();
puts( "" );
+ test_getlogin();
+
puts( "*** END OF TEST ID 01 ***" );
rtems_test_exit(0);