util-linux/tests/expected
Daniel Drake 7ef86a0891 libblkid: improve handling of ISO files with partition tables
The ISO format specifically leaves the first 32kb blank so that it
can be used for other purposes, such as adding a partition table.
This is commonly used (e.g. by Endless and Fedora installation media) to
have partition 0 starting at sector 0 as a mountable iso9660 filesystem,
followed by more partitions (e.g. an EFI system partition).
Such layouts can be easily created by tools such as xorriso.

When plugging in a USB disk flashed with this type of ISO, blkid presents
a somewhat confusing view of the block devices. Taking the example of
a 'sda' disk with two partitions:
 1. The "iso partition"
 2. An unformatted partition

In such a setup, before the changes here, blkid will currently report the
ISO metadata attributes ID_FS_PUBLISHER_ID, ID_FS_UUID, ID_FS_LABEL, and
ID_FS_TYPE=iso9660 on both sda *and* sda1.

Since sda2 is unformatted, it won't have any ID_FS_ attributes of it's
own. And due to the following standard udev rule:

  # for partitions import parent information
  ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*"

sda2 will actually import all of the ID_FS_ stuff from the parent device
sda.

The result at this point is that three udev devices all have the same
ID_FS_ attribute values, leading to strange results such as three
devices all racing to own the link in /dev/disk/by-uuid, so you can't
reliably do a mount-by-UUID.

Clean up this situation by detecting such partitioned ISO disks
in the superblock probing setup. If files of this kind are detected,
we now only expose the ISO metadata attributes on the specific partition
that points to the ISO data (and not the parent disk).

Signed-off-by: Daniel Drake <drake@endlessm.com>
2019-09-25 11:41:30 +08:00
..
bitops
blkdiscard tests: split stdout and stderr 2019-08-30 15:50:07 +02:00
blkid libblkid: improve handling of ISO files with partition tables 2019-09-25 11:41:30 +08:00
build-sys tests: update build-sys output 2019-06-14 12:06:58 +02:00
cal tests: add cal --span tests 2018-08-07 11:06:13 +02:00
col tests: (col) avoid hardcoding of errno string 2019-08-27 09:37:01 +02:00
colcrt colcrt: avoid the command getting hung [afl] 2016-04-13 12:29:16 +02:00
colrm tests: add colrm basic test 2011-06-01 10:03:48 +02:00
column tests: (column) use actually invalid multibytes to test encoding 2019-08-27 09:36:50 +02:00
cramfs tests: split stdout and stderr 2019-08-30 15:50:07 +02:00
dmesg tests: adjust for ISO timezone colon use 2017-11-12 09:08:43 -05:00
eject tests: don't skip case "output undefined" 2016-03-07 23:34:24 +01:00
fdisk tests: split stdout and stderr 2019-08-30 15:50:07 +02:00
fincore tests: split stdout and stderr 2019-08-30 15:50:07 +02:00
findmnt libmount: make rootfs lookup by parent-id more robust 2017-02-01 16:20:12 +01:00
fsck
getopt tests: (getopt) remove unwanted paths from error output 2019-08-30 20:46:44 +02:00
hardlink tests: (hardlink) update noregex 2019-02-11 14:53:51 +01:00
hexdump tests: add .BE hexdump test results (from s390) 2014-05-14 14:05:54 +02:00
ipcs misc: Fix various typos 2016-05-31 23:40:21 +02:00
isosize tests: add isosize --sectors and --divisor tests 2014-02-17 14:16:21 +01:00
kill tests: split stdout and stderr 2019-08-30 15:50:07 +02:00
libfdisk tests: add remaining stderr outputs 2019-08-30 16:10:01 +02:00
libmount tests: (libmount) make X-* and x-* more robust 2019-07-15 12:46:11 +02:00
libsmartcols tests: (libsmartcols) add padding tests 2019-07-23 16:26:48 +02:00
logger tests: split stdout and stderr 2019-08-30 15:50:07 +02:00
login tests: remove obsolete checktty test 2011-10-26 23:17:17 +02:00
look
losetup tests: Add losetup-loop test suite 2016-08-17 13:02:35 +02:00
lsblk libsmartcols: cleanup and extend padding functionality 2019-07-23 16:24:42 +02:00
lscpu tests: lscpu s390 nested virtualization 2019-09-22 13:49:45 +02:00
lsmem lsmem: improve JSON output 2018-04-05 12:14:46 +02:00
lsns lsns: add a case for testing nsfs column 2017-11-27 15:54:57 +01:00
md5 tests: test_md5 prints md5sum only 2016-04-13 12:29:16 +02:00
minix tests: split stdout and stderr 2019-08-30 15:50:07 +02:00
misc tests: remove unbuffered ts_run feature 2019-08-30 16:30:35 +02:00
more tests: add more(1) check 2013-01-24 19:30:35 +01:00
mount tests: don't skip case "output undefined" 2016-03-07 23:34:24 +01:00
namei tests: remove namei(1) failed lstat test 2018-03-27 14:21:46 +02:00
partx tests: added missing expected outputs for partx (atari) 2018-01-24 12:20:11 +01:00
paths agetty: remove obsolete HAVE_UPDWTMP fallback 2016-12-07 12:35:24 +01:00
rename tests: remove unbuffered ts_run feature 2019-08-30 16:30:35 +02:00
schedutils tests: add chrt vs. nice test 2016-10-03 12:06:55 +02:00
script tests: update script done messages 2018-05-14 13:54:41 +02:00
sfdisk tests: update sfdisk dumps 2019-09-16 12:01:54 +02:00
sha1 libuuid: add support for hash-based UUIDs 2017-09-05 11:26:39 +02:00
swapon tests: add swapon tests for --fixpgsz and fix signature 2012-03-27 12:11:53 +02:00
tailf tests: remove warning from test output 2015-03-17 09:59:10 +01:00
utmp tests: adjust for ISO timezone colon use 2017-11-12 09:08:43 -05:00
uuid test: update UUID v5 tests 2018-08-31 12:48:46 +02:00
wipefs wipefs: add --backup 2013-04-26 12:27:37 +02:00