[PATCH v3] tests: add strace-E.test

Fei Jie feij.fnst at cn.fujitsu.com
Wed Jun 8 02:31:29 UTC 2016


* tests/strace-E.expected: New file.
* tests/strace-E.test: New test.
* tests/Makefile.am (MISC_TESTS): Add it.
(EXTRA_DIST): Add strace-E.expected.
---
 tests/Makefile.am       | 2 ++
 tests/strace-E.expected | 1 +
 tests/strace-E.test     | 9 +++++++++
 3 files changed, 12 insertions(+)
 create mode 100644 tests/strace-E.expected
 create mode 100755 tests/strace-E.test

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 69a5eb5..5eb6db5 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -651,6 +651,7 @@ MISC_TESTS = \
 	qual_syscall.test \
 	redirect.test \
 	restart_syscall.test \
+	strace-E.test \
 	strace-S.test \
 	strace-T.test \
 	strace-V.test \
@@ -703,6 +704,7 @@ EXTRA_DIST = init.sh run.sh match.awk \
 	     signalfd.expected \
 	     statfs.expected \
 	     statx.sh \
+		 strace-E.expected \
 	     strace-T.expected \
 	     strace-ff.expected \
 	     strace-k.test \
diff --git a/tests/strace-E.expected b/tests/strace-E.expected
new file mode 100644
index 0000000..d69e48c
--- /dev/null
+++ b/tests/strace-E.expected
@@ -0,0 +1 @@
+execve\("./sleep", \["./sleep", "0"\], \[.*"option_E_var=OPTION_E_VAL".*\]\) = 0
diff --git a/tests/strace-E.test b/tests/strace-E.test
new file mode 100755
index 0000000..440254d
--- /dev/null
+++ b/tests/strace-E.test
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Check -E option.
+
+. "${srcdir=.}/init.sh"
+
+run_prog ./sleep 0 > /dev/null
+run_strace -E option_E_var=OPTION_E_VAL -v $args
+match_grep "$LOG"
-- 
1.8.3.1







More information about the Strace-devel mailing list