]> granicus.if.org Git - strace/commitdiff
tests: tabulate trace_statfs.test
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 20 Apr 2017 00:43:49 +0000 (02:43 +0200)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 21 Apr 2017 19:49:03 +0000 (19:49 +0000)
Rewrite trace_statfs.test using test_trace_expr().

* tests/gen_tests.in (trace_statfs): New entry.
* tests/trace_statfs.in: New file, derived from a set of tests
in trace_statfs.test.
* tests/trace_statfs.test: Remove.
* tests/Makefile.am (DECODER_TESTS): Remove trace_statfs.test.
(EXTRA_DIST): Add trace_statfs.in.

tests/Makefile.am
tests/gen_tests.in
tests/trace_statfs.in [new file with mode: 0644]
tests/trace_statfs.test [deleted file]

index 9beb4fd65df5ed1e8092443e12bbb85cfa7b1635..ea078d84e5f4ad2f39db20480d409bfe2d2d014f 100644 (file)
@@ -223,7 +223,6 @@ DECODER_TESTS = \
        sigaction.test \
        sigaltstack.test \
        sun_path.test \
-       trace_statfs.test \
        uio.test \
        umount.test \
        umount2.test \
@@ -337,6 +336,7 @@ EXTRA_DIST = \
        strace.supp \
        struct_flock.c \
        sun_path.expected \
+       trace_statfs.in \
        uio.expected \
        umode_t.c \
        umovestr.expected \
index 1e55d09bde13ab8255795992f62af3373b2e4f9a..692178dbd7a0ad3f5636b024d7a67fdfe4556b8d 100644 (file)
@@ -301,6 +301,7 @@ timer_xettime       -e trace=timer_create,timer_settime,timer_gettime
 timerfd_xettime        -e trace=timerfd_create,timerfd_settime,timerfd_gettime
 times  -esignal=none
 times-fail     -a12 -e trace=times
+trace_statfs   test_trace_expr '' -e%statfs
 truncate
 truncate64
 ugetrlimit     -a28
diff --git a/tests/trace_statfs.in b/tests/trace_statfs.in
new file mode 100644 (file)
index 0000000..7c4adfe
--- /dev/null
@@ -0,0 +1,2 @@
+statfs -a17
+statfs64       -a23
diff --git a/tests/trace_statfs.test b/tests/trace_statfs.test
deleted file mode 100755 (executable)
index df213b9..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/sh
-#
-# Check -e trace=%statfs option.
-#
-# Copyright (c) 2017 The strace developers.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-# 3. The name of the author may not be used to endorse or promote products
-#    derived from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-. "${srcdir=.}/init.sh"
-
-while read w s; do {
-       try_run_prog "../$s" || continue
-       run_strace -a$w -e%statfs ../$s > "$EXP"
-       match_diff "$LOG" "$EXP"
-} < /dev/null; done << EOF
-17 statfs
-23 statfs64
-EOF
-
-grep -E -v '^(#|statfs)' \
-       < "$srcdir/pure_executables.list" > negative.list
-
-while read s; do {
-       try_run_prog "../$s" || continue
-       run_strace -qq -esignal=none -e%statfs ../$s > /dev/null
-       match_diff "$LOG" /dev/null
-} < /dev/null; done < negative.list