]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: install: check the behavior when strip is terminated by a signal
authorCollin Funk <collin.funk1@gmail.com>
Tue, 9 Jun 2026 04:56:48 +0000 (21:56 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Tue, 9 Jun 2026 04:57:39 +0000 (21:57 -0700)
* tests/install/strip-program.sh: Add the test case.

tests/install/strip-program.sh

index 33f13eccadc6a75f47d7394b7b8b4e5907f758a1..08e6abb9b7143ba35997d3f1b2a88673b7685288 100755 (executable)
@@ -36,6 +36,15 @@ compare exp dest || fail=1
 returns_ 1 ginstall src dest2 -s --strip-program=./FOO || fail=1
 test -e dest2 && fail=1
 
+# Test the behavior when 'strip' is terminated by a signal.
+cat <<EOF > c || framework_failure_
+#!$SHELL
+kill \$\$
+EOF
+chmod a+x c || framework_failure_
+returns_ 1 ginstall src dest3 -s --strip-program=./c || fail=1
+test -e dest3 && fail=1
+
 # Ensure naked hyphens not passed
 cat <<EOF > no-hyphen || framework_failure_
 #!$SHELL