Commit Graph

10887 Commits

Author SHA1 Message Date
Ruediger Meier e8a7dc4bee tests: udevadm settle before losetup -d
Fails on Debian 7 (wheezy), Kernel 3.2.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
CC: Stanislav Brabec <sbrabec@suse.cz>
2016-11-07 10:51:43 +01:00
Karel Zak 52ac706576 docs: update TODO file
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-11-07 10:19:16 +01:00
Karel Zak b5d61108e4 lscpu: disable is_vmware_platform() for non-root users
References: http://www.spinics.net/lists/util-linux-ng/msg13302.html
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-11-03 10:53:09 +01:00
Karel Zak ae02bd0bd7 tests: check for timeout prog
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-11-03 00:01:23 +01:00
Ruediger Meier ca6d721a01 tests: wait for flock background process
Maybe we should add a --daemonize option to flock to cover
this use case.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-11-02 16:47:45 +01:00
Karel Zak e76e6747cb lsblk: add note about --sort and --list relation
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-11-02 14:47:37 +01:00
Karel Zak 5e2305ca5c lsblk: sort by MAJ:MIN by default
Since Linux kernel 4.8 /sys entries are no more sorted and all is
in the native order. It makes lsblk output messy.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-11-02 14:40:31 +01:00
Karel Zak 95a528ddbc libsmartcols: make scols_sort_table() usable for trees
We also need to sort children when tree is enabled.

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-11-02 14:39:08 +01:00
Karel Zak 8c2e8e86d2 libfdisk: fix typo
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-11-02 12:56:06 +01:00
Karel Zak 10146e56b0 tests: add flock tests
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-31 14:30:02 +01:00
Karel Zak 93fea49f28 flocks: keep run_program() simple 2016-10-31 13:15:35 +01:00
Karel Zak 4a53290774 Merge branch 'fixes-for-v2.29' of https://github.com/rudimeier/util-linux
* 'fixes-for-v2.29' of https://github.com/rudimeier/util-linux:
  misc: once again some printf format strings
  misc: fix some compiler warnings
  chrt: fix HAVE_SCHED_SETATTR fallback case
  fdisk: fix memleak in list_disk_geometry()
2016-10-31 13:03:47 +01:00
Karel Zak 391e675c6f flock: fix no-flock patch
Addresses: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=842598
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-31 12:50:31 +01:00
Karel Zak 3c4a3de0fc mount: append inverting options for mount.<type> on "users"
If you call mount(8) as root, then we need to append inverting options
(if specified by fstab) for "user" and "users" to /sbin/mount.<type>
command line, because for UID=0 mount.nfs follows command line rather
than the fstab setting.

This has been originally implemented by commit
a4c0cc75ff for the old mount(8). The
same feature is supported by libmount, unfortunately for "user" only.
We need the same also for "users" to be backwardly compatible.

Addresses: https://github.com/karelzak/util-linux/issues/368
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-27 15:30:20 +02:00
Ruediger Meier eaaf0e7e37 misc: once again some printf format strings
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-10-27 11:03:27 +02:00
Ruediger Meier 332123f2b6 misc: fix some compiler warnings
libsmartcols/samples/fromfile.c:59:2: warning: passing argument 3 of 'string_to_bitmask' from incompatible pointer type
  text-utils/pg.c:79:0: warning: "TABSIZE" redefined
  libblkid/src/read.c:455:13: warning: 'debug_dump_dev' defined but not used [-Wunused-function]
  libblkid/src/probe.c:769:13: warning: unused function 'cdrom_size_correction' [-Wunused-function]
  /usr/include/sys/termios.h:3:2: warning: "this file includes <sys/termios.h> which is deprecated, use <termios.h> instead" [-W#warnings]

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-10-27 11:03:24 +02:00
Ruediger Meier fded05ac81 chrt: fix HAVE_SCHED_SETATTR fallback case
Broken since 6f27e449. We could not enter the fallback
if HAVE_SCHED_SETATTR is not defined.

Two gcc warnings made this issue visible:
  schedutils/chrt.c:247:1: warning: label 'fallback' defined but not used [-Wunused-label]
  schedutils/chrt.c:266:9: warning: 'policy' may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-10-27 11:03:21 +02:00
Ruediger Meier 0f2eb577ac fdisk: fix memleak in list_disk_geometry()
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-10-27 11:03:16 +02:00
Karel Zak a50c849007 libfdisk: cleanup labelitem initialization
* use macro for label initialization
* make sure we do not call fdisk_ref_labelitem() and
  fdisk_unref_labelitem() for non-allocated items

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-27 10:53:55 +02:00
Ruediger Meier 14b7f754c9 libfdisk: fix uninitialized fdisk_labelitem
fdisk -l could crash randomly. Only seen on some i586 systems with
certain exotic compiler options.

The problem was that this item is later used in
function fdisk_reset_labelitem() like this:

    if (li->type == 's')
        free(li->data.str);

This may crash if item is randomly initialized.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-10-27 10:43:45 +02:00
Karel Zak f4126f98e1 tests: add sfdisk script case-insensitive test
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-26 14:08:29 +02:00
Karel Zak 469acdb449 libfdisk: (script) make bootable flag parsing more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-26 14:01:29 +02:00
Karel Zak 16b5238eb3 libfdisk: add trivial script test
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-26 13:59:07 +02:00
Karel Zak e4015b348f fdisk: fix compiler warning
disk-utils/fdisk-menu.c: In function ‘gpt_menu_cb’:
disk-utils/fdisk-menu.c:709: warning: passing argument 6 of ‘fdisk_ask_number’ from incompatible pointer type
./libfdisk/src/libfdisk.h:688: note: expected ‘uintmax_t *’ but argument is of type ‘long unsigned int *’

Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-26 10:28:41 +02:00
Karel Zak c95cad2098 Merge branch 'tests-raid1' of https://github.com/rudimeier/util-linux 2016-10-26 10:22:40 +02:00
Karel Zak bae57b5a3c misc: fix unsigned int usage for ctype.h functions
Reported-by: "Yuriy M. Kaminskiy" <yumkam@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-26 10:13:47 +02:00
Karel Zak 82e8ddacb4 rtcwake: add note about RTC limits
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-25 16:52:43 +02:00
Karel Zak db449e059d tests: let's follow ts_scsi_debug_rmmod
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-25 14:33:08 +02:00
Karel Zak 14dbd60976 Merge branch 'test-rmmod-scsi_debug' of https://github.com/rudimeier/util-linux
* 'test-rmmod-scsi_debug' of https://github.com/rudimeier/util-linux:
  tests: consolidate rmmod scsi_debug
2016-10-25 14:31:23 +02:00
Karel Zak 066e21748e docs: add sfdisk scripts quotes issue to TODO file
Addresses: https://github.com/karelzak/util-linux/issues/367
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-25 14:26:42 +02:00
Karel Zak 9e4e2ee31e tests: add another sfdisk script tests
Addresses: https://github.com/karelzak/util-linux/issues/367
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-25 13:43:56 +02:00
Karel Zak 8430b9b884 libfdisk: make script token parser more robust
* make sure token is terminated
* skip closing quotes
* allow extra space after quotes and before terminater
* skip extra space after terminater

Addresses: https://github.com/karelzak/util-linux/issues/367
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-25 13:42:48 +02:00
Karel Zak 0dcfebf527 tests: add sfdisk Type= and Id= test
Addresses: https://github.com/karelzak/util-linux/issues/367
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-25 12:34:49 +02:00
Karel Zak f37f50594f libfdisk: fix script Type= and Id= parsing
The parser is not consistent and *case insensitive* Type= and Id= tokens
are not expected on all places.

Addresses: https://github.com/karelzak/util-linux/issues/367
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-25 12:32:23 +02:00
Karel Zak 81d26db3e1 tests: add GPT attributes parser tests
Addresses: https://github.com/karelzak/util-linux/issues/367
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-25 12:12:49 +02:00
Karel Zak 17d0902c89 libfdisk: (gpt) make attributes parser more robust
* allow GUID: prefix only for numbers
* require space or comma separator

Addresses: https://github.com/karelzak/util-linux/issues/367
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-25 12:10:31 +02:00
Karel Zak 42b02524de Merge branch 'master' of https://github.com/yurchor/util-linux
* 'master' of https://github.com/yurchor/util-linux:
  Fix minor typos
2016-10-24 15:05:56 +02:00
Karel Zak 91891979f7 build-sys: improve libncursesw5 install for travis
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-21 18:48:10 +02:00
Ruediger Meier 561dedcf3b test: fix raid1 minimum I/O size
Seems this has been changed in kernels >4.4.x or >4.8
from 512 bytes to 64K.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-10-21 16:37:58 +02:00
Ruediger Meier 5c711ba945 tests: consolidate rmmod scsi_debug
- auto cleanup on test exit
 - Add smart timeout: Newer openSUSE systems on OBS failed to rmmod
   almost always. udevadm settle does not seem to have any affect.
 - now tests will fail if rmmod fails

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-10-21 15:08:49 +02:00
Karel Zak e1164591f7 getopt: be sure that options array is terminated
Reported-by: Anders Kaseorg <andersk@mit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-21 13:51:48 +02:00
Karel Zak 25d08572da Merge branch 'test-fixes' of https://github.com/rudimeier/util-linux
* 'test-fixes' of https://github.com/rudimeier/util-linux:
  build-sys: fix missing ncursesw message
  tests: avoid &>> for bash compatibility
2016-10-21 13:34:28 +02:00
Karel Zak 307546ed8b build-sys: fix drone.io builds
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-21 13:33:32 +02:00
Ruediger Meier 4b439e2d00 build-sys: fix missing ncursesw message
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-10-20 18:32:21 +02:00
Ruediger Meier 39f948942b tests: avoid &>> for bash compatibility
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-10-20 18:32:21 +02:00
Karel Zak d22f7f7c1e tests: call umount --fake for tmpfs tests
On old systems (e.g. RHEL6) with /sbin/mount.tmpfs the mtab file is
modified although our in-tree mount does not support mtab file. We
need to call umount --fake to be sure that we remove unwanted lines
from the test.

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-20 18:27:24 +02:00
Yuri Chornoivan 31fb945332 Fix minor typos 2016-10-20 19:08:57 +03:00
Karel Zak 9d328f82d7 build-sys: fix typo on ncurses-config command line
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-20 17:30:30 +02:00
Karel Zak e5cc93b5a8 build-sys: use ncurses-config rather than pkg-config
It's painful, but ncurses upstream does not distribute .pc files by
default and it seems that ncurses{6,5}-config is the preferred solution.

For better compatibility lets use ncurses-config.

Reported-by: Ruediger Meier <sweet_f_a@gmx.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-20 16:52:31 +02:00
Karel Zak d7b32ebe12 build-sys: release++ (v2.29-rc2)
Signed-off-by: Karel Zak <kzak@redhat.com>
2016-10-19 14:33:55 +02:00