From: Evgeny Vereshchagin Date: Fri, 3 Jul 2020 10:54:49 +0000 (+0000) Subject: tests: skip "blkid/dm-err" when `mknod` doesn't work X-Git-Tag: v2.36-rc2~14^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3c9e21fe7d8fed6eb521a03a09b2e8be94ee1ed;p=thirdparty%2Futil-linux.git tests: skip "blkid/dm-err" when `mknod` doesn't work Signed-off-by: Evgeny Vereshchagin --- diff --git a/tests/ts/blkid/dm-err b/tests/ts/blkid/dm-err index b9f0e640e3..fb6c179d0a 100755 --- a/tests/ts/blkid/dm-err +++ b/tests/ts/blkid/dm-err @@ -33,6 +33,13 @@ DEVICE="/dev/mapper/${DEVNAME}" ts_log "Initialize device" echo "0 262144 error" | dmsetup create $DEVNAME +# Some tests are run in LXD containers on Travis CI where `mknod` doesn't always work +# https://docs.travis-ci.com/user/multi-cpu-architectures/#security-and-lxd-container +# https://linuxcontainers.org/lxd/docs/master/syscall-interception +if [ "$TRAVIS" == "true" ] && [ ! -b "$DEVICE" ]; then + ts_skip "$DEVICE wasn't created" +fi + ts_log "Probe device" $TS_CMD_BLKID -p -o udev $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG echo "Return code: $?" >> $TS_OUTPUT