summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* libfdisk: (docs) improve enums documentationKarel Zak2018-02-211-16/+61
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: add missing macro to docsKarel Zak2018-02-211-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libblkid: (mpool) don't use gtkdocs-like comment blockKarel Zak2018-02-211-3/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: fix memory leak [coverity scan]Karel Zak2018-02-201-6/+13
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsns: remove if-after-xcallocKarel Zak2018-02-201-4/+0Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* column: fix memory leak [coverity scan]Karel Zak2018-02-201-0/+3
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* chrt: fix compiler warning [-Wmaybe-uninitialized]Karel Zak2018-02-201-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* fsck: cleanup find_fsck()Karel Zak2018-02-191-6/+14
| | | | | | | | * remove static variable * return 0 or 1 * optionally return allocated path to the program Signed-off-by: Karel Zak <kzak@redhat.com>
* lsblk: document LSBLK_DEBUG=Karel Zak2018-02-161-0/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'maybe-for-v2.32' of https://github.com/rudimeier/util-linuxKarel Zak2018-02-160-0/+0
|\
| * tests: use pgrep instead of ps --ppid ...Ruediger Meier2018-02-161-5/+2Star
| | | | | | | | | | | | | | 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>
* | Merge branch 'maybe-for-v2.32' of https://github.com/rudimeier/util-linuxKarel Zak2018-02-1640-62/+63
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * 'maybe-for-v2.32' of https://github.com/rudimeier/util-linux: tests: use pgrep instead of ps --ppid ... misc: fix typos using codespell lsns: fix clang compiler warning tests: add udevadm settle to sfdisk/resize build-sys: disable bz2 tarball and fix some am warnings
| * | tests: use pgrep instead of ps --ppid ...Ruediger Meier2018-02-161-5/+2Star
| |/ | | | | | | | | | | | | 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>
| * misc: fix typos using codespellRuediger Meier2018-02-1636-54/+54
| | | | | | | | | | | | Some more funny typos, please review carefully. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * lsns: fix clang compiler warningRuediger Meier2018-02-161-2/+3
| | | | | | | | | | | | | | | | | | | | | | ../sys-utils/lsns.c:360:8: warning: comparison of integers of different signs: '__u32' (aka 'unsigned int') and 'int' [-Wsign-compare] if (!(NLMSG_OK(nlh, reslen) ^~~~~~~~~~~~~~~~~~~~~ /usr/include/linux/netlink.h:90:24: note: expanded from macro 'NLMSG_OK' (nlh)->nlmsg_len <= (len)) ~~~~~~~~~~~~~~~~ ^ ~~~ Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * tests: add udevadm settle to sfdisk/resizeRuediger Meier2018-02-151-0/+1
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
| * build-sys: disable bz2 tarball and fix some am warningsRuediger Meier2018-02-152-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nobody needs the .bz2 tarball. We dont't even upload it to kernel.org. BTW we fix dozens of these automake warnings: automake-1.13/am/ltlibrary.am: warning: 'libblkid.la': linking libtool libraries using a non-POSIX automake-1.13/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac' So we can remove -Wno-portability. The only warning left is this last GNU-make'ism which somebody may fix when reading it: sys-utils/Makemodule.am:191: warning: addprefix sys-utils/,$(SETARCH_LINKS: non-POSIX variable name sys-utils/Makemodule.am:191: (probably a GNU make extension) Makefile.am:90: 'sys-utils/Makemodule.am' included from here Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | fsck: coding style cleanupKarel Zak2018-02-161-2/+4
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | fsck: use xasprintf to avoid buffer overruns with an insane fs typeTheodore Ts'o2018-02-161-6/+9
| | | | | | | | | | | | | | | | | | This prevents a crash when running the command: fsck -t AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA /dev/sda Reported-by: Hornseth_Brenan@bah.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>