* write error to the test log file rather than on stdout
* use sub-tests to get more info on output
* don't use ts_die in sub-tests to make sure we call final dmsetup remove
Signed-off-by: Karel Zak <kzak@redhat.com>
It looks like that old CHS values prior this change in test data are
incorrect. Possible explanation why CHS values are incorrect is in commit
message 9cade4fbf8 ("libfdisk: (dos) Fix determining number of heads and
sectors per track from MBR").
This change updates test data to pass test suite after applying mentioned
commit.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Renaming files with rename often involves multiple passes in order
to, say, replace all spaces with underscores because traditionally
rename only replaces the first occurrence of the expression. The
--all parameter makes this task simple.
With the addition of --last, rename becomes much safer to use when
replacing file extensions, whereas before it would mangle a file
which had its extension also embedded elsewhere in its name.
The implied --first, together with --all and --last, round out the
common cases for renaming files.
Use fdisk -x instead of fdisk -l for printing layout in fdisk tests. This
can help debugging why some fdisk tests fail.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
It's seems detection by BLKRRPART is broken in recent kernels
(probably regression), and it's also overkill to force kernel re-read
all and generate all the events. It seems more elegant to use O_EXCL.
Signed-off-by: Karel Zak <kzak@redhat.com>
Update as usually before release to see differences (on Fedora 33).
- static programs are not enabled by tools/config-gen.d/all.conf
anymore (see 63f4e19928)
- add new uclampset
- libdl and libpython3 seems unnecessary
- fdformat disabled by default
- new hardlink uses libpcre2-posix
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
The disk layout as created by scsi_debug depends on kernel version.
Let's make the partition sizes hardcoded in our tests than rely on
kernel.
Signed-off-by: Karel Zak <kzak@redhat.com>
We encode to "safe" strings almost all variables for 'blkid -o udev'
and we need it also for SYSTEM_ID, PUBLISHER_ID, APPLICATION_ID,
BOOT_SYSTEM_ID and recently added VOLUME_SET_ID and DATA_PREPARER_ID.
This change makes blkid from util-linux more compatible with built-in
udevd blkid.
Addresses: https://github.com/karelzak/util-linux/pull/1215 (commit 5cbffdb74f)
Signed-off-by: Karel Zak <kzak@redhat.com>
Image iso-different-iso-joliet-label contains different identifiers in ISO
and Joliet locations. Identifiers are prefixed with "ISO" or "Joliet"
string to verify that UNICODE Joliet has preference over ASCII ISO.
Image iso-unicode-long-label contains very long identifiers in ISO location
which do not fit into the Joliet location. In ISO location is UNICODE
character 'ï' replaced by '_' and unrepresentable spaces also by '_'.
This test verifies that libblkid can use first half of identifiers from
Joliet (which contains UNICODE) and second half from ISO which is just
uppercase and only small subset of ASCII. This image was generated by Nero
Linux software and basically this truncate and '_' replacement is done by
default for any long or UNICODE label.
Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
The getwchar(3) will choke and exit if invalid character is encountered.
This change will make col(1) to print broken multibyte characters as
\x{hex} string.
Reported-by: Vitaly Lipatov <lav@etersoft.ru>
Addresses: https://github.com/karelzak/util-linux/issues/1198
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit adds support for multisession filesystem images to
standard low-probe blkid tests. The expected image name is
<name>-multi-<offset>[-<offset> ...][-<something>].img
For example:
iso-multi-0-174-348-genisoimage.img.xz
triggers three sub-tests:
: iso-multi-genisoimage-0 ... OK
: iso-multi-genisoimage-174 ... OK
: iso-multi-genisoimage-348 ... OK
Addresses: https://github.com/karelzak/util-linux/issues/1161
Signed-off-by: Karel Zak <kzak@redhat.com>
* cpu MHz is per-CPU value and not printed in summary anymore
* topology is reordered
* number of NUMA nodes is moved to NUMA section
* parsable output uses cache ID from kernel if avalable
Signed-off-by: Karel Zak <kzak@redhat.com>
* 'whereis' of https://github.com/ferivoz/util-linux:
whereis: extend test case
whereis: filter bin, man and src differently
whereis: do not strip suffixes
whereis: do not ignore trailing numbers
whereis: add --disable-whereis to configure
whereis: add lib32 directories
whereis: support zst compressed man pages
whereis: fix out of boundary read
The old images of the atari label are truncated and in-table stored
sizes do not match with real images sizes -- libblkid checks it now.
I have no idea how to generate ICD format, let's ignore it in tests
for now.
Signed-off-by: Karel Zak <kzak@redhat.com>
* 'col-refactor' of https://github.com/kerolasa/util-linux:
col: replace LINE and CHAR typedefs with structs
col: free memory before exit [LeakSanitizer]
col: tidy up sources a little bit
col: add defaults to switch case clauses
col: flip all comparisions to numerical order
col: use size_t when dealing with numbers that buffer sizes
col: add structure to hold line variables
col: add update_cur_line() function
col: add handle_not_graphic() function
col: initialize variables when they are declared
col: move option handling to separate function
col: move global variables to a control structure
col: use inline function rather than function like define
col: use typedef and enum to clarify struct
col: remove function prototypes
col: add more tests