Commit Graph

1438 Commits

Author SHA1 Message Date
Karel Zak df8434230b tests: build-sys update
* libblkid does not depend on libuuid anymore
* libncurses depends on libdl due to

  $ ncursesw6-config --libs
  -lncursesw -ltinfo -ldl

* new command hardlink (with dependence on libpcre2-8
* hwclock needs librt

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-29 14:47:19 +02:00
Karel Zak 0b17c997c0 tests: auto-enable ASAN option if necessary
Let's detect ASAN LDFLAGS in top level Makefile to make sure we call
tests with --memcheck-asan if build-system has been configured with
--enable-asan.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-24 12:24:15 +02:00
Karel Zak 19bc8ef897 tests: fix TS_ENABLE_ASAN usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-17 10:38:50 +02:00
Karel Zak 2da48ba3cc tests: use TS_ENABLE_ASAN in tests to detect ASAN
It seems better to not use any random ASAN variable.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-17 10:10:46 +02:00
Karel Zak 1271e63c49 tests: ignore errors with enabled ASAN in python bindings
temporary solution... as it ends with
	undefined symbol: __asan_option_detect_stack_use_after_return

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-15 12:58:48 +02:00
Karel Zak 8b2464ae2a tests: update lscpu due to 'Vulnerability' fields
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-11 13:55:51 +02:00
Karel Zak 5b13d6a1c9 tests: add /mnt/test/foo^Mbar to mountinfo tests
Addresses: https://github.com/karelzak/util-linux/issues/780
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-04-08 15:22:27 +02:00
Karel Zak 0e86bc8406 lscpu: add --caches
$ lscpu -C
NAME ONE-SIZE ALL-SIZE WAYS TYPE        LEVEL
L3         8M       8M   16 Unified         3
L2       256K       1M    8 Unified         2
L1i       32K     128K    8 Instruction     1
L1d       32K     128K    8 Data            1

The patch also updates extra caches (s390) output in lsblk summary to
be compatible with output about normal caches.

Addresses: https://github.com/karelzak/util-linux/issues/663
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 14:11:20 +01:00
Karel Zak 1b4b184cc8 tests: update lscpu output
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-19 13:56:26 +01:00
Karel Zak 16ca05511b lscpu: add 'Frequency boost'
Show turbo boost status on platforms where is available a file
/sys/devices/system/cpu/cpufreq/boost.

Addresses: https://github.com/karelzak/util-linux/issues/755
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-15 13:37:51 +01:00
Karel Zak 2648be66d2 tests: add missing ts_check_test_command call
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-05 13:56:33 +01:00
Karel Zak 7c90efa384 tests: add --noskip-commands
The default is SKIP missing commands on --use-system-commands, but
with --noskip-commands the test will FAIL.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-05 11:06:41 +01:00
Karel Zak bb872a239c tests: add missing TS_CMD_UMOUNT check
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-04 17:32:03 +01:00
Karel Zak 2fadcded53 tests: (kill) do not use shell build-in
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-04 17:28:15 +01:00
Karel Zak 43b4a4d3c7 tests: add --use-system-commands
This change allows to use commands from $PATH rather than from
$top_builddir. There two basic use cases:

* check differences between installed and git version
  run.sh --use-system-command --show-diff

* check system binaries by upstream tests (for example tests from
  src.rpm package)

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-04 17:14:12 +01:00
Karel Zak 19e00ec9e9 tests: add missing ts_check_test_command calls
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-04 16:42:30 +01:00
Karel Zak 3cd5e33b5c Merge branch 'evelu-epyc' of https://github.com/ErwanAliasr1/util-linux
* 'evelu-epyc' of https://github.com/ErwanAliasr1/util-linux:
  test: Adding AMD EPYC 7451 24-Core Processor
2019-03-04 11:46:16 +01:00
Karel Zak 09fc947089 tests: make sure TS_HELPER_MBSENCODE compiled
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-03-01 15:04:54 +01:00
Karel Zak 777c159353 tests: use subtests in fdisk/mbr-nondos-mode
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-02-27 12:22:33 +01:00
Karel Zak ca614ef8c7 tests: add fdisk (dos) first sector dialog test
The test verifies that the "First sector" dialog offers relevant range
in the begin of the device if the end of the device is already used.

Signed-off-by: Karel Zak <kzak@redhat.com>
2019-02-27 12:03:28 +01:00
Erwan Velu b24c7d585d test: Adding AMD EPYC 7451 24-Core Processor
This cpu is massively numa and have interesting cache organization.
This will be useful to test & implement issue #663

Signed-off-by: Erwan Velu <e.velu@criteo.com>
2019-02-27 10:16:27 +01:00
Karel Zak 911e694528 libmount: add mnt_table_{find,insert,move}_fs()
Add functions to insert FS into table to specified position and to
move FS between two tables.

Co-Author: Tim Hildering <hilderingt@posteo.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-02-21 13:49:39 +01:00
Karel Zak f920f73d83 tests: update fdisk outputs
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-02-12 14:22:49 +01:00
Karel Zak 3b9dc305ee tests: (hardlink) update noregex
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-02-11 14:53:51 +01:00
Karel Zak 5c8f6fce22 tests: (hardlink) update summary output
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-02-11 10:37:42 +01:00
Karel Zak 117f4d8bf4 Merge branch 'hardlink' of https://github.com/rudimeier/util-linux into hardlink
* 'hardlink' of https://github.com/rudimeier/util-linux: (25 commits)
  hardlink: add first simple tests
  hardlink: util-linux usage
  hardlink: fix compiler warnings
  hardlink: style indentations and license header
  hardlink: enable build with and without pcre2
  fixes for the fixes
  temporal fix before re-patch (updates from Fedora repo)
  Update hardlink.1
  Fixed version number, added changelog about Todd Lewis' patch
  exclude files via pcre
  Fixed 32 bit build with gcc7 (RH Bugzilla ID 1422989)
  spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); update FSF address at .c source file
  Revert "spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); current FSF address at .c source file"
  spec file reflects the atomic hardlinking patch; removed cleaning buildroot (redundant); current FSF address at .c source file
  Mention -f option in the man page
  do not allow to hardlink files across filesystems by default (#786719) (use -f option to override)
  fix possible buffer overflows, integer overflows, update man page
  fix URL and remove mmap() (#676962, #672917)
  - update docs to describe highest verbosity -vv option (#210816) - use dist Resolves: 210816
  mostly spec cleanup
  ...
2019-02-06 13:55:20 +01:00
Karel Zak cc06250f11 col: improve error message, update regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2019-02-05 18:07:26 +01:00
Kenneth Van Alstyne 36b0530e12 Removed BlueStore VERSION information as it is gibberish 2018-12-17 20:21:32 -06:00
Kenneth Van Alstyne c011711ad6 Updated BlueStore expected result 2018-12-17 12:07:14 -06:00
Kenneth Van Alstyne 6032c9f1f8 Added BlueStore test image 2018-12-17 11:05:24 -06:00
Karel Zak 9e07672bb9 tests: check for tar and {b,g}zip
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-12-11 11:44:48 +01:00
Karel Zak 0d79f5805f tests: make lsns-netnsid portable
It seems ip(8) link-show command does not provide link-netnsid in all
cases (versions ?). Let's try to use "ip netns list-id" as fallback.

This commit also add possibility to debug the script by $LOG variable.

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-30 12:24:15 +01:00
Karel Zak 7174b93dfd tests: enlarge backing file for fstab-btrfs
It seems the new limit for Btrfs is 47MiB.

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-11-30 12:22:48 +01:00
Roland Kammerer 627a0efa75 tests: add test images for drbd v08/v09
This adds DRBD meta data images for DRBD versions 8 and 9, as well as
the according expected output.

Signed-off-by: Roland Kammerer <roland.kammerer@linbit.com>
2018-11-29 10:35:25 +01:00
Ruediger Meier bd0be5e02a hardlink: add first simple tests
The test still fails without pcre2 and may also make problems on
exotic file systems.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-11-15 21:26:14 +01:00
Thomas Deutschmann 8f93c8c71d
tests: run oids test only when uuidgen tool was built
oids test did not check if uuidgen was available.

oids test was also calling uuidgen from PATH which could result
in wrong results if uuidgen from a previous util-linux installation
was used.

With this commit we will check if uuidgen was built and make sure
that we only call the uuidgen binary we just built. If uuidgen is
not available we will skip this test.
2018-11-11 02:18:25 +01:00
Karel Zak 99c92a4820 tests: add choom to build-sys test
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-09-24 11:37:13 +02:00
Karel Zak a1b463d94a tests: update sfdisk resize
due to 2f35c1ead6

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-09-17 16:22:14 +02:00
Karel Zak 7edaf221d6 test: update UUID v5 tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-08-31 12:48:46 +02:00
Karel Zak 1e3bc261d0 tests: update fdisk output
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-08-30 15:24:41 +02:00
Karel Zak 11159cca21 tests: add column --table-empty-lines test
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-08-23 13:41:05 +02:00
Karel Zak f2538b6a86 tests: add cal --span tests
Addresses: https://github.com/karelzak/util-linux/issues/677
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-08-07 11:06:13 +02:00
Karel Zak 549281cb87 tests: check for test_cal
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-08-07 10:59:06 +02:00
Karel Zak c6789d37ea tests: update lscpu tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-08-01 12:09:09 +02:00
Karel Zak d68588b0c6 tests: update fdisk dialogs
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-07-31 15:20:55 +02:00
Karel Zak 690fa00b6c tests: add mountinfo with empty source
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-07-10 14:04:09 +02:00
Karel Zak 91d28f5986 tests: add simple LVM lsblk dump
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak d6d24dda29 tests: add simple ATA and NVME lsblk dump
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak 314adce668 tests: add lsblk test script
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak 8ab664a77e tests: add simple & stupid script to generate lsblk /sys and /proc dump
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-21 13:19:28 +02:00
Karel Zak 641af90dce tests: add empty column test
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-06-04 15:27:54 +02:00
Sami Kerola 4520caa11e tests: move stderr redirection out from test expression
Fix shellcheck error.

if ! [ "$paraller_jobs" -ge 0 2>/dev/null ]; then
^-- SC1009: The mentioned parser error was in this if expression.
     ^-- SC1073: Couldn't parse this test expression.
                              ^-- SC1072: Expected test to end here (don't
                                  wrap commands in []/[[]]). Fix any
                                  mentioned problems and try again.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2018-05-28 13:36:38 +02:00
Pali Rohár 4c837d4ffe libblkid: udf: Fix reporting UDF 2.60 revision
According to the UDF 2.60 specification, the Minimum UDF Read Revision
value shall be at most #0250 for all media with a UDF 2.60 file system.

So in this case use Minimum UDF Write Revision as ID_FS_VERSION to
distinguish between UDF 2.50 and UDF 2.60 discs.

This commit also adds a testing Blu-Ray Recordable image with UDF revision
2.60 created by Nero which really sets Minimum UDF Read Revision to 2.50.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
2018-05-25 17:52:31 +02:00
Karel Zak aa4e132f57 tests: update script done messages
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-05-14 13:54:41 +02:00
Karel Zak 400c1c574b tests: update script headers
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-05-14 12:57:39 +02:00
Karel Zak 4dfdb1b143 tests: remove debug stuff from ts/script/options
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-05-14 11:56:46 +02:00
Fred Mora aefe989338 script: add the -o/--output-limit option. Fix race test.
When script is used on a host with a relatively small free disk space, it
is sometimes desirable to limit the size of the captured output. This
can now be enforced with the --output-limit option.

The --output-limit option lets the user specify a maximum size. The program
uses the size parsing from strutils and thus supports the usual
multiplicative suffixes (kiB, KB, MiB, MB, etc.). After the specified
number of bytes have been written to the output file, the script program
will terminate the child process.

Due to buffering, the size of the output file might exceed the specified
limit. This limit also does not include the start and done messages.

The race test was throwing an error dur to a variable being "" in some cases.
Quoting the variable in the equal test took care of that test.

[kzak@redhat.com: - use done() to stop script
                  - count also timing file
                  - remove unnamed member initialization in ctl struct
                  - add to bash-completion]

Signed-off-by: Fred Mora <fmora@datto.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-05-14 11:32:23 +02:00
Karel Zak 6156e12972 tests: update sfdisk JSON output
References: d881b77331
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-04-06 13:39:35 +02:00
Karel Zak 704f9ba6e6 lsmem: improve JSON output
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-04-05 12:14:46 +02:00
Karel Zak a40c12837f tests: update JSON outputs
It does not contains extra space after ":" separator anymore.

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-04-04 14:22:04 +02:00
Karel Zak 5c25aca67a tests: remove namei(1) failed lstat test
The strerror() output is is nothing stable and may be different on
another systems. It would be possible to use sed(1) to unify the
output, but it seems overkill in this case.

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-03-27 14:21:46 +02:00
Karel Zak 04060bc3f1 Merge branch 'master' of https://github.com/pali/util-linux
* 'master' of https://github.com/pali/util-linux:
  tests: Add tests for FAT32 labels
  blkid: Encode any field which starts with LABEL in same way as LABEL field
  libblkid: vfat: Change parsing label in special cases
2018-03-27 12:54:53 +02:00
Karel Zak dfffcf0cd3 tests: update column(1) space-separator test
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-03-27 11:52:54 +02:00
Karel Zak 651c5d428c column: fix leading space characters bug
The bug has been introduced during column(1) rewrite. The function
read_input() need to skip leading space only temporary to detect empty
lines, but the rest of the code has to use the original buffer (line).
I've tried to fix one of the symptoms by 5c7b67fbbf
(alter), but this solution is unnecessary and too complex.

Changes:

* don't ignore leading space
* remove unnecessary stuff introduced by 5c7b67fbbf
* fix regression test with incorrect separator

Addresses: https://github.com/karelzak/util-linux/issues/575
Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1560283
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-03-27 10:55:27 +02:00
Karel Zak 51684b312e tests: use libtool to execute with valgrind
The libtool based build system uses scripts rather than real binaries
in $top_builddir. It's necessary to use libtool --mode=execute to call
valgrind for the real binary (from .libs/).

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-03-21 12:23:22 +01:00
Karel Zak 5a2b7739b0 tests: update lsmem
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-03-20 19:06:22 +01:00
Karel Zak 6ffdfda846 tests: add /proc/swaps libmount parser test
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-03-20 13:34:31 +01:00
Ruediger Meier 9ca02cf52d tests: consolidate ts_device_has UUID or LABEL
Regarding parallel root checks ...

 - fix: add a few missing "udevadm settle" where we are using LABELs or UUIDs

 - introduce ts_udevadm_settle():
    * Still trivial implementation. The idea is to use it in future for all
      tests instead of directly calling "udevadm settle". So we could add debug
      messages, wait for specific events, add code for non-udev systems or even
      use "udevadm --{start,stop}-exec-queue" to be really sure what we are
      doing and why using udevadm at all.
    * The currently unused args may be used in future and show the code reader
      already now why we are calling "udevadm settle" at all.
    * So far this patch only affects swapon/, mount/, libmount/ tests, and is
      only about UUIDs and LABELs, but may be continued later for "partitions",
      "md devices", whatever.
    * We are calling ts_udevadm_settle() right *before* we need a LABEL or
      UUID, not just *after* we created one. This may be a bit better for
      speed and shows the code reader which command would fail without settle.

 - function ts_device_has_uuid() is unused now, we trust blkid(1). Renamed to
   ts_is_uuid() in case we would need it again.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-19 11:46:11 +01:00
Ruediger Meier ec182d8b9d tests: fix grep expressions for devices
ts_is_mounted "/dev/loop1" returned true if /dev/loop17 was
mounted. A very annoying source of sporadic failures since
many years. This issue became more visible since running the
checks in parallel, which increases the probability to get
bigger loop device numbers.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-19 11:46:11 +01:00
Ruediger Meier 07b1ea7c44 tests: handle xargs errors and invalid args
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-19 11:46:11 +01:00
Ruediger Meier a2db0b1aae tests: add ipcslimits lock
These two tests conflict. Interestingly, this is our first lock for
a non-root check.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-09 09:57:23 +01:00
Ruediger Meier c16590f2ee tests: fix losetup race
Also avoid some "no-reentrant" tests.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-09 09:57:23 +01:00
Ruediger Meier 539b0b09ea tests: re-introduce bash 3 compatibility (OSX)
Bash 4 is now almost 10 years old and it seemed to be fine in 613a337e
to use associative arrays. Unfortunately OSX will probably never update
to 4 because of GPLv3. We don't want to lose our travis OSX build and
use plain arrays again.

BTW remove that "informative warnings" about unlocked resources. They
were only silent so far because of a bug. Any system where scsi_debug
is broken would print a lot of these warnings. This also tells us that
we could even stop calling ts_unlock() explicitly. Just exiting the
tests would be good enough.

Note that currently flock(1) is not available on our OSX build anyways.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-08 12:04:44 +01:00
Ruediger Meier 5917d17f0d travis: use parallel root checks
Also improve CPU count detection for tests.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-07 20:49:25 +01:00
Ruediger Meier 55a680c17f tests: dont't timeout flock
The only situation where we would block endless is if another parallel test
has the lock and hangs for another reason. This means that the other test
would still keep hanging even if we timeout here. The user would have to
interrupt the other test or the whole test-suite anyways.

Note that we would certainly run into any timeout when using --parallel=200,
so that all scsi tests start the same time.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-07 19:12:54 +01:00
Ruediger Meier b0d9114a61 tests: don't use unlocked resources
The test-suite did not survive when flock timeouts after 30s because
then ts_cleanup_on_exit() may use resources (e.g. rmmod scsi_debug)
while not having the lock.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-07 19:11:36 +01:00
Ruediger Meier 613a337ed4 tests: don't lock fd 1 (stdout), don't use /proc/$$/fd
On debian-kfreebsd we've locked stdout which messed up our test logs. Using
/proc/*/fd/ is not portable. Even ts_init's test for "/proc/self/fd"
does not help because /proc/*/fd behaves strange here:

  $ ls -l  /proc/$$/fd
  lr--r--r-- 1 rudi user 0 Mar  6 23:11 /proc/2194/fd -> unknown
  $ file /proc/$$/fd
  /proc/2194/fd: broken symbolic link to `unknown'
  ## wtf?
  $ test -d /proc/$$/fd; echo $?
  0
  $ ls -l  /proc/$$/fd/
  ls: cannot access /proc/2194/fd/: No such file or directory
  ## but
  $ ls -l  /proc/self/fd/
  total 0
  cr-xr-xr-x 1 root root 0, 3 Mar  6 19:39 0
  cr-xr-xr-x 1 root root 0, 4 Mar  6 19:39 1
  cr-xr-xr-x 1 root root 0, 5 Mar  6 19:39 2
  cr-xr-xr-x 1 root root 0, 6 Mar  6 19:39 3

This is how this patch changes the test output:

[...]
         blkid: partitions probing: [06] sgi                  ... OK
         blkid: partitions probing: [07] sun                  ... OK
         blkid: partitions probing                            ... OK (all 7 sub-tests PASSED)
-ls: cannot access /proc/66215/fd/: No such file or directory
+        blkid: mbr-wholedisk                                 ... SKIPPED (missing scsi_debug module (dry-run))
         blkid: MD raid0 (whole-disks)                        ... SKIPPED (losetup not found)
         blkid: MD raid1 (last partition)                     ... SKIPPED (missing in PATH: mdadm)
         blkid: MD raid1 (whole-disks)                        ... SKIPPED (losetup not found)
@@ -343,11 +343,11 @@
         dmesg: facilities                                    ... SKIPPED (test_dmesg not found)
         dmesg: indentation                                   ... SKIPPED (test_dmesg not found)
         eject: umount                                        ... SKIPPED (eject not found)
-ls: cannot access /proc/69561/fd/: No such file or directory
-ls: cannot access /proc/69609/fd/: No such file or directory
+        fdisk: align 512/4K                                  ... SKIPPED (missing scsi_debug module (dry-run))
+        fdisk: align 512/4K +alignment_offset                ... SKIPPED (missing scsi_debug module (dry-run))
         fdisk: align 512/4K +MD                              ... SKIPPED (missing in PATH: mdadm)
         fdisk: align 512/512                                 ... SKIPPED (losetup not found)
[...]

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-07 18:41:04 +01:00
Ruediger Meier aa00f7441d tests: add wierd sleep for libmount/context
I still don't understand why this helps to fix these tests on my system.
udevadm settle had no positive effect. Adding the sleeps before
"is_mounted" also didn't fixed that, that's amazing!?

Below the test log, very often seen on my system since a long time:

-------------------- util-linux regression tests --------------------

                    For development purpose only.
                 Don't execute on production system!

       kernel: 4.4.104-39-default

     libmount: context: [01] mount-by-devname                ... OK
     libmount: context: [02] umount-by-devname               ... OK
     libmount: context: [03] mount-by-label                  ... OK
     libmount: context: [04] umount-by-mountpoint            ... OK
     libmount: context: [05] mount-by-uuid                   ... FAILED (libmount/context-mount-by-uuid)
     libmount: context: [06] mount-flags                     ... FAILED (libmount/context-mount-flags)
     libmount: context: [07] mount-loopdev                   ... OK
     libmount: context: [08] x-mount.mkdir                   ... OK
     libmount: context: [09] X-mount.mkdir                   ... OK
     libmount: context                                       ... FAILED (2 from 9 sub-tests)

---------------------------------------------------------------------
  1 tests of 17 FAILED
---------------------------------------------------------------------

rudi@zappa:~/devel/util-linux/build> cat tests/diff/libmount/context-mount-by-uuid
--- /home/rudi/devel/util-linux/tests/expected/libmount/context-mount-by-uuid   2017-07-03 12:20:24.144845538 +0200
+++ /home/rudi/devel/util-linux/build/tests/output/libmount/context-mount-by-uuid       2018-01-24 00:42:18.549444408 +0100
@@ -1,2 +1,3 @@
 successfully mounted
-successfully umounted
+failed to umount
+FAILED [rc=16]/dev/sdb1 still mounted

rudi@zappa:~/devel/util-linux/build> cat tests/diff/libmount/context-mount-flags
--- /home/rudi/devel/util-linux/tests/expected/libmount/context-mount-flags     2017-07-03 12:20:24.148845497 +0200
+++ /home/rudi/devel/util-linux/build/tests/output/libmount/context-mount-flags 2018-01-24 00:42:18.725442931 +0100
@@ -1,5 +1,5 @@
+test_mount_context: failed to mount: Device or resource busy
+FAILED [rc=16]rw,relatime
 successfully mounted
-ro,nosuid,noexec
-successfully mounted
-rw,nosuid,noexec
+rw,relatime
 successfully umounted

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-07 18:36:17 +01:00
Ruediger Meier 80ea6e24f3 tests: add some more udevadm settle
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-07 18:36:11 +01:00
Ruediger Meier eb10dbc159 uuidd: don't truncate long socket paths
This was the error
  uuidd: couldn't bind unix socket /var/tmp/portage/sys-apps/util-linux-2.31.1/work/util-linux-2.31.1-abi_x86_64.amd64/tests/output/uuid/uuiddkOcTUuoZ7kaP3: Address already in use

because the socket path was truncated to 108 chars which was luckily
an existing directory.

Now we abort early with "uuidd: socket name too long: ... "

Reported-by: Thomas Deutschmann <whissi@gentoo.org>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-03-07 11:50:05 +01:00
Ruediger Meier 7eb1320bf7 tests: use pgrep instead of ps --ppid ...
The usage looks a bit cleaner, and I guess that pgrep(1) is available
on the same machines where "ps --ppid" would work (procps-ng).

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-02-16 11:20:42 +01:00
Ruediger Meier 73afd3f8e8 misc: fix typos using codespell
Some more funny typos, please review carefully.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-02-16 11:12:52 +01:00
Ruediger Meier 497a261ada tests: add udevadm settle to sfdisk/resize
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-02-15 21:32:15 +01:00
Karel Zak 3289bd6eef tests: update build-sys tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-13 10:42:44 +01:00
Karel Zak 1800de76ba tests: column(1) test for space-char separator
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-12 14:19:47 +01:00
Karel Zak f2c3c3a14f tests: column(1) test non-space separator at begin of line
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-12 14:14:50 +01:00
Karel Zak 73f617ca63 tests: add mpool blkid test image
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-05 11:58:09 +01:00
Karel Zak f3932a6bb5 tests: rewrite cal(1) bigyear test
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-02 10:31:24 +01:00
Karel Zak 22db7b5132 tests: use TS_HELPER_CAL
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-02 10:16:27 +01:00
Karel Zak 7895231321 tests: update setarch test
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-02-01 16:53:45 +01:00
Karel Zak 9a84ecc0d8 Merge branch 'libblkid-atari' of https://github.com/yontalcar/util-linux
* 'libblkid-atari' of https://github.com/yontalcar/util-linux:
  libblkid: atari - reject devices with blocksize != 512
  libblkid: atari - don't add duplicate entries
  libblkid: atari - test if any partition fits disk size
  tests: added missing expected outputs for partx (atari)
  libblkid: atari - fix bad variable name
  tests: added test for libblkid atari pt
  libblkid: Support for Atari partitioning scheme
2018-01-31 11:08:06 +01:00
Karel Zak 900d77e419 tests: update cal(1) tests
* remove extra space after year output
	f066c107ce

* don't print blank space behind last char on row
	8315a2ff15

* print just specified number of month for -1, -3 and -n
        2bcf8f7934

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-01-30 16:19:14 +01:00
Ruediger Meier 839203c00e tests: fix fincore/count KNOWN_FAIL
It has to be set after calling ts_init.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-01-24 12:53:35 +01:00
root 20432749c1 tests: suppress warning for old sync(1)
Old sync(1) prints a warning which looks ugly among our
test output: "sync: ignoring all arguments"

Seen on travis, Ubuntu <= 14.04 (Trusty).

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-01-24 12:53:35 +01:00
Ruediger Meier c990f94cbc tests: rewrite fsck-bad-header
Fix test for systems with pagesize != 4096
Loop over many combinations of sizes, endianness and blocksizes.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-01-24 12:53:33 +01:00
Ruediger Meier 2374b1ab75 fsck.cramfs: fix crash when superblock size is too small
This hopefully fixes the original problem addressed by the reverted
patch 7cb962c7.

The bug was introduced by myself in
    f991dbd3 "fsck.cramfs: allow smaller superblock sizes"

CC: Tobias Stoeckmann <tobias@stoeckmann.org>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2018-01-24 12:53:31 +01:00
Vaclav Dolezal 8273ef25fa tests: added missing expected outputs for partx (atari)
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
2018-01-24 12:20:11 +01:00
Vaclav Dolezal 8326045ace tests: added test for libblkid atari pt
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
2018-01-23 17:02:41 +01:00
Karel Zak c0b340bc99 tests: use subtests for weeknum cal(1) tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-01-22 17:09:25 +01:00
Karel Zak 940b55ac4b tests: use subtests for weekarg cal(1) tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-01-22 16:55:07 +01:00
Karel Zak 1b1f6f2511 test: use subtests for jan1753 cal(1) test
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-01-22 16:54:06 +01:00
Karel Zak 5b9138d952 tests: merge year cal(1) tests
* merge tests
* use subtests for cal(1) calls

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-01-22 16:01:14 +01:00
Karel Zak b0636cc11a tests: merge 1m and 3m cal(1) tests
* merge tests
* use subtests for cal(1) calls

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-01-22 16:01:06 +01:00
Karel Zak a88564a061 tests: merge sep1752 cal(1) tests
* merge tests
* use subtests for cal(1) calls

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-01-22 16:00:39 +01:00
Karel Zak 5c8324fb88 tests: use subtests for sep1752w test
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-01-22 15:01:05 +01:00
Karel Zak c24a4de605 tests: simplify cal(1) sep1752w test
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-01-22 14:44:40 +01:00
Karel Zak fbb94f5790 tests: add cal(1) --week=40 1752
Signed-off-by: Karel Zak <kzak@redhat.com>
2018-01-22 14:26:39 +01:00
Riku Voipio 744d62ee0c lscpu: Decode ARM CPUs
Since the kernel developers have refused to make /proc/cpuinfo user
understandable, implement mapping in userspace. lscpu is available for
most users via util-linux, so store the information here.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
2018-01-19 17:14:19 +02:00
Karel Zak 88e5d289d5 tests: mark fincore/count as KNOWN_FAIL
The test (or our expectations about Direct-IO) seems not robust
enough. I guess this is not fincore problem.

Signed-off-by: Karel Zak <kzak@redhat.com>
2018-01-17 14:52:17 +01:00
Vaclav Dolezal fb178a04af tests: mark mbsencode as KNOWN_FAIL
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
2018-01-11 14:19:23 +01:00
Vaclav Dolezal 8326119ad1 tests: mbsencode - test for HAVE_WIDECHAR
Test only safe-ascii as it should behave in the same way.

Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
2018-01-11 11:11:31 +01:00
Vaclav Dolezal 910a879f3d tests: mbsencode - removed emoji, added control unicode character
Emojis are apparently too recent to be reliably recognised as printable
on test machines.

Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
2018-01-11 10:38:43 +01:00
Vaclav Dolezal cad13ba344 tests: add tests for encode functions from lib/mbsalign.c
Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
2018-01-10 17:40:53 +01:00
Karel Zak 03700127a7 tests: don't use mount.<type> helpers in mount-by-pattern tests
The test behavior is fragile if depends on external helpers. Let's
keep it based on mount(2) only. The test will be faster too.

Note that "mount -t <pattern>" does not behaviour as expected with
helpers. We need to try another helper if the current one ends with
status=1 (waitpid()). Now it returns status from the first helper.

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-19 13:51:12 +01:00
Karel Zak 68452bb568 tests: update libsmartcols/title
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-13 12:57:22 +01:00
Karel Zak 42dea85c5a lib/md5: use ul_/UL_ prefix
The symbols names are too generic.

Addresses: https://github.com/karelzak/util-linux/issues/548
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-12 12:06:15 +01:00
Karel Zak b4db227582 test_sha1: update helper
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-12 11:38:17 +01:00
Karel Zak 44d753407d tests: unlocks on failed ts_scsi_debug_init
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-07 15:08:29 +01:00
Karel Zak 9212134d53 tests: don't call tests with races in --parallel
Some of the tests have a race by design (=wanted).

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-07 14:41:49 +01:00
Karel Zak 7acd4b463a tests: support multiple locks
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-07 14:41:08 +01:00
Karel Zak f1254fae6d tests: add mdadm locks
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-07 12:31:41 +01:00
Sweet Tea Dorminy 6418cba457 libblkid: Add VDO superblock information into blkid
[kzak@redhat.com: - add tests/expected/blkid/low-probe-vdo
                  - enlarge the image (must be > 1024)]

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-07 12:11:32 +01:00
Karel Zak e140506af3 tests: use flock to modify fstab
Note that for btrfs test we need to use low-level ts_fstab_addline,
because we add multiple lines there.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-06 15:55:09 +01:00
Karel Zak 9deb8c7dfd tests: add lock on shared resources (e.g. scsi_debug)
The patch enables flock for scsi_debug to avoid collision between
tests. The patch also adds ./run.sh --nolocks to disable this feature.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-12-06 14:21:38 +01:00
Sami Kerola 378d58abb1 rename: use access(3) to check if a file exists
This is more lightweight than calling stat(3).  In same go add a regression
test to ensure changes like this will not break --no-overwrite option.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-12-04 13:04:12 +01:00
Karel Zak 57358f50f3 tests: check for HAVE_LINUX_NET_NAMESPACE_H
* use one cleanup function
* check if kernel headers support net namespace
* enable netnsid test

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-28 13:19:20 +01:00
Karel Zak 68433f1e31 tests: add set-x to lsns test
.. just to see why does it fail on Travis.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-28 12:00:58 +01:00
Karel Zak 29f966a57b tests: better lsns report on fail
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-28 11:17:18 +01:00
Karel Zak c3487d5955 tests: make lsns test more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-28 10:58:37 +01:00
Karel Zak 5a0d3030ca tests: fix lsns perms
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-27 17:33:28 +01:00
Masatake YAMATO 94d4ccd7a2 lsns: add a case for testing nsfs column
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2017-11-27 15:54:57 +01:00
Masatake YAMATO 5d075a7828 lsns: add a case for testing netnsid column
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2017-11-27 15:54:54 +01:00
Pali Rohár 6687cfded9 tests: Add tests for FAT32 labels
These FAT32 images were generated for FAT label test suite in October 2017.
Now blkid reports same FAT32 label as MS-DOS 6, 7 and Windows 98, XP, 10.

For more information about test result see email:
https://www.spinics.net/lists/kernel/msg2640891.html

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
2017-11-25 12:49:27 +01:00
Karel Zak 07b447d473 tests: allow to use memory checks for libsmartcols
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-23 15:24:36 +01:00
Karel Zak b97cc9a829 build-sys: add --enable-asan and --memcheck-asan for tests
The command ./configure --enable-asan adds -fsanitize=address
to the compiler command line. In the regression tests leaks detection
is disabled by default. You have to use --memcheck-asan on test
command line to enable.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-23 14:59:05 +01:00
Karel Zak d3f58f8aee tests: rename --memcheck to --memcheck-valgrind
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-23 14:03:23 +01:00
Karel Zak 02ae505fd4 tests: rename ts_valgrind to ts_run
Let's make our tests more generic, so we can later hide more stuff
into ts_run call.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-23 13:44:53 +01:00
Karel Zak afeb646550 tests: update columns test due to dda229c7b2
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-22 17:16:21 +01:00
Pali Rohár 3999e62a72 libblkid: udf: Fix parsing UDF revision
UDF revision is stored as decimal number in hexadecimal format.
E.g. number 0x0150 is revision 1.50, number 0x0201 is revision 2.01.

Apparently all UDF test images have number which has same representation in
decimal and hexadecimal format, so problem was not detected.

This patch adds new test image with UDF revision 1.50. Internally number is
stored as 0x0150. In decimal format it is (incorrectly) 1.80, but in
hexadecimal correct 1.50.

$ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-8.img bs=1M count=10
$ mkudffs -r 0x150 -b 512 udf-hdd-mkudffs-1.3-8.img

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
2017-11-20 18:16:59 +01:00
Pali Rohár 2f6184ca2c tests: Add UDF cd image created by mkudfiso 20100208
$ mkudfiso -v "Volume Label" . | tail -n +2 > udf-cd-mkudfiso-20100208.img

mkudfiso 20100208 creates UDF images without valid LVID (and LVIDIU), so it
is a good candidate for testing fallback code for ID_FS_VERSION.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
2017-11-16 19:45:16 +01:00
Karel Zak 7ee921edbe tests: GPT device resize test
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-14 15:40:09 +01:00
Karel Zak e1b5a57f43 Merge branch '170925' of github.com:jwpi/util-linux
* '170925' of github.com:jwpi/util-linux:
  tests: adjust for ISO timezone colon use
  lib/timeutils: add common ISO timestamp masks
  lib/timeutils: add get_gmtoff()
  lib/timeutils: ISO_8601_BUFSIZ too small
  hwclock: add iso-8601 overflow check
2017-11-13 16:25:21 +01:00
Karel Zak cfcbf7526a Merge branch 'udf' of https://github.com/pali/util-linux
* 'udf' of https://github.com/pali/util-linux:
  test: Add UDF hdd image with final block size 4096 created by Linux mkudffs 1.3
  libblkid: udf: Optimize and fix probing when block size > 2048 bytes
2017-11-13 12:32:03 +01:00
Pali Rohár 99777b8d11 test: Add UDF hdd image with final block size 4096 created by Linux mkudffs 1.3
$ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-7.img bs=1M count=10
$ mkudffs -l Label512 -b 512 udf-hdd-mkudffs-1.3-7.img
$ mkudffs -l Label4096 -b 4096 udf-hdd-mkudffs-1.3-7.img

Image file was first formatted with block size 512 and then reformatted
with block size 4096. Volume Recognition Sequence was overwritten and every
Volume Structure Descriptor is now 4096 bytes long. Trying to read second
VSD as 2048 bytes long will fail because 4069 bytes long VSD is padded with
zeros. To verify that image file was properly detected, it should have
label "Label4096" and not "Label512".
2017-11-12 22:05:15 +01:00
J William Piggott 948e8d4349 tests: adjust for ISO timezone colon use
Fix several tests broken by adding a timezone colon in the
timeutils ISO format functions.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
2017-11-12 09:08:43 -05:00
Pali Rohár e526f50391 libblkid: vfat: Fix reading labels which starts with byte 0x05
When FAT directory entry has leading byte 0x05 it is interpreted as byte
0xE5. This is how FAT stores file name which starts with byte 0xE5 as
leading byte in 0xE5 in FAT directory entry means that file slot is empty.

Fixes: #533
2017-11-09 19:03:34 +01:00
Karel Zak b412e860b5 tests: update default lsmem output
The commit 96cbe362c0 forces lsmem to
follow output column for split policy.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-03 19:19:21 +01:00
Karel Zak bf9c4948f1 tests: add fsck.cramfs bad-header test
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-11-02 14:25:05 +01:00
Milan Broz 9ffd0bd661 tests: add LUKS test images
Testing image contains only the first 4k sector, so it is not valid,
but for blkid it should be enough.

Signed-off-by: Milan Broz <gmazyland@gmail.com>
2017-10-24 12:44:53 +02:00
Karel Zak c774252a46 tests: update lsmem
* add --split

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-10-20 14:33:47 +02:00
Gerald Schaefer 0a4320f5e7 tests/lsmem: update lsmem test with ZONES column
The existing s390 and x86_64 dumps already contain the valid_zones sysfs
attribute, so just add a new "lsmem -o +ZONES" test command and update
the expected results.

Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
2017-10-20 12:37:04 +02:00
Karel Zak d6ff49896f tests: update build-sys tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-09-19 13:59:17 +02:00
Philip Prindeville c6f1ec68a8 uuidgen: add support for hash-based UUIDs
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-09-05 11:56:24 +02:00
Philip Prindeville b443c1779e misc: replace magic number 37 with UUID_STR_LEN
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
2017-09-05 11:49:21 +02:00
Philip Prindeville 0047626887 libuuid: add support for hash-based UUIDs
Adding V3 and V5 UUIDs per RFC-4122.

[kzak@redhat.com: - fix symbols file]

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-09-05 11:26:39 +02:00
Karel Zak 58d57ae2d8 tests: update sfdisk wipe test
Now command wipefs returns results in the order how superblocks has
been detected on the device.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-09-01 10:42:51 +02:00
Karel Zak c1154128db fdisk: fix readline interaction with signals
The high-level readline API is crazy to use with signals. Fortunately
the library provides low-level rl_callback_* API. In this case we can
use poll() to wait for input and control all signals, etc.

This patch also a little changes fdisk behavior on CTRL+C and CTRL+D.
The signals does not kill fdisk, but forces fdisk to return to the
main menu, if already in the main menu then exit. If the disk layout
has been modified than ask "Do you really want to exit...".

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-08-24 15:48:46 +02:00
Karel Zak 6a2c5b572c Merge branch 'blkid-ubi' 2017-08-07 10:00:34 +02:00
Sami Kerola 8cfbd35048
uuidparse: nil uuid have all bits set to zero
The nil UUID is special form of UUID that is specified to have all 128 bits
set to zero.

Reference: https://tools.ietf.org/html/rfc4122#section-4.1.7
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-08-05 09:58:25 +01:00
Karel Zak 1266fcf9cf libblkid: mark UBI as RAID
UBI is volume manager rather than filesystem. Note that libblkid has
optimized RAIDs probing (don't search for another filesystems is RAID
detected). We also don't search for RAIDs on very small devices, but
this optimization is ignored for UBI char devices (size=1byte).

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-08-03 15:31:54 +02:00
Rafał Miłecki a6b1ec864a libblkid: add support for UBI superblock
UBI is a volume management system that can be used on a raw flash
partition for providing multiple logical volumes. Detecting UBI
superblock may be useful for tools wanting to simplify or automate
attaching UBI.

Please note it's not directly related to the ubifs support which is just
a filesystem working on top of UBI volume.

In other words: UBI can be used on MTD partition (e.g. /dev/mtdblock0)
while ubifs can be used on UBI volume (e.g. /dev/ubi0_0).

This patch adds simple code reading UBI version and unique number and
setting it in the blkid_probe.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2017-08-03 14:11:21 +02:00
Karel Zak dd3b72b3e9 libfdisk: add --nopartno to mkpart sample
* disable dialogs for the mkpart sample
* add --nopartno use-case to force libfdisk to use default partno(s)
* add test for this feature

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-08-01 13:51:27 +02:00
Karel Zak 2d9d3ee294 tests: check sfdisk resize on unsorted offsets
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-19 15:34:35 +02:00
Karel Zak ea36907965 libfdisk: support default partno in mkpart-fullspec sample
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-19 12:19:38 +02:00
Karel Zak 8d7370e01c tests: remove UUIDs with time overflow from uuidparse
The time_t used by timeval is "long", it means too small on 32-bits
archs to hold large numbers.

Reported-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-18 10:01:22 +02:00
Karel Zak 98025dea79 test: update PMBR hex dumps
The commit 8ffa3b651d has fixed PMBR
CHS addresses initialization to be more close to UEFI standard.

-000001c0  01 00 ee fe ff ff 01 00  00 00 ff 8f 01 00 00 00
+000001c0  02 00 ee ff ff ff 01 00  00 00 ff 8f 01 00 00 00

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-17 11:36:28 +02:00
Karel Zak 288acb4eee tests: don't use errno in output
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-12 12:34:22 +02:00
Karel Zak 10bba184bb Merge branch 'master' of https://github.com/pali/util-linux
* 'master' of https://github.com/pali/util-linux:
  tests: update UDF test, add ID_FS_VERSION
  libblkid: udf: Add support for ID_FS_VERSION
  libblkid: udf: Fix types
  libblkid: udf: De-duplicate code for dstring decoding
2017-07-11 14:31:23 +02:00
Karel Zak 4a61c960ce tests: use sample-fdisk-mkpart-fullspec
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-11 14:26:33 +02:00
Karel Zak c25a3ecaba tests: check for missing programs in last(1) test
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-11 13:41:22 +02:00
Karel Zak 9e9b1afd39 tests: use sample-fdisk-mkpart
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-07-11 13:33:52 +02:00
Pali Rohár b704c644cb tests: update UDF test, add ID_FS_VERSION 2017-07-05 13:56:05 +02:00
Karel Zak afeb1a8255 tests: explicitly define wipefs outpuit columns
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-06-29 13:31:35 +02:00
Karel Zak 050f8e357b tests: update wipefs outputs
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-06-29 13:07:10 +02:00
Karel Zak 47ccf06b47 Merge branch 'usage-part2' of https://github.com/rudimeier/util-linux
* 'usage-part2' of https://github.com/rudimeier/util-linux:
  misc: cosmetics, remove argument from usage(FILE*)
  misc: cosmetics, remove argument from usage(int)
  misc: never use usage(stderr)
  misc: never use usage(ERROR)
  misc: cleanup and fix --unknownopt issues
  flock, getopt: write --help to stdout and return 0
  tools: add checkusage.sh
2017-06-26 15:58:37 +02:00
Sami Kerola 83893f2678 uuidparse: add new command
This command will analyze and print information about UUID's.  The command
is based on libuuid/src/uuid_time.c but modified to use libsmartcol.

[kzak@redhat.com: - minor coding style changes]

Reference: http://marc.info/?l=util-linux-ng&m=149735980715600&w=2
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-06-26 14:46:35 +02:00
Ruediger Meier 6d7bee26bc flock, getopt: write --help to stdout and return 0
... and use errtryhelp() instead of usage().

Note in past "getopt --help" returned 2. But it is otherwise
documented and was just a mistake IMO. See the unreachable exit(0)
which was removed here: d1d03b54

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-26 14:38:24 +02:00
Pali Rohár 56dce6b7fc tests: Add UDF hdd image which label has length 30 characters
Structure dstring for label has 32 bytes, first byte is 8 (Compression ID),
last byte is 30 (count of 8bit characters in label). Therefore label is not
nul terminated and dstring parser needs to handle it (fixed in previous
commit).

$ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-6.img bs=1M count=10
$ mkudffs -l AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA -b 512 udf-hdd-mkudffs-1.3-6.img
2017-06-22 10:38:24 +02:00
Karel Zak 258e74626d Merge branch 'master' of https://github.com/pali/util-linux
* 'master' of https://github.com/pali/util-linux:
  tests: Add UDF hdd images with blocksize 1024 and 4096 created by Linux mkudffs 1.3
  libblkid: udf: Fix detection of UDF images with block size 1024 and 4096
2017-06-21 11:54:51 +02:00
Karel Zak e0bb63d84c tests: add MBR resize tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-06-19 16:25:46 +02:00
Ruediger Meier fd3c280594 tests: split partx in root and non-root
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-15 08:47:09 +02:00
Ruediger Meier 3a951379a7 tests: fix and refactor partx
Subtest delete-non-existent was broken because since 2d47fa39
option --nr was missing. It wasn't noticed because we did not
check stderr. Now we check all return values and output.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-15 08:46:46 +02:00
Pali Rohár dd3856ffec tests: Add UDF hdd images with blocksize 1024 and 4096 created by Linux mkudffs 1.3
$ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-4.img bs=1M count=10
$ mkudffs -l Label -b 1024 udf-hdd-mkudffs-1.3-4.img

$ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-5.img bs=1M count=10
$ mkudffs -l Label -b 4096 udf-hdd-mkudffs-1.3-5.img
2017-06-14 23:29:03 +02:00
Ruediger Meier bda267627e misc: POSIX usage dd, regarding unit suffixes
In POSIX we have only 'b' and 'k' (case-sensitive).

In the real work, OSX was the only system I've found  which does
not understand capital 'K'.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-14 11:48:22 +02:00
Ruediger Meier 5abaf5b035 tests: add more tests for line(1)
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-14 11:48:22 +02:00
Ruediger Meier b017648ad3 tests: fix fincore, don't use variable COLUMNS
COLUMNS is automatically set by bash and may result in stupid
errors like

  fincore: unknown column: 160

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-14 11:48:22 +02:00
Karel Zak 2a57a232b6 tests: update build-sys test
The libtinfo is enough (and libncurses optional for cal).

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-06-02 12:03:46 +02:00
Ruediger Meier 4fb3fe39de tests: check for timeout command
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-01 11:24:53 +02:00
Ruediger Meier 22edf0a639 Revert "tests: use stdbuf when stderr and stdout is randomly ordered"
stdbuf does not seem to work reliable. Failed on travis/OSX

This reverts commit 398b3148be.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-01 11:24:00 +02:00
Ruediger Meier 4cb6d04aee tests: handle non glibc error message for fallocate
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-01 10:28:14 +02:00
Ruediger Meier 398b3148be tests: use stdbuf when stderr and stdout is randomly ordered
glibc seems to flush stdout before stderr.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-01 10:28:02 +02:00
Ruediger Meier 3936669948 tests: avoid diff of diffs
Certain diff implementations do not produce comparable output.

Noticed on Alpine Linux/busybox.

CC: Sami Kerola <kerolasa@iki.fi>
Reported-by: Assaf Gordon <assafgordon@gmail.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-01 03:16:36 +02:00
Ruediger Meier 036af19fc3 tests: grep's short option -A is more portable
Noticed on Alpine Linux/busybox.

Reported-by: Assaf Gordon <assafgordon@gmail.com>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-06-01 02:58:20 +02:00
Karel Zak d25d453464 tests: check for ps --ppid
Reported-by: Assaf Gordon <assafgordon@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-30 11:19:22 +02:00
Karel Zak bd4f50f044 tests: make /proc optional
Reported-by: Assaf Gordon <assafgordon@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-30 11:03:28 +02:00
Karel Zak cf1e776f1b tests: check for TS_HELPER_SYSINFO in fincore test
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-23 12:10:15 +02:00
Karel Zak 73bb764c3d tests: update build-sys due to readline
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-23 11:39:58 +02:00
Pali Rohár 7f77c5e196 tests: Fix UDF test output after changing UUID algorithm 2017-05-17 20:36:51 +02:00
Pali Rohár 53e318c55f tests: Fix UDF test output for 8bit OSTA Compressed Unicode 2017-05-16 23:52:39 +02:00
Pali Rohár fa903e8f20 tests: Add UDF hdd image with non ASCII 8bit label created by Linux mkudffs 1.3
$ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-3.img bs=1M count=10
$ mkudffs -l 'ÿ' -b 2048 /tmp/udf-hdd-mkudffs-1.3-3.img
2017-05-16 23:52:24 +02:00
Karel Zak ce59d8bfa5 Merge branch 'master' of https://github.com/pali/util-linux
* 'master' of https://github.com/pali/util-linux:
  tests: Add UDF CD-ROM hybrid image (ISO+Joliet+UDF) created by Nero 6
  tests: Fix test output for low-probe-udf to contain UDF data
  Revert "libblkid: Probe UDF volumes for ISO9660 info as well"
2017-05-11 10:59:14 +02:00
Karel Zak 03dd701585 tests: update wipe-partition
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-10 11:26:51 +02:00
Pali Rohár 28f01f7433 tests: Add UDF CD-ROM hybrid image (ISO+Joliet+UDF) created by Nero 6
This image was created by Nero Burning ROM version 6 via option CD-ROM
(UDF/ISO) with UDF version 2.01 and enabled ISO Joliet extension. Moreover
for testing purposes it has set custom Disc label (and also every other
identifier) which is different for ISO, Joiliet and UDF part. It contains
ISO/Joliet/UDF string prefix to distinguish between them.

So reading this image as basic ISO would produce different label as when
reading it as ISO with Joliet image and also different as UDF image.

Windows detects its label as "UDF Label".

Before commit ccfb5b0a1d blkid show label for
this image as "Joliet Label" and after as "UDF Label".

Note that it is not common to have such images with different label stored
in Joliet part and in UDF part. Moreover it is very hard to generate them.
2017-05-05 18:38:15 +02:00
Pali Rohár 5531320087 tests: Fix test output for low-probe-udf to contain UDF data
Label was really not changed because of fix by commit
2f2730bc77.

UUID is different due to fact that ISO image does not have UUID and
libblkid generate one from compilation date. Plus "Joliet Extension" in UDF
context does not make sense.
2017-05-05 18:38:15 +02:00
Karel Zak f3626e039f tests: add new build-sys tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-03 14:33:04 +02:00
Karel Zak c4b6c832b4 testsL update build-sys tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-03 13:36:20 +02:00
Karel Zak 1c9de9dbc8 tests: add tests for new column features
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak 2acfa40ac1 tests: add column(1) table test
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:18:00 +02:00
Karel Zak cee91191ea tests: add column(1) columnate test
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:17:59 +02:00
Karel Zak 4219aa3756 tests: add column/files directory
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-05-02 12:17:59 +02:00
Pali Rohár 20f47eaab5 tests: Add UDF hdd images created by Linux mkudffs 1.3
$ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-1.img bs=1M count=10
$ mkudffs -l Label -b 512 udf-hdd-mkudffs-1.3-1.img

$ dd if=/dev/zero of=udf-hdd-mkudffs-1.3-2.img bs=1M count=10
$ mkudffs -l Label udf-hdd-mkudffs-1.3-2.img
2017-05-01 10:03:08 +02:00
Pali Rohár ee069f5f33 tests: Rename udf-hdd-mkudffs* images to indicate used mkudffs version 2017-05-01 09:32:01 +02:00
Karel Zak a8771daefe tests: update libmount outputs
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-04-28 11:19:59 +02:00
Karel Zak d9f90f697c tests: update script(1) tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-04-18 12:42:58 +02:00
Ruediger Meier 137fae2282 tests: fincore/count, skip unsupported FS
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-04-06 12:30:11 +02:00
Ruediger Meier b9d3db99e1 tests: handle dd errors in fincore/count
On dd error the test will fail earlier and the test diff will be
more useful.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-04-06 12:30:10 +02:00
Ruediger Meier 4a4a617d03 tests: fix fincore/count for PAGE_SIZE != 4096
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-04-06 12:30:09 +02:00
Ruediger Meier 0614fe48bc tests: remove fincore SMALLER_THAN_PAGESIZE tests
These tests failed for example on ext4 with a non-default
blocksize 1024. In this case it seems that the kernel only
caches a full page if we read at least PAGE_SIZE -BLOCK_SIZE +1.

Both tests also failed on NFS allthough block size seems to be
1M there.

We still keep the test for PAGE_SIZE-1 which seems to work more
reliable.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-04-06 12:30:08 +02:00
Karel Zak c8ce2f4cb3 Merge branch 'tailf-removal' of https://github.com/kerolasa/lelux-utiliteetit
* 'tailf-removal' of https://github.com/kerolasa/lelux-utiliteetit:
  tailf: remove deprecated utility
2017-04-04 14:25:37 +02:00
Ruediger Meier 61e29ab44f ipcs: make shmall overflow a bit less worse
Still no large integer support but on overflow we print now
the largest possible value, maybe even the largest one which
makes sense at all.

So on x86_64 systems we'll see now:
$ echo "4503599627370496" > /proc/sys/kernel/shmall
$ ipcs -m -l | grep "max total"
max total shared memory (kbytes) = 18014398509481980

rather than this:
$ ipcs -m -l | grep "max total"
max total shared memory (kbytes) = 0

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-04-03 09:34:38 +02:00
Sami Kerola 70ca1a7772
tailf: remove deprecated utility
March 2017 is gone, it is time to remove this utility as scheduled in
earlier commit, and promised in manual page.

Reference: 3f8478a71c
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-04-02 16:51:00 +01:00
Karel Zak eff2c9a426 tests: add --mountpoint to findmnt calls
... if necessary to make things more robust.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-03-31 14:00:24 +02:00
Ruediger Meier a837b3bdf3 test: fix mountpoint device check in libmount/loop
This test could fail if the build directory is somehow exoticly
mounted (shared bind mounts, symlinks).

CC: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2017-03-31 12:55:23 +02:00
Karel Zak 9877680cae tests: define columns for fincore test
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-03-27 15:13:17 +02:00
Karel Zak 8ea213781d tests: remove status=none dd(1) from fincore
seems dd(1) sucks on travis more than expected:

 dd: invalid status flag: `none'
 Try `dd --help' for more information.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-03-24 13:13:28 +01:00
Karel Zak 958ff57c86 tests: redirect unwanted dd(1) advices to /dev/null
It seems that dd(1) on travis writes unwanted messages to stdout

  dd: you probably want conv=notrunc with oflag=append

and we do not want conv=

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-03-24 12:23:59 +01:00
Karel Zak 3006dd7352 Merge branch '2017wk11' of git://github.com/kerolasa/lelux-utiliteetit
* '2017wk11' of git://github.com/kerolasa/lelux-utiliteetit:
  blkid: add control struct
  blkid: simplify version option handling
  tests: add static keyword where needed [smatch scan]
  tests: do not use plain 0 as NULL [smatch scan]
  libsmartcols: fix test variable shadowing
2017-03-24 11:59:57 +01:00
Karel Zak eef0a92d31 tests: refresh fincore test
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-03-23 15:28:39 +01:00
Masatake YAMATO c1cc045d12 tests: add cases for testing fincore command
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2017-03-23 12:46:40 +01:00
Sami Kerola 41427f97d9
tests: add static keyword where needed [smatch scan]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-03-17 21:22:26 +00:00
Karel Zak 999448d866 tests: refresh lscpu tests
.. due to libsmartcols use for the default output. The output does not
contain extra unnecessary blank space anymore.

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-03-15 11:49:22 +01:00
Karel Zak 34f3469d18 tests: another improvement to the sfdisk wipe test
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-20 13:22:55 +01:00
Karel Zak 1f519a90c1 tests: make sfdisk wipe partition optional
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-17 16:24:35 +01:00
Karel Zak 9dc5644717 tests: (sfdisk) tell kernel about new partition
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-17 10:28:53 +01:00
Karel Zak 99d944bb2d tests: add udevadm settle to sfdisk wipe
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-16 15:30:45 +01:00
Karel Zak 74fe554a41 tests: add --show-diff
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-16 14:14:54 +01:00
Karel Zak ab3d893784 tests: use swap in sfdisk wipe test
and add "udevadm settle".

Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-16 11:01:35 +01:00
Karel Zak f0c60dff1a tests: add sfdisk --wipe and --wipe-partition tests
Addresses: https://github.com/karelzak/util-linux/issues/410
Addresses: https://github.com/karelzak/util-linux/issues/411
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-15 12:48:06 +01:00
Karel Zak 1a3397906d libmount: make rootfs lookup by parent-id more robust
The root FS id really does not have to be the smallest one.

Reported-by: Michal Soltys <soltys@ziu.info>
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-02-01 16:20:12 +01:00
Sami Kerola 78acfddd1d
last: use --time-format instruction when printing wtmp creation time
This makes --time-format=iso timestamp to look the same as login/logout
times.  When --time-format=noformat is used the file creation time not
printed.  There is no change to default format.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2017-01-16 22:31:36 +00:00
Stanislav Brabec 2edb85255e tests: Introduce libmount/loop
Add libmount/loop test that tests various loop mount options.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
2017-01-16 12:25:45 +01:00
Karel Zak a3c455ac9b lscpu: add aarch64 specific names
It seems that aarch64 uses a different names for some /proc/cpuinfo
fields (e.g. intel: bogomips, flags, and aarch64: BogoMIPS, features, ...)

Addresses: https://github.com/karelzak/util-linux/issues/392
Signed-off-by: Karel Zak <kzak@redhat.com>
2017-01-09 13:04:41 +01:00
Nate Clark b7b26945d1 disk-utils/mkfs.minix: Set ninodes after checking max
ninodes in the superblock needs to be set after inodes is checked
against MINIX_MAX_INODES otherwise a value larger than MINIX_MAX_INODES
can be attempted to be stored in the superblock.

Without this change the command "mkfs.minix -2 -i 65530 <dev>" would
write a minix superblock with ninodes set to 0.

Signed-off-by: Nate Clark <nate@neworld.us>
2017-01-04 14:42:59 -05:00
Karel Zak eac414038e tests: add findmnt output tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-22 11:52:22 +01:00
Karel Zak 131af5109f tests: add new findmnt --options tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-20 16:05:29 +01:00
Karel Zak 421cfd3565 tests: add findmnt tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-20 12:14:17 +01:00
Karel Zak 06e204889f tests: add missing file
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-13 15:00:51 +01:00
Karel Zak 0a14cc8bcc libmount: revert X-* and x-* meaning
Let's hope this is last change necessary to cleanup x-* usage:

  x-*  persistent option, stored in utab, available for umount, etc.
  X-*  fstab comment only

mount(8) supports x-mount.mkdir= as well as newly recommended X-mount.mkdir=

Advantages:

 * less invasive
 * does not require exception for x-systemd
 * does not require rename x-initrd to X-initrd

The systemd and dracut users will get the new (=fixed) functionality without a
change in fstab configuration. This is the primary goal.

Disadvantages:

 * not 100% compatible libmount behavior, x-* options have not been
   previously stored in utab. The API is the same, options will be still
   available, but on x-* libmount will write to /run/mount/utab. For now
   it seems only systemd uses x-*, and they like this behavior, so...

Addresses: https://github.com/systemd/systemd/pull/4515
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-12-09 15:36:14 +01:00
Ruediger Meier 81580f79fa agetty: remove obsolete HAVE_UPDWTMP fallback
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-12-07 12:35:24 +01:00
Karel Zak a99c0eb09f tests: update sfdisk output
The output of the "New situation:" contains

 Disklabel type: <name>
 Disk identifier: <removed>

lines now.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-11-30 13:07:11 +01:00