Blame SOURCES/0023-tests-move-PTRACE_SEIZE-check-to-a-separate-file.patch

4d44fe
From ca7fc3695b061c48af1975d14a3e50a87329031a Mon Sep 17 00:00:00 2001
4d44fe
From: "Dmitry V. Levin" <ldv@altlinux.org>
4d44fe
Date: Wed, 6 Mar 2019 16:02:38 +0000
4d44fe
Subject: [PATCH 23/27] tests: move PTRACE_SEIZE check to a separate file
4d44fe
4d44fe
The check is going to be used by another test soon.
4d44fe
4d44fe
* tests/PTRACE_SEIZE.sh: New file.
4d44fe
* tests/detach-stopped.test: Use it.
4d44fe
* tests/Makefile.am (EXTRA_DIST): Add PTRACE_SEIZE.sh.
4d44fe
4d44fe
Conflicts:
4d44fe
	tests/Makefile.am
4d44fe
	tests/detach-stopped.test
4d44fe
4d44fe
Additional changes:
4d44fe
	tests-m32/PTRACE_SEIZE.sh (copy of tests/PTRACE_SEIZE.sh)
4d44fe
	tests-m32/detach-stopped.test (copy of tests/detach-stopped.test)
4d44fe
	tests-mx32/PTRACE_SEIZE.sh (copy of tests/PTRACE_SEIZE.sh)
4d44fe
	tests-mx32/detach-stopped.test (copy of tests/detach-stopped.test)
4d44fe
4d44fe
---
4d44fe
 tests/Makefile.am         |  1 +
4d44fe
 tests/PTRACE_SEIZE.sh     | 13 +++++++++++++
4d44fe
 tests/detach-stopped.test |  6 +-----
4d44fe
 3 files changed, 15 insertions(+), 5 deletions(-)
4d44fe
 create mode 100755 tests/PTRACE_SEIZE.sh
4d44fe
4d44fe
Index: strace-4.24/tests/Makefile.am
4d44fe
===================================================================
4d44fe
--- strace-4.24.orig/tests/Makefile.am	2019-03-10 05:40:37.969676713 +0100
4d44fe
+++ strace-4.24/tests/Makefile.am	2019-03-10 05:47:36.446486219 +0100
4d44fe
@@ -361,6 +361,7 @@
4d44fe
 EXTRA_DIST = \
4d44fe
 	COPYING \
4d44fe
 	GPL-2.0-or-later \
4d44fe
+	PTRACE_SEIZE.sh \
4d44fe
 	accept_compat.h \
4d44fe
 	attach-p-cmd.h \
4d44fe
 	caps-abbrev.awk \
4d44fe
Index: strace-4.24/tests/PTRACE_SEIZE.sh
4d44fe
===================================================================
4d44fe
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
4d44fe
+++ strace-4.24/tests/PTRACE_SEIZE.sh	2019-03-10 05:47:36.447486209 +0100
4d44fe
@@ -0,0 +1,13 @@
4d44fe
+#!/bin/sh
4d44fe
+#
4d44fe
+# Skip the test if PTRACE_SEIZE is not supported.
4d44fe
+#
4d44fe
+# Copyright (c) 2014-2019 The strace developers.
4d44fe
+# All rights reserved.
4d44fe
+#
4d44fe
+# SPDX-License-Identifier: GPL-2.0-or-later
4d44fe
+
4d44fe
+$STRACE -d -enone / > /dev/null 2> "$LOG" ||:
4d44fe
+if grep -x "[^:]*strace: PTRACE_SEIZE doesn't work" "$LOG" > /dev/null; then
4d44fe
+	skip_ "PTRACE_SEIZE doesn't work"
4d44fe
+fi
4d44fe
Index: strace-4.24/tests/detach-stopped.test
4d44fe
===================================================================
4d44fe
--- strace-4.24.orig/tests/detach-stopped.test	2019-03-10 05:34:50.982151335 +0100
4d44fe
+++ strace-4.24/tests/detach-stopped.test	2019-03-10 05:47:36.447486209 +0100
4d44fe
@@ -9,17 +9,13 @@
4d44fe
 # SPDX-License-Identifier: GPL-2.0-or-later
4d44fe
 
4d44fe
 . "${srcdir=.}/init.sh"
4d44fe
+. "${srcdir=.}/PTRACE_SEIZE.sh"
4d44fe
 
4d44fe
 run_prog_skip_if_failed \
4d44fe
 	kill -0 $$
4d44fe
 
4d44fe
 check_prog sleep
4d44fe
 
4d44fe
-$STRACE -d -enone / > /dev/null 2> "$LOG"
4d44fe
-if grep -x "[^:]*strace: PTRACE_SEIZE doesn't work" "$LOG" > /dev/null; then
4d44fe
-	skip_ "PTRACE_SEIZE doesn't work"
4d44fe
-fi
4d44fe
-
4d44fe
 set -e
4d44fe
 
4d44fe
 > "$LOG"
4d44fe
Index: strace-4.24/tests-m32/PTRACE_SEIZE.sh
4d44fe
===================================================================
4d44fe
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
4d44fe
+++ strace-4.24/tests-m32/PTRACE_SEIZE.sh	2019-03-10 05:48:20.038049708 +0100
4d44fe
@@ -0,0 +1,13 @@
4d44fe
+#!/bin/sh
4d44fe
+#
4d44fe
+# Skip the test if PTRACE_SEIZE is not supported.
4d44fe
+#
4d44fe
+# Copyright (c) 2014-2019 The strace developers.
4d44fe
+# All rights reserved.
4d44fe
+#
4d44fe
+# SPDX-License-Identifier: GPL-2.0-or-later
4d44fe
+
4d44fe
+$STRACE -d -enone / > /dev/null 2> "$LOG" ||:
4d44fe
+if grep -x "[^:]*strace: PTRACE_SEIZE doesn't work" "$LOG" > /dev/null; then
4d44fe
+	skip_ "PTRACE_SEIZE doesn't work"
4d44fe
+fi
4d44fe
Index: strace-4.24/tests-m32/detach-stopped.test
4d44fe
===================================================================
4d44fe
--- strace-4.24.orig/tests-m32/detach-stopped.test	2017-05-22 19:33:51.000000000 +0200
4d44fe
+++ strace-4.24/tests-m32/detach-stopped.test	2019-03-10 05:48:30.588944054 +0100
4d44fe
@@ -6,40 +6,16 @@
4d44fe
 # Copyright (c) 2014-2017 The strace developers.
4d44fe
 # All rights reserved.
4d44fe
 #
4d44fe
-# Redistribution and use in source and binary forms, with or without
4d44fe
-# modification, are permitted provided that the following conditions
4d44fe
-# are met:
4d44fe
-# 1. Redistributions of source code must retain the above copyright
4d44fe
-#    notice, this list of conditions and the following disclaimer.
4d44fe
-# 2. Redistributions in binary form must reproduce the above copyright
4d44fe
-#    notice, this list of conditions and the following disclaimer in the
4d44fe
-#    documentation and/or other materials provided with the distribution.
4d44fe
-# 3. The name of the author may not be used to endorse or promote products
4d44fe
-#    derived from this software without specific prior written permission.
4d44fe
-#
4d44fe
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
4d44fe
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
4d44fe
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
4d44fe
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
4d44fe
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4d44fe
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4d44fe
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4d44fe
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4d44fe
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4d44fe
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4d44fe
+# SPDX-License-Identifier: GPL-2.0-or-later
4d44fe
 
4d44fe
 . "${srcdir=.}/init.sh"
4d44fe
+. "${srcdir=.}/PTRACE_SEIZE.sh"
4d44fe
 
4d44fe
 run_prog_skip_if_failed \
4d44fe
 	kill -0 $$
4d44fe
 
4d44fe
 check_prog sleep
4d44fe
 
4d44fe
-$STRACE -d -enone / > /dev/null 2> "$LOG"
4d44fe
-if grep -x "[^:]*strace: PTRACE_SEIZE doesn't work" "$LOG" > /dev/null; then
4d44fe
-	skip_ "PTRACE_SEIZE doesn't work"
4d44fe
-fi
4d44fe
-
4d44fe
 set -e
4d44fe
 
4d44fe
 > "$LOG"
4d44fe
Index: strace-4.24/tests-mx32/detach-stopped.test
4d44fe
===================================================================
4d44fe
--- strace-4.24.orig/tests-mx32/detach-stopped.test	2017-05-22 19:33:51.000000000 +0200
4d44fe
+++ strace-4.24/tests-mx32/detach-stopped.test	2019-03-10 05:48:33.040919501 +0100
4d44fe
@@ -6,40 +6,16 @@
4d44fe
 # Copyright (c) 2014-2017 The strace developers.
4d44fe
 # All rights reserved.
4d44fe
 #
4d44fe
-# Redistribution and use in source and binary forms, with or without
4d44fe
-# modification, are permitted provided that the following conditions
4d44fe
-# are met:
4d44fe
-# 1. Redistributions of source code must retain the above copyright
4d44fe
-#    notice, this list of conditions and the following disclaimer.
4d44fe
-# 2. Redistributions in binary form must reproduce the above copyright
4d44fe
-#    notice, this list of conditions and the following disclaimer in the
4d44fe
-#    documentation and/or other materials provided with the distribution.
4d44fe
-# 3. The name of the author may not be used to endorse or promote products
4d44fe
-#    derived from this software without specific prior written permission.
4d44fe
-#
4d44fe
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
4d44fe
-# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
4d44fe
-# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
4d44fe
-# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
4d44fe
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
4d44fe
-# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
4d44fe
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
4d44fe
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
4d44fe
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
4d44fe
-# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4d44fe
+# SPDX-License-Identifier: GPL-2.0-or-later
4d44fe
 
4d44fe
 . "${srcdir=.}/init.sh"
4d44fe
+. "${srcdir=.}/PTRACE_SEIZE.sh"
4d44fe
 
4d44fe
 run_prog_skip_if_failed \
4d44fe
 	kill -0 $$
4d44fe
 
4d44fe
 check_prog sleep
4d44fe
 
4d44fe
-$STRACE -d -enone / > /dev/null 2> "$LOG"
4d44fe
-if grep -x "[^:]*strace: PTRACE_SEIZE doesn't work" "$LOG" > /dev/null; then
4d44fe
-	skip_ "PTRACE_SEIZE doesn't work"
4d44fe
-fi
4d44fe
-
4d44fe
 set -e
4d44fe
 
4d44fe
 > "$LOG"
4d44fe
Index: strace-4.24/tests-mx32/PTRACE_SEIZE.sh
4d44fe
===================================================================
4d44fe
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
4d44fe
+++ strace-4.24/tests-mx32/PTRACE_SEIZE.sh	2019-08-29 17:34:48.837470883 +0200
4d44fe
@@ -0,0 +1,13 @@
4d44fe
+#!/bin/sh
4d44fe
+#
4d44fe
+# Skip the test if PTRACE_SEIZE is not supported.
4d44fe
+#
4d44fe
+# Copyright (c) 2014-2019 The strace developers.
4d44fe
+# All rights reserved.
4d44fe
+#
4d44fe
+# SPDX-License-Identifier: GPL-2.0-or-later
4d44fe
+
4d44fe
+$STRACE -d -enone / > /dev/null 2> "$LOG" ||:
4d44fe
+if grep -x "[^:]*strace: PTRACE_SEIZE doesn't work" "$LOG" > /dev/null; then
4d44fe
+	skip_ "PTRACE_SEIZE doesn't work"
4d44fe
+fi