* tests/getpgrp.c: New file.
* tests/getpgrp.test: New test.
* tests/.gitignore: Add getpgrp.
* tests/Makefile.am (check_PROGRAMS): Likewise.
(DECODER_TESTS): Add getpgrp.test.
---
 tests/.gitignore   |  1 +
 tests/Makefile.am  |  2 ++
 tests/getpgrp.c    | 22 ++++++++++++++++++++++
 tests/getpgrp.test |  6 ++++++
 4 files changed, 31 insertions(+)
 create mode 100644 tests/getpgrp.c
 create mode 100755 tests/getpgrp.test

diff --git a/tests/.gitignore b/tests/.gitignore
index 5bb24a5..e0f1524 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -69,6 +69,7 @@ getgid
 getgid32
 getgroups
 getgroups32
+getpgrp
 getrandom
 getresgid
 getresgid32
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ceea3ae..858f0c1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -121,6 +121,7 @@ check_PROGRAMS = \
        getgid32 \
        getgroups \
        getgroups32 \
+       getpgrp \
        getrandom \
        getresgid \
        getresgid32 \
@@ -369,6 +370,7 @@ DECODER_TESTS = \
        getgid32.test \
        getgroups.test \
        getgroups32.test \
+       getpgrp.test \
        getrandom.test \
        getresgid.test \
        getresgid32.test \
diff --git a/tests/getpgrp.c b/tests/getpgrp.c
new file mode 100644
index 0000000..fd3139b
--- /dev/null
+++ b/tests/getpgrp.c
@@ -0,0 +1,22 @@
+#include "tests.h"
+#include <sys/syscall.h>
+
+#ifdef __NR_getpgrp
+
+# include <stdio.h>
+# include <unistd.h>
+
+int
+main(void)
+{
+       printf("getpgrp() = %ld\n", syscall(__NR_getpgrp));
+
+       puts("+++ exited with 0 +++");
+       return 0;
+}
+
+#else
+
+SKIP_MAIN_UNDEFINED("__NR_getpgrp")
+
+#endif
diff --git a/tests/getpgrp.test b/tests/getpgrp.test
new file mode 100755
index 0000000..260c9a0
--- /dev/null
+++ b/tests/getpgrp.test
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Check getpgrp syscall decoding.
+
+. "${srcdir=.}/init.sh"
+run_strace_match_diff -a10
-- 
1.8.3.1




------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to