[PATCH 2/3] tests: add strace-V.test
Fei Jie
feij.fnst at cn.fujitsu.com
Thu May 5 07:19:50 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 41f03fb..25afb99 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -600,6 +600,7 @@ MISC_TESTS = \
redirect.test \
restart_syscall.test \
strace-T.test \
+ strace-V.test \
strace-f.test \
strace-ff.test \
strace-r.test \
diff --git a/tests/strace-V.test b/tests/strace-V.test
new file mode 100755
index 0000000..63a91a1
--- /dev/null
+++ b/tests/strace-V.test
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Check -V option.
+
+. "${srcdir=.}/init.sh"
+
+run_strace -V > "$LOG"
+
+PACKAGE=`grep '\<PACKAGE_NAME\>' ../config.h | awk '{print $3}' | sed 's/\"//g'`
+VERSION=`grep '\<VERSION\>' ../config.h | awk '{print $3}' | sed 's/\"//g'`
+
+echo "$PACKAGE" -- version "$VERSION" > "$OUT"
+
+match_diff "$LOG" "$OUT"
+rm -f "$OUT"
--
1.8.3.1
More information about the Strace-devel
mailing list