summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | tests: consolidate ts_device_has UUID or LABELRuediger Meier2018-03-1915-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | tests: fix grep expressions for devicesRuediger Meier2018-03-1912-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | tests: handle xargs errors and invalid argsRuediger Meier2018-03-191-2/+12
| | | | | | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | | column: update column.1ahmogit2018-03-191-1/+1
|/ / | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: ignore private Stratis devicesTony Asleson2018-03-095-14/+20
| | | | | | | | | | | | | | | | [kzak@redhat.com: - tiny coding style changes] References: 20e1c3dc03399d6988ef35dedc1364cfc12e9263 Signed-off-by: Tony Asleson <tasleson@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: add new idea to TODO listKarel Zak2018-03-091-0/+5
| | | | | | | | | | Addresses: https://github.com/karelzak/util-linux/issues/593 Signed-off-by: Karel Zak <kzak@redhat.com>
* | libuuid: make "CONFORMING TO" man sections more explicitKarel Zak2018-03-094-4/+17
| | | | | | | | | | Addresses: https://github.com/karelzak/util-linux/issues/592 Signed-off-by: Karel Zak <kzak@redhat.com>
* | Merge branch 'setpriv-example' of https://github.com/yrro/util-linuxKarel Zak2018-03-091-7/+33
|\ \ | | | | | | | | | | | | | | | | | | * 'setpriv-example' of https://github.com/yrro/util-linux: setpriv: add example section setpriv: include --init-groups in the list of options that can be specified with --[re]gid setpriv: improve description in man page
| * | setpriv: add example sectionSam Morris2018-03-081-1/+15
| | |
| * | setpriv: include --init-groups in the list of options that can be specified ↵Sam Morris2018-03-081-2/+3
| | | | | | | | | | | | with --[re]gid
| * | setpriv: improve description in man pageSam Morris2018-03-081-5/+16
| | |
* | | tests: add ipcslimits lockRuediger Meier2018-03-092-0/+4
| | | | | | | | | | | | | | | | | | | | | 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>
* | | tests: fix losetup raceRuediger Meier2018-03-092-32/+19Star
| | | | | | | | | | | | | | | | | | Also avoid some "no-reentrant" tests. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | | travis: homebrew/dupes was deprecatedRuediger Meier2018-03-091-1/+0Star
| | | | | | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | | tests: re-introduce bash 3 compatibility (OSX)Ruediger Meier2018-03-081-17/+20
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | docs: add remount-all idea to TODOKarel Zak2018-03-081-14/+6Star
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | travis: use parallel root checksRuediger Meier2018-03-072-3/+16
| | | | | | | | | | | | Also improve CPU count detection for tests. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: dont't timeout flockRuediger Meier2018-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | tests: don't use unlocked resourcesRuediger Meier2018-03-071-0/+20
| | | | | | | | | | | | | | | | 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>
* | tests: don't lock fd 1 (stdout), don't use /proc/$$/fdRuediger Meier2018-03-071-20/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | tests: add wierd sleep for libmount/contextRuediger Meier2018-03-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | tests: add some more udevadm settleRuediger Meier2018-03-075-1/+7
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | travis: enable osx root checksRuediger Meier2018-03-072-1/+4
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | Merge branch 'setpriv-caps' of https://github.com/yrro/util-linuxKarel Zak2018-03-071-1/+1
|\ \
| * | setpriv: fix manpage typoSam Morris2018-03-061-1/+1
| | | | | | | | | | | | | | | | | | The example given in the man page didn't work. Judging by commit db663995bd93e170a43b1a7050c7a738782dabfb, --inh-caps= used to be called --caps= but the man page was not updated after the change was made.
* | | uuidd: cosmetic coding style changeKarel Zak2018-03-071-2/+1Star
| | | | | | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | | uuidd: don't truncate long socket pathsRuediger Meier2018-03-072-5/+10
|/ / | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | libmount: fix fs pattern usage in mount --allKarel Zak2018-03-061-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The command "mount -a -t <pattern>" uses the -t as pattern to filter fstab entries. And "mount -t <type>" is used to specify FS type. Unfortunately libmount does not care about this difference when it calls standard mount functionality. The original pattern is still in the library control struct and mnt_do_mount() tries to use it as FS type. This patch is just bugfix. Maybe the long term solution would be to differentiate between the pattern and type in the library API. Now the library follows mount(8) command line and it's little bit messy. Reported-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: add script(1) events idea to TODOKarel Zak2018-03-051-0/+20
| | | | | | | | | | Addresses: https://github.com/karelzak/util-linux/issues/583 Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: add note about JSONKarel Zak2018-03-051-0/+7
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | Merge branch 'master' of https://github.com/yurchor/util-linuxKarel Zak2018-03-024-4/+4
|\ \ | | | | | | | | | | | | * 'master' of https://github.com/yurchor/util-linux: Fix minor typos on man pages
| * | Fix minor typos on man pagesYuri Chornoivan2018-03-014-4/+4
| | |
* | | bash-completion: update zramctl algorithms listSami Kerola2018-03-021-1/+1
|/ / | | | | | | | | Reference: a3612b81fe0c172bc4fe7e2cf468f195bd785222. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* | build-sys: release++ (v2.32-rc2)Karel Zak2018-03-012-1/+5
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: update v2.32-ReleaseNotesKarel Zak2018-03-011-0/+39
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: update AUTHORS fileKarel Zak2018-03-011-0/+2
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | po: merge changesKarel Zak2018-03-0127-3727/+3727
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | tools: improve checkmansKarel Zak2018-03-011-6/+13
| | | | | | | | | | | | | | | | * ignore .git/ * don't print error messages when error counters are zero * add new KNOWN_REPEATS[] Signed-off-by: Karel Zak <kzak@redhat.com>
* | docs: add note about NVMe-multipath to TODOKarel Zak2018-03-011-0/+18
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | mount: (man) update mount options for UDFSteve Kenton2018-02-281-22/+67
| | | | | | | | | | Signed-off-by: Steve Kenton <skenton@ou.edu> Acked-by: Jan Kara <jack@suse.cz>
* | libblkid:(dos) make subtypes probing more robustKarel Zak2018-02-271-7/+18
| | | | | | | | | | | | | | | | | | The current code mix partitions as defined on disk with partitions from partlist (as recognized by libblkid). It seems better to follow partlist only. Reported-by: Vaclav Dolezal <vdolezal@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* | libblkid: (mpool) checksum is LEKarel Zak2018-02-261-1/+1
| | | | | | | | | | Reported-by: Ruediger Meier <ruediger.meier@ga-group.nl> Signed-off-by: Karel Zak <kzak@redhat.com>
* | blkzone: Fix a typo in blkzone.8Masanari Iida2018-02-261-1/+1
| | | | | | | | | | | | This patch fixes a spelling typo in blkzone.8 Signed-off-by: Masanari Iida <standby24x7@gmail.com>
* | fincore: Handle large files on 32 bit without LFSTobias Stoeckmann2018-02-261-3/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If util-linux is installed on a system without large file support, an out of memory issue can occur while processing a file which is 2 GB in size: $ ./configure --disable-largefile && make $ dd if=/dev/zero of=2gb-file seek=2147483646 count=1 bs=1 $ fincore 2gb-file (endless loop) fincore: failed to do mmap: 2gb-file: Cannot allocate memory Even though iterating with "len" seems counter-intuitive, it fixes this issue. The variable len is only in the last iteration not a multiplication of pagesize -- which is the requirement for mmap. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* | fincore: Handle large files correctly on 32 bitTobias Stoeckmann2018-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a file is larger than 4 GB on a 32 bit system with large file support (default), it can happen that not all pages are properly processed. This happens due to an int truncation (off_t vs size_t). You can reproduce this on 32 bit with these commands: $ dd if=/dev/zero of=4gb-file seek=4294967295 count=1 bs=1 $ fincore 4gb-file fincore: failed to do mmap: 4gb-file: Invalid argument If a file is larger than 4 GB, the first few pages of a file won't be properly processed. "len" will be smaller than window_size, but the for-loop iterates "window_size" bytes, skipping some pages. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
* | build-sys: forgot update NEWS for v2.32-rc1Karel Zak2018-02-222-1/+5
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | mount: add note about cached kernel table for --allKarel Zak2018-02-221-1/+5
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libsmartcols: fix docs warningsKarel Zak2018-02-212-1/+5
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libfdisk: fix docs warningsKarel Zak2018-02-212-0/+14
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | libfdisk: (docs) add missing docs blocksKarel Zak2018-02-213-22/+48
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>