]> granicus.if.org Git - strace/commitdiff
tests: tabulate sched.test
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 21 Apr 2017 01:29:29 +0000 (01:29 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 21 Apr 2017 19:49:03 +0000 (19:49 +0000)
Rewrite sched.test using test_trace_expr().

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

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

index 67b381d686b71ca9b7a994748ca641c30053b6a2..ee708fd7e8fd7bc0837371dc55cdd48dc2726ed4 100644 (file)
@@ -215,7 +215,6 @@ DECODER_TESTS = \
        prctl-tsc.test \
        qual_fault-exit_group.test \
        readv.test \
-       sched.test \
        scm_rights-fd.test \
        seccomp-strict.test \
        sigaction.test \
@@ -319,6 +318,7 @@ EXTRA_DIST = \
        quotactl.h \
        regex.in \
        run.sh \
+       sched.in \
        scno_tampering.sh \
        setfsugid.c \
        setresugid.c \
index d3096ebc0bc3c052abe68d358513af3a916117ed..ddcb8f7d6433f93cc2ebd926d3e48a9cf6fd7e82 100644 (file)
@@ -239,6 +239,7 @@ rt_sigreturn        -esignal='!USR1'
 rt_sigsuspend  -a20 -esignal=none
 rt_sigtimedwait        -a38
 rt_tgsigqueueinfo      -esignal=none
+sched  test_trace_expr times -e/sched
 sched_get_priority_mxx -a33 -e trace=sched_get_priority_min,sched_get_priority_max
 sched_rr_get_interval  -a31
 sched_xetaffinity      -a28 -e trace=sched_getaffinity,sched_setaffinity
diff --git a/tests/sched.in b/tests/sched.in
new file mode 100755 (executable)
index 0000000..46031d6
--- /dev/null
@@ -0,0 +1,7 @@
+sched_xetaffinity      -a28
+sched_xetparam -a23
+sched_rr_get_interval  -a31
+sched_get_priority_mxx -a33
+sched_xetattr  -a29
+sched_xetscheduler     -a22
+sched_yield    -a14
diff --git a/tests/sched.test b/tests/sched.test
deleted file mode 100755 (executable)
index 4b14501..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-
-# Check how scheduler-related syscalls are traced.
-#
-# 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/sched ../$s > "$EXP"
-       match_diff "$LOG" "$EXP"
-} < /dev/null; done << EOF
-28 sched_xetaffinity
-23 sched_xetparam
-31 sched_rr_get_interval
-33 sched_get_priority_mxx
-29 sched_xetattr
-22 sched_xetscheduler
-14 sched_yield
-EOF
-
-grep -E -v '^(#|sched_|times$)' \
-       < "$srcdir/pure_executables.list" > negative.list
-
-while read s; do {
-       try_run_prog "../$s" || continue
-       run_strace -qq -esignal=none -e/sched ../$s > /dev/null
-       match_diff "$LOG" /dev/null
-} < /dev/null; done < negative.list