summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-07-28 03:59:10 +0000
committerMike Frysinger <vapier@gentoo.org>2005-07-28 03:59:10 +0000
commit54985b61cddbac2f31e13de8fb5deb7c81ff0776 (patch)
tree82d888aeb2e642280ab01cc06361893981f6a41a /test
parent8ba79833fb4d29d14db437864747d20d4137cf3a (diff)
check the return value of the clone call too
Diffstat (limited to 'test')
-rw-r--r--test/unistd/errno.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unistd/errno.c b/test/unistd/errno.c
index 746c21d89..cb082b890 100644
--- a/test/unistd/errno.c
+++ b/test/unistd/errno.c
@@ -17,9 +17,9 @@ int main(void)
r_clone = clone(child_fn, NULL, (int) NULL, NULL);
ret_errno = errno;
- if (ret_errno != EINVAL) {
- fprintf(stderr, "clone: res=%d (%d) errno=%d %m\n",
- r_clone, (int) NULL, errno);
+ if (ret_errno != EINVAL || r_clone != -1) {
+ fprintf(stderr, "clone: res=%d (wanted -1) errno=%d (wanted %d)\n",
+ r_clone, errno, EINVAL);
return 1;
}