]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: add ts_skip_docker
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 31 May 2023 15:27:38 +0000 (17:27 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 28 Nov 2023 12:41:02 +0000 (13:41 +0100)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
(cherry picked from commit 023e77d26a12aa632266e2a967e944bcbf9c8a12)

tests/functions.sh
tests/ts/misc/setarch

index c5e42b1a68a2e1baf8646b6bfe321c570c30ee0b..5a562a39aad47fe8c275c69df6ef609e5bda276b 100644 (file)
@@ -1163,3 +1163,7 @@ function ts_check_enosys_syscalls {
        "$TS_HELPER_ENOSYS" ${@/#/-s } true 2> /dev/null
        [ $? -ne 0 ] && ts_skip "test_enosys does not work: $*"
 }
+
+function ts_skip_docker {
+       test -e /.dockerenv && ts_skip "unsupported in docker environment"
+}
index 5398b3391ec1892082131996f43684bb69252710..e7b6ff34c1ae3ab6dac220571a2ff81b912e6f17 100755 (executable)
@@ -19,11 +19,11 @@ TS_DESC="setarch"
 ts_init "$*"
 
 ts_check_test_command "$TS_CMD_SETARCH"
+ts_skip_docker
 
 ARCH=$(uname -m)
 
 ts_init_subtest options
-test -e /.dockerenv && ts_skip "unsupported in docker environment"
 ts_log_both "###### unknown arch"
 $TS_CMD_SETARCH qubit -v echo "success" >> $TS_OUTPUT 2>> $TS_ERRLOG
 echo "exit: $?" >>$TS_OUTPUT