aboutsummaryrefslogtreecommitdiff
path: root/tests/unistd/misc.c
diff options
context:
space:
mode:
authorArlo Breault <arlolra@gmail.com>2013-04-09 17:53:10 -0700
committerArlo Breault <arlolra@gmail.com>2013-04-09 17:53:10 -0700
commit294bdda3b3cb7a4554074968f4fcd8beb60c1fc5 (patch)
tree399264e2b6d608b9e83f70ea9238a2f7904fbbd7 /tests/unistd/misc.c
parent8bd0457ad49d025489d6c46c0f266daec562dcb5 (diff)
implement setgroups
Diffstat (limited to 'tests/unistd/misc.c')
-rw-r--r--tests/unistd/misc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/unistd/misc.c b/tests/unistd/misc.c
index 4e7ac216..5b0d63d2 100644
--- a/tests/unistd/misc.c
+++ b/tests/unistd/misc.c
@@ -106,7 +106,7 @@ int main() {
printf("alarm: %d", alarm(42));
printf(", errno: %d\n", errno);
errno = 0;
- printf("ualarm: %d", ualarm(123, 456));
+ printf("ualarm: %ld", ualarm(123, 456));
printf(", errno: %d\n", errno);
errno = 0;
@@ -117,7 +117,7 @@ int main() {
printf(", errno: %d\n", errno);
errno = 0;
- printf("crypt: %d", crypt("foo", "bar"));
+ printf("crypt: %s", crypt("foo", "bar"));
printf(", errno: %d\n", errno);
errno = 0;
char encrypt_block[64] = {0};
@@ -192,5 +192,10 @@ int main() {
printf(", errno: %d\n", errno);
errno = 0;
+ gid_t groups2[1] = {0};
+ printf("setgroups: %d", setgroups(1, groups2));
+ printf(", errno: %d\n", errno);
+ errno = 0;
+
return 0;
}