dcavalca / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone

Blame SOURCES/0017-tests-kill-do-not-use-shell-build-in.patch

fe1ca8
From 47b0f3480a88be94ef73973e73ad9f7fb8258cad Mon Sep 17 00:00:00 2001
fe1ca8
From: Karel Zak <kzak@redhat.com>
fe1ca8
Date: Mon, 4 Mar 2019 17:28:15 +0100
fe1ca8
Subject: [PATCH 17/19] tests: (kill) do not use shell build-in
fe1ca8
fe1ca8
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1681062
fe1ca8
Upstream: http://github.com/karelzak/util-linux/commit/2fadcded53add5b5b0ca7071f310a0f37c711c51
fe1ca8
Signed-off-by: Karel Zak <kzak@redhat.com>
fe1ca8
---
fe1ca8
 tests/ts/kill/all_processes  | 5 +++++
fe1ca8
 tests/ts/kill/name_to_number | 5 +++++
fe1ca8
 tests/ts/kill/options        | 5 +++++
fe1ca8
 tests/ts/kill/print_pid      | 5 +++++
fe1ca8
 tests/ts/kill/queue          | 5 +++++
fe1ca8
 5 files changed, 25 insertions(+)
fe1ca8
fe1ca8
diff --git a/tests/ts/kill/all_processes b/tests/ts/kill/all_processes
fe1ca8
index 2596ef02b..7a0c95931 100755
fe1ca8
--- a/tests/ts/kill/all_processes
fe1ca8
+++ b/tests/ts/kill/all_processes
fe1ca8
@@ -20,6 +20,11 @@ ts_init "$*"
fe1ca8
 
fe1ca8
 ts_skip_nonroot
fe1ca8
 
fe1ca8
+# make sure we do not use shell built-in command
fe1ca8
+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
fe1ca8
+	TS_CMD_KILL="/bin/kill"
fe1ca8
+fi
fe1ca8
+
fe1ca8
 ts_check_test_command "$TS_CMD_KILL"
fe1ca8
 ts_check_test_command "$TS_HELPER_SIGRECEIVE"
fe1ca8
 
fe1ca8
diff --git a/tests/ts/kill/name_to_number b/tests/ts/kill/name_to_number
fe1ca8
index cde55c9ed..fd2aaafe0 100755
fe1ca8
--- a/tests/ts/kill/name_to_number
fe1ca8
+++ b/tests/ts/kill/name_to_number
fe1ca8
@@ -18,6 +18,11 @@ TS_DESC="name_to_number"
fe1ca8
 . "$TS_TOPDIR/functions.sh"
fe1ca8
 ts_init "$*"
fe1ca8
 
fe1ca8
+# make sure we do not use shell built-in command
fe1ca8
+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
fe1ca8
+	TS_CMD_KILL="/bin/kill"
fe1ca8
+fi
fe1ca8
+
fe1ca8
 ts_check_test_command "$TS_CMD_KILL"
fe1ca8
 ts_check_test_command "$TS_HELPER_SIGRECEIVE"
fe1ca8
 
fe1ca8
diff --git a/tests/ts/kill/options b/tests/ts/kill/options
fe1ca8
index 2c82bbccc..ee9e52f47 100755
fe1ca8
--- a/tests/ts/kill/options
fe1ca8
+++ b/tests/ts/kill/options
fe1ca8
@@ -18,6 +18,11 @@ TS_DESC="options"
fe1ca8
 . "$TS_TOPDIR/functions.sh"
fe1ca8
 ts_init "$*"
fe1ca8
 
fe1ca8
+# make sure we do not use shell built-in command
fe1ca8
+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
fe1ca8
+	TS_CMD_KILL="/bin/kill"
fe1ca8
+fi
fe1ca8
+
fe1ca8
 ts_check_test_command "$TS_CMD_KILL"
fe1ca8
 ts_check_test_command "$TS_HELPER_SIGRECEIVE"
fe1ca8
 
fe1ca8
diff --git a/tests/ts/kill/print_pid b/tests/ts/kill/print_pid
fe1ca8
index c6187f192..2a2a838ee 100755
fe1ca8
--- a/tests/ts/kill/print_pid
fe1ca8
+++ b/tests/ts/kill/print_pid
fe1ca8
@@ -18,6 +18,11 @@ TS_DESC="print_pid"
fe1ca8
 . "$TS_TOPDIR/functions.sh"
fe1ca8
 ts_init "$*"
fe1ca8
 
fe1ca8
+# make sure we do not use shell built-in command
fe1ca8
+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
fe1ca8
+	TS_CMD_KILL="/bin/kill"
fe1ca8
+fi
fe1ca8
+
fe1ca8
 ts_check_test_command "$TS_CMD_KILL"
fe1ca8
 ts_check_test_command "$TS_HELPER_SIGRECEIVE"
fe1ca8
 
fe1ca8
diff --git a/tests/ts/kill/queue b/tests/ts/kill/queue
fe1ca8
index 992acf7a6..4727cbfc4 100755
fe1ca8
--- a/tests/ts/kill/queue
fe1ca8
+++ b/tests/ts/kill/queue
fe1ca8
@@ -18,6 +18,11 @@ TS_DESC="queue"
fe1ca8
 . "$TS_TOPDIR/functions.sh"
fe1ca8
 ts_init "$*"
fe1ca8
 
fe1ca8
+# make sure we do not use shell built-in command
fe1ca8
+if [ "$TS_USE_SYSTEM_COMMANDS" == "yes" ]; then
fe1ca8
+	TS_CMD_KILL="/bin/kill"
fe1ca8
+fi
fe1ca8
+
fe1ca8
 ts_check_test_command "$TS_CMD_KILL"
fe1ca8
 ts_check_test_command "$TS_HELPER_SIGRECEIVE"
fe1ca8
 
fe1ca8
-- 
fe1ca8
2.20.1
fe1ca8