[PATCH v2 1/2] tests: add strace-V.test
Fei Jie
feij.fnst at cn.fujitsu.com
Mon May 9 06:19:55 UTC 2016
* tests/strace-V.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
---
tests/Makefile.am | 1 +
tests/strace-V.test | 15 +++++++++++++++
2 files changed, 16 insertions(+)
create mode 100755 tests/strace-V.test
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c09701d..aea3fa2 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -604,6 +604,7 @@ MISC_TESTS = \
redirect.test \
restart_syscall.test \
strace-T.test \
+ strace-V.test \
strace-f.test \
strace-r.test \
strace-t.test \
diff --git a/tests/strace-V.test b/tests/strace-V.test
new file mode 100755
index 0000000..c474f88
--- /dev/null
+++ b/tests/strace-V.test
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Check -V option.
+
+. "${srcdir=.}/init.sh"
+
+run_strace -V > "$LOG"
+
+PACKAGE_NAME="$(sed -n 's/#define[[:space:]]*PACKAGE_NAME[[:space:]]*"\([^"]*\)".*/\1/p' ../config.h)"
+VERSION="$(sed -n 's/#define[[:space:]]*VERSION[[:space:]]*"\([^"]*\)".*/\1/p' ../config.h)"
+
+printf "%s -- version %s\n" "$PACKAGE_NAME" "$VERSION" > "$OUT"
+
+match_diff "$LOG" "$OUT"
+rm -f "$OUT"
--
1.8.3.1
More information about the Strace-devel
mailing list