diff options
Diffstat (limited to 'tests')
23 files changed, 181 insertions, 233 deletions
diff --git a/tests/expected/column/table-empty-column-at-eol b/tests/expected/column/table-empty-column-at-eol new file mode 100644 index 000000000..948cf947f --- /dev/null +++ b/tests/expected/column/table-empty-column-at-eol @@ -0,0 +1 @@ +| diff --git a/tests/expected/column/table-empty-column-at-eol2 b/tests/expected/column/table-empty-column-at-eol2 new file mode 100644 index 000000000..7c4378506 --- /dev/null +++ b/tests/expected/column/table-empty-column-at-eol2 @@ -0,0 +1 @@ +|| diff --git a/tests/expected/fdisk/gpt-resize b/tests/expected/fdisk/gpt-resize index 0b3c25a27..2871f1a14 100644 --- a/tests/expected/fdisk/gpt-resize +++ b/tests/expected/fdisk/gpt-resize @@ -35,7 +35,7 @@ Command (m for help): The partition table has been altered. Calling ioctl() to re-read partition table. Re-reading the partition table failed.: Invalid argument -The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8). +The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or partx(8). diff --git a/tests/expected/fdisk/mbr-nondos-mode.sparc b/tests/expected/fdisk/mbr-nondos-mode.sparc deleted file mode 100644 index ffbbd8024..000000000 --- a/tests/expected/fdisk/mbr-nondos-mode.sparc +++ /dev/null @@ -1,189 +0,0 @@ -Initialize empty image -8f4e33f3dc3e414ff94e5fb6905cba8c mbr-nondos-mode.img -Create new DOS partition table -8f4e33f3dc3e414ff94e5fb6905cba8c mbr-nondos-mode.img - ----layout---------- -Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / <removed> bytes -------------------- - -Create 1st primary partition -d5ad6d4e743430c2a61e558bb3319175 mbr-nondos-mode.img - ----layout---------- -Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors -Geometry: 255 heads, 63 sectors/track, 2 cylinders -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / <removed> bytes -Disklabel type: sun - -Device Start End Sectors Size Id Type Flags -<removed>1 0 16064 16065 7.9M 83 Linux native -<removed>2 16065 32129 16065 7.9M 82 Linux swap u -<removed>3 0 32129 32130 15.7M 5 Whole disk -------------------- - -Set primary partition active -d59bb4ba5914242f9a63a2d13fb68752 mbr-nondos-mode.img - ----layout---------- -Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors -Geometry: 255 heads, 63 sectors/track, 2 cylinders -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / <removed> bytes -Disklabel type: sun - -Device Start End Sectors Size Id Type Flags -<removed>1 0 16064 16065 7.9M 83 Linux native r -<removed>2 16065 32129 16065 7.9M 82 Linux swap u -<removed>3 0 32129 32130 15.7M 5 Whole disk -------------------- - -Re-create 1st primary partition -d8ba04bdd46cec690fa672ac8fcaf387 mbr-nondos-mode.img - ----layout---------- -Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors -Geometry: 255 heads, 63 sectors/track, 2 cylinders -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / <removed> bytes -Disklabel type: sun - -Device Start End Sectors Size Id Type Flags -<removed>1 0 16064 16065 7.9M 83 Linux native r -<removed>2 16065 32129 16065 7.9M 82 Linux swap u -------------------- - -Create 2nd primary partition -d8ba04bdd46cec690fa672ac8fcaf387 mbr-nondos-mode.img - ----layout---------- -Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors -Geometry: 255 heads, 63 sectors/track, 2 cylinders -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / <removed> bytes -Disklabel type: sun - -Device Start End Sectors Size Id Type Flags -<removed>1 0 16064 16065 7.9M 83 Linux native r -<removed>2 16065 32129 16065 7.9M 82 Linux swap u -------------------- - -Create extended partition -d59bb4ba5914242f9a63a2d13fb68752 mbr-nondos-mode.img - ----layout---------- -Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors -Geometry: 255 heads, 63 sectors/track, 2 cylinders -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / <removed> bytes -Disklabel type: sun - -Device Start End Sectors Size Id Type Flags -<removed>1 0 16064 16065 7.9M 83 Linux native r -<removed>2 16065 32129 16065 7.9M 82 Linux swap u -<removed>3 0 32129 32130 15.7M 5 Whole disk -------------------- - -Create logical partitions -d59bb4ba5914242f9a63a2d13fb68752 mbr-nondos-mode.img - ----layout---------- -Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors -Geometry: 255 heads, 63 sectors/track, 2 cylinders -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / <removed> bytes -Disklabel type: sun - -Device Start End Sectors Size Id Type Flags -<removed>1 0 16064 16065 7.9M 83 Linux native r -<removed>2 16065 32129 16065 7.9M 82 Linux swap u -<removed>3 0 32129 32130 15.7M 5 Whole disk -------------------- - -Delete logical partitions -d59bb4ba5914242f9a63a2d13fb68752 mbr-nondos-mode.img - ----layout---------- -Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors -Geometry: 255 heads, 63 sectors/track, 2 cylinders -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / <removed> bytes -Disklabel type: sun - -Device Start End Sectors Size Id Type Flags -<removed>1 0 16064 16065 7.9M 83 Linux native r -<removed>2 16065 32129 16065 7.9M 82 Linux swap u -<removed>3 0 32129 32130 15.7M 5 Whole disk -------------------- - -Create another logical partition -d59bb4ba5914242f9a63a2d13fb68752 mbr-nondos-mode.img - ----layout---------- -Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors -Geometry: 255 heads, 63 sectors/track, 2 cylinders -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / <removed> bytes -Disklabel type: sun - -Device Start End Sectors Size Id Type Flags -<removed>1 0 16064 16065 7.9M 83 Linux native r -<removed>2 16065 32129 16065 7.9M 82 Linux swap u -<removed>3 0 32129 32130 15.7M 5 Whole disk -------------------- - -Delete primary partition -0bd87175c4c5c3ef9a46595027b6369c mbr-nondos-mode.img - ----layout---------- -Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors -Geometry: 255 heads, 63 sectors/track, 2 cylinders -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / <removed> bytes -Disklabel type: sun - -Device Start End Sectors Size Id Type Flags -<removed>2 16065 32129 16065 7.9M 82 Linux swap u -<removed>3 0 32129 32130 15.7M 5 Whole disk -------------------- - -Delete primary partition -33f6e541ddcafed65d231ce3f2b76a59 mbr-nondos-mode.img - ----layout---------- -Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors -Geometry: 255 heads, 63 sectors/track, 2 cylinders -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / <removed> bytes -Disklabel type: sun - -Device Start End Sectors Size Id Type Flags -<removed>3 0 32129 32130 15.7M 5 Whole disk -------------------- - -Delete extended partition -e923755cbc0054eb85341fe119be07f9 mbr-nondos-mode.img - ----layout---------- -Disk <removed>: 20 MiB, 20971520 bytes, 40960 sectors -Geometry: 255 heads, 63 sectors/track, 2 cylinders -Units: sectors of 1 * 512 = 512 bytes -Sector size (logical/physical): 512 bytes / 512 bytes -I/O size (minimum/optimal): 512 bytes / <removed> bytes -Disklabel type: sun -------------------- - diff --git a/tests/expected/fdisk/sunlabel b/tests/expected/fdisk/sunlabel index 47b5e756b..5ada4fab1 100644 --- a/tests/expected/fdisk/sunlabel +++ b/tests/expected/fdisk/sunlabel @@ -18,7 +18,7 @@ I/O size (minimum/optimal): 512 bytes / <removed> bytes Disklabel type: sun Device Start End Cylinders Size Id Type Flags -<removed>1 1 128 129 4M 83 Linux native +<removed>1 1 128 129 4M 83 Linux native Set partition sysid df75defdb97fbd56222aed18631a22d0 sunlabel.img Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors @@ -29,7 +29,7 @@ I/O size (minimum/optimal): 512 bytes / <removed> bytes Disklabel type: sun Device Start End Cylinders Size Id Type Flags -<removed>1 1 128 129 4M 4 SunOS usr +<removed>1 1 128 129 4M 4 SunOS usr Set first partition readonly da23f66698d9a553162887621d4c7490 sunlabel.img Disk <removed>: 10 MiB, 10485760 bytes, 20480 sectors @@ -75,6 +75,6 @@ Disklabel type: sun Device Start End Cylinders Size Id Type Flags <removed>1 1 128 129 4M 4 SunOS usr ur -<removed>2 129 325 198 6.1M 83 Linux native +<removed>2 129 325 198 6.1M 83 Linux native Delete all partitions 502ba7a0cfdce2849c3a99881f0590c3 sunlabel.img diff --git a/tests/expected/libmount/context-X-mount.mkdir b/tests/expected/libmount/context-X-comment index 7504a7e83..7504a7e83 100644 --- a/tests/expected/libmount/context-X-mount.mkdir +++ b/tests/expected/libmount/context-X-comment diff --git a/tests/expected/libmount/context-x-mount.mkdir b/tests/expected/libmount/context-x-permanent index 7504a7e83..7504a7e83 100644 --- a/tests/expected/libmount/context-x-mount.mkdir +++ b/tests/expected/libmount/context-x-permanent diff --git a/tests/expected/libsmartcols/fromfile-padding-default b/tests/expected/libsmartcols/fromfile-padding-default new file mode 100644 index 000000000..f935be267 --- /dev/null +++ b/tests/expected/libsmartcols/fromfile-padding-default @@ -0,0 +1,11 @@ +NAME.. ......NUM STRINGS STRINGS +aaaa.. ........0 aaaa... aaaa +bbb... ......100 bbb.... bbb +ccccc. .......21 ccccc.. ccccc +dddddd ........3 dddddd. dddddd +ee.... ......411 ee..... ee +ffff.. .....5111 ....... +gggggg 678993321 gggggg. gggggg +hhh... ..7666666 hhh.... hhh +iiiiii .....8765 iiiiii. iiiiii +jj.... ...987456 jj..... jj diff --git a/tests/expected/libsmartcols/fromfile-padding-maxout b/tests/expected/libsmartcols/fromfile-padding-maxout new file mode 100644 index 000000000..3f73ce38b --- /dev/null +++ b/tests/expected/libsmartcols/fromfile-padding-maxout @@ -0,0 +1,11 @@ +NAME.............. ..................NUM STRINGS............ STRINGS............ +aaaa.............. ....................0 aaaa............... aaaa............... +bbb............... ..................100 bbb................ bbb................ +ccccc............. ...................21 ccccc.............. ccccc.............. +dddddd............ ....................3 dddddd............. dddddd............. +ee................ ..................411 ee................. ee................. +ffff.............. .................5111 ................... ................... +gggggg............ ............678993321 gggggg............. gggggg............. +hhh............... ..............7666666 hhh................ hhh................ +iiiiii............ .................8765 iiiiii............. iiiiii............. +jj................ ...............987456 jj................. jj................. diff --git a/tests/expected/libsmartcols/fromfile-padding-minout b/tests/expected/libsmartcols/fromfile-padding-minout new file mode 100644 index 000000000..ac8eabc93 --- /dev/null +++ b/tests/expected/libsmartcols/fromfile-padding-minout @@ -0,0 +1,11 @@ +NAME.. ......NUM STRINGS STRINGS +aaaa.. ........0 aaaa... aaaa +bbb... ......100 bbb.... bbb +ccccc. .......21 ccccc.. ccccc +dddddd ........3 dddddd. dddddd +ee.... ......411 ee..... ee +ffff.. .....5111 +gggggg 678993321 gggggg. gggggg +hhh... ..7666666 hhh.... hhh +iiiiii .....8765 iiiiii. iiiiii +jj.... ...987456 jj..... jj diff --git a/tests/expected/lsblk/lsblk-simple-lvm-vendor b/tests/expected/lsblk/lsblk-simple-lvm-vendor index 591c703af..24ee97dd4 100644 --- a/tests/expected/lsblk/lsblk-simple-lvm-vendor +++ b/tests/expected/lsblk/lsblk-simple-lvm-vendor @@ -1,22 +1,22 @@ NAME MODEL VENDOR REV -loop0 -`-vg_foo.4059-lv_foo.4059 -loop1 -`-vg_foo.4059-lv_foo.4059 -loop2 -`-vg_foo.4059-lv_foo.4059 -loop3 -`-vg_foo.4059-lv_foo.4059 +loop0 +`-vg_foo.4059-lv_foo.4059 +loop1 +`-vg_foo.4059-lv_foo.4059 +loop2 +`-vg_foo.4059-lv_foo.4059 +loop3 +`-vg_foo.4059-lv_foo.4059 sda KINGSTON SH103S3 ATA BBF0 -|-sda1 -|-sda2 -|-sda3 -|-sda4 -|-sda5 -`-sda6 +|-sda1 +|-sda2 +|-sda3 +|-sda4 +|-sda5 +`-sda6 sdb WDC WD800JD-00MS ATA 1E01 -`-sdb1 -nvme0n1 KINGSTON SKC1000240G -|-nvme0n1p1 -|-nvme0n1p2 -`-nvme0n1p3 +`-sdb1 +nvme0n1 KINGSTON SKC1000240G +|-nvme0n1p1 +|-nvme0n1p2 +`-nvme0n1p3 diff --git a/tests/expected/lsblk/lsblk-simple-nvme-vendor b/tests/expected/lsblk/lsblk-simple-nvme-vendor index 69e972a31..2a0a90514 100644 --- a/tests/expected/lsblk/lsblk-simple-nvme-vendor +++ b/tests/expected/lsblk/lsblk-simple-nvme-vendor @@ -1,14 +1,14 @@ NAME MODEL VENDOR REV sda KINGSTON SH103S3 ATA BBF0 -|-sda1 -|-sda2 -|-sda3 -|-sda4 -|-sda5 -`-sda6 +|-sda1 +|-sda2 +|-sda3 +|-sda4 +|-sda5 +`-sda6 sdb WDC WD800JD-00MS ATA 1E01 -`-sdb1 -nvme0n1 KINGSTON SKC1000240G -|-nvme0n1p1 -|-nvme0n1p2 -`-nvme0n1p3 +`-sdb1 +nvme0n1 KINGSTON SKC1000240G +|-nvme0n1p1 +|-nvme0n1p2 +`-nvme0n1p3 diff --git a/tests/expected/misc/mountpoint b/tests/expected/misc/mountpoint new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/expected/misc/mountpoint diff --git a/tests/expected/misc/mountpoint-default b/tests/expected/misc/mountpoint-default new file mode 100644 index 000000000..9a7ac6ab3 --- /dev/null +++ b/tests/expected/misc/mountpoint-default @@ -0,0 +1,2 @@ +./symlink-to-root is a mountpoint +0 diff --git a/tests/expected/misc/mountpoint-mutually-exclusive b/tests/expected/misc/mountpoint-mutually-exclusive new file mode 100644 index 000000000..38c36f13b --- /dev/null +++ b/tests/expected/misc/mountpoint-mutually-exclusive @@ -0,0 +1,2 @@ +mountpoint: --devno and --nofollow are mutually exclusive +1 diff --git a/tests/expected/misc/mountpoint-nofollow b/tests/expected/misc/mountpoint-nofollow new file mode 100644 index 000000000..1ba174959 --- /dev/null +++ b/tests/expected/misc/mountpoint-nofollow @@ -0,0 +1,2 @@ +./symlink-to-root is not a mountpoint +1 diff --git a/tests/ts/column/table b/tests/ts/column/table index bd1f16f3f..e64dee746 100755 --- a/tests/ts/column/table +++ b/tests/ts/column/table @@ -116,4 +116,12 @@ ts_init_subtest "empty-column" printf ':a:b\n' | $TS_CMD_COLUMN --table --separator ':' --output-separator ':' >> $TS_OUTPUT 2>&1 ts_finalize_subtest +ts_init_subtest "empty-column-at-eol" +printf '|' | $TS_CMD_COLUMN --separator '|' --output-separator '|' --table >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +ts_init_subtest "empty-column-at-eol2" +printf '||' | $TS_CMD_COLUMN --separator '|' --output-separator '|' --table >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + ts_finalize diff --git a/tests/ts/fdisk/mbr-nondos-mode b/tests/ts/fdisk/mbr-nondos-mode index d3b35fa39..8fb09f1ce 100755 --- a/tests/ts/fdisk/mbr-nondos-mode +++ b/tests/ts/fdisk/mbr-nondos-mode @@ -37,19 +37,16 @@ FDISK_CMD_DELETE_1PRIMARY="d\n1\n" # delete first primary FDISK_CMD_DELETE_2PRIMARY="d\n2\n" # delete first primary FDISK_CMD_DELETE_EXTENDED="d\n3\n" # delete second primary -# Sparc uses SUN disk labels by default and thus has a different output +# ignore architectures where MBR is not a default ARCH=$(uname -m) case $ARCH in *sparc* ) - ARCH_EXT=".sparc" + ts_skip "unsupported" ;; *) - ARCH_EXT="" ;; esac -TS_EXPECTED+="${ARCH_EXT}" - function print_layout { echo -ne "\n---layout----------\n" >> $TS_OUTPUT $TS_CMD_FDISK -l ${TEST_IMAGE_NAME} >> $TS_OUTPUT diff --git a/tests/ts/libmount/context b/tests/ts/libmount/context index 3750c701f..6dd35b193 100755 --- a/tests/ts/libmount/context +++ b/tests/ts/libmount/context @@ -146,8 +146,8 @@ is_mounted $MOUNTPOINT && echo "$MOUNTPOINT still mounted" >> $TS_OUTPUT 2>&1 ts_finalize_subtest -# deprecated -ts_init_subtest "x-mount.mkdir" +# deprecated (x-* mount option maintained in userspace (e.g. utab) +ts_init_subtest "x-permanent" TS_NOEXIST="$TS_OUTDIR/${TS_TESTNAME}-${TS_SUBNAME}-noex" [ -d $TS_NOEXIST ] && rmdir $TS_NOEXIST @@ -159,7 +159,8 @@ $TS_CMD_UMOUNT $TS_NOEXIST rmdir $TS_NOEXIST -ts_init_subtest "X-mount.mkdir" +# X-* comment +ts_init_subtest "X-comment" TS_NOEXIST="$TS_OUTDIR/${TS_TESTNAME}-${TS_SUBNAME}-noex" [ -d $TS_NOEXIST ] && rmdir $TS_NOEXIST diff --git a/tests/ts/libsmartcols/files/data-string-empty b/tests/ts/libsmartcols/files/data-string-empty new file mode 100644 index 000000000..1f8ad34e5 --- /dev/null +++ b/tests/ts/libsmartcols/files/data-string-empty @@ -0,0 +1,10 @@ +aaaa +bbb +ccccc +dddddd +ee + +gggggg +hhh +iiiiii +jj diff --git a/tests/ts/libsmartcols/fromfile b/tests/ts/libsmartcols/fromfile index 274081ea0..20994d661 100755 --- a/tests/ts/libsmartcols/fromfile +++ b/tests/ts/libsmartcols/fromfile @@ -114,6 +114,52 @@ ts_run $TESTPROG --nlines 10 --maxout --width 80\ >> $TS_OUTPUT 2>&1 ts_finalize_subtest +ts_init_subtest "padding-default" +export LIBSMARTCOLS_DEBUG_PADDING=on +ts_run $TESTPROG --nlines 10 --width 80 \ + --column $TS_SELF/files/col-name \ + --column $TS_SELF/files/col-number \ + --column $TS_SELF/files/col-string \ + --column $TS_SELF/files/col-string \ + $TS_SELF/files/data-string \ + $TS_SELF/files/data-number \ + $TS_SELF/files/data-string-empty \ + $TS_SELF/files/data-string-empty \ + >> $TS_OUTPUT 2> /dev/null +ts_finalize_subtest + +ts_init_subtest "padding-maxout" +export LIBSMARTCOLS_DEBUG_PADDING=on +ts_run $TESTPROG --nlines 10 --width 80 \ + --maxout \ + --column $TS_SELF/files/col-name \ + --column $TS_SELF/files/col-number \ + --column $TS_SELF/files/col-string \ + --column $TS_SELF/files/col-string \ + $TS_SELF/files/data-string \ + $TS_SELF/files/data-number \ + $TS_SELF/files/data-string-empty \ + $TS_SELF/files/data-string-empty \ + >> $TS_OUTPUT 2> /dev/null +ts_finalize_subtest + +ts_init_subtest "padding-minout" +export LIBSMARTCOLS_DEBUG_PADDING=on +ts_run $TESTPROG --nlines 10 --width 80 \ + --minout \ + --column $TS_SELF/files/col-name \ + --column $TS_SELF/files/col-number \ + --column $TS_SELF/files/col-string \ + --column $TS_SELF/files/col-string \ + $TS_SELF/files/data-string \ + $TS_SELF/files/data-number \ + $TS_SELF/files/data-string-empty \ + $TS_SELF/files/data-string-empty \ + >> $TS_OUTPUT 2> /dev/null +ts_finalize_subtest + +unset LIBSMARTCOLS_DEBUG_PADDING + ts_init_subtest "strictwidth" ts_run $TESTPROG --nlines 10 \ --column $TS_SELF/files/col-name \ diff --git a/tests/ts/misc/mountpoint b/tests/ts/misc/mountpoint new file mode 100755 index 000000000..03c1ccc3e --- /dev/null +++ b/tests/ts/misc/mountpoint @@ -0,0 +1,29 @@ +#!/bin/bash + +TS_TOPDIR="${0%/*}/../.." +TS_DESC="mountpoint" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +ts_check_test_command "$TS_CMD_MOUNTPOINT" + +ln -s / ./symlink-to-root + +ts_init_subtest "default" +$TS_CMD_MOUNTPOINT ./symlink-to-root >> $TS_OUTPUT 2>&1 +echo $? >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +ts_init_subtest "nofollow" +$TS_CMD_MOUNTPOINT --nofollow ./symlink-to-root >> $TS_OUTPUT 2>&1 +echo $? >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +ts_init_subtest "mutually-exclusive" +$TS_CMD_MOUNTPOINT --devno --nofollow / >> $TS_OUTPUT 2>&1 +echo $? >> $TS_OUTPUT 2>&1 +ts_finalize_subtest + +rm -f ./symlink-to-root +ts_finalize diff --git a/tests/ts/partx/partx b/tests/ts/partx/partx index b21dc44ef..84c286a94 100755 --- a/tests/ts/partx/partx +++ b/tests/ts/partx/partx @@ -137,9 +137,14 @@ udevadm settle ts_init_subtest "delete-non-existent" #attempt to remove it again { + # remove non-existing partitions (ENXIO) is not error + # + # see ab025087f91b66ee8e23a16bc49eb0d9bd421d65 and + # 53ae7d60cfeacd4e87bfe6fcc015b58b78ef4555 + # $TS_CMD_PARTX -d --nr $PARTS $TS_DEVICE && - echo "partx failed: removed non-existing partition" || - echo "partx: OK" + echo "partx: OK" || + echo "partx failed: removed non-existing partition" } >$TS_OUTPUT 2>&1 ts_finalize_subtest |