summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* disk-utils/mkfs.minix: Set ninodes after checking maxNate Clark2017-01-042-0/+10
| | | | | | | | | | | 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>
* tests: add findmnt output testsKarel Zak2016-12-225-0/+166
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add new findmnt --options testsKarel Zak2016-12-205-5/+67
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add findmnt testsKarel Zak2016-12-2013-0/+254
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add missing fileKarel Zak2016-12-131-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libmount: revert X-* and x-* meaningKarel Zak2016-12-091-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* agetty: remove obsolete HAVE_UPDWTMP fallbackRuediger Meier2016-12-072-2/+0Star
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: update sfdisk outputKarel Zak2016-11-3048-0/+96
| | | | | | | | | | | The output of the "New situation:" contains Disklabel type: <name> Disk identifier: <removed> lines now. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update lsmem testsKarel Zak2016-11-302-35/+35
| | | | | | | The commit 4c0e1eaf34fe604118afcd792291419e1d4ff661 modifies the alignment of the STATE column. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add x86_64-16g lsmem testKarel Zak2016-11-093-1/+272
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: cleanup and update lsmemKarel Zak2016-11-092-105/+126
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* lsmem: add testcaseHeiko Carstens2016-11-095-0/+166
| | | | | | | | | | Add a single s390 specific test case to verify that the contents of various output formats do not change in incompatible way if the lsmem code is changed. This is based on a patch from Clemens von Mann. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
* tests: let lsmod fail silentlyRuediger Meier2016-11-071-2/+2
| | | | | | | This is mostly for non-Linux systems where lsmod is not even available. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: always quote $LODEVRuediger Meier2016-11-071-23/+23
| | | | | | | Since there is no error handling in this test $LODEV may be empty. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: replace sleep by udevadmRuediger Meier2016-11-071-11/+10Star
| | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl> CC: Stanislav Brabec <sbrabec@suse.cz>
* tests: udevadm settle before losetup -dRuediger Meier2016-11-071-0/+10
| | | | | | | Fails on Debian 7 (wheezy), Kernel 3.2. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl> CC: Stanislav Brabec <sbrabec@suse.cz>
* tests: check for timeout progKarel Zak2016-11-031-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: wait for flock background processRuediger Meier2016-11-021-0/+10
| | | | | | | Maybe we should add a --daemonize option to flock to cover this use case. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: add flock testsKarel Zak2016-10-319-0/+107
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add sfdisk script case-insensitive testKarel Zak2016-10-262-0/+35
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'tests-raid1' of https://github.com/rudimeier/util-linuxKarel Zak2016-10-262-1/+3
|\
| * test: fix raid1 minimum I/O sizeRuediger Meier2016-10-212-1/+3
| | | | | | | | | | | | | | 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>
* | tests: let's follow ts_scsi_debug_rmmodKarel Zak2016-10-251-2/+0Star
| | | | | | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* | Merge branch 'test-rmmod-scsi_debug' of https://github.com/rudimeier/util-linuxKarel Zak2016-10-2524-54/+45Star
|\ \ | | | | | | | | | | | | * 'test-rmmod-scsi_debug' of https://github.com/rudimeier/util-linux: tests: consolidate rmmod scsi_debug
| * | tests: consolidate rmmod scsi_debugRuediger Meier2016-10-2124-54/+45Star
| |/ | | | | | | | | | | | | | | | | - 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>
* | tests: add another sfdisk script testsKarel Zak2016-10-258-0/+263
| | | | | | | | | | Addresses: https://github.com/karelzak/util-linux/issues/367 Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: add sfdisk Type= and Id= testKarel Zak2016-10-252-0/+92
| | | | | | | | | | Addresses: https://github.com/karelzak/util-linux/issues/367 Signed-off-by: Karel Zak <kzak@redhat.com>
* | tests: add GPT attributes parser testsKarel Zak2016-10-256-0/+2264
|/ | | | | Addresses: https://github.com/karelzak/util-linux/issues/367 Signed-off-by: Karel Zak <kzak@redhat.com>
* Merge branch 'test-fixes' of https://github.com/rudimeier/util-linuxKarel Zak2016-10-212-3/+3
|\ | | | | | | | | | | * 'test-fixes' of https://github.com/rudimeier/util-linux: build-sys: fix missing ncursesw message tests: avoid &>> for bash compatibility
| * tests: avoid &>> for bash compatibilityRuediger Meier2016-10-202-3/+3
| | | | | | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* | tests: call umount --fake for tmpfs testsKarel Zak2016-10-202-2/+15
|/ | | | | | | | | | 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>
* tests: update build-sys expected outputKarel Zak2016-10-1918-36/+36
| | | | | | The su(1) change based on libseccomp has been reverted. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: (cramfs) check for test_sysinfoKarel Zak2016-10-041-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add chrt vs. nice testKarel Zak2016-10-032-0/+64
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update build-sys testsKarel Zak2016-09-3018-50/+36Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: Add helper for TIOCSTI exploitStanislav Brabec2016-09-293-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helper/exploit injects "id -u -n\n" to the vulnerable calling terminal. Use id -u -n to get a reproducible output of test cases based on it. What can happen: Nothing, no exploit: pty is not accessible, sedsid() disconnected the task from pty, TIOCSTI failed. The command is injected to the unprivileged environment pty, and you see e. g. "nobody": This is acceptable. The command is injected to the caller (privileged) pty, and you see "root" (or caller uid name): This is not acceptable and has security implications. References: CVE-2016-2779 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-2779 http://seclists.org/oss-sec/2016/q1/448 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815922 https://bugzilla.redhat.com/show_bug.cgi?id=173008 https://bugzilla.suse.com/show_bug.cgi?id=968674 https://bugzilla.suse.com/show_bug.cgi?id=968675 CVE-2016-2781 http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-2781 http://seclists.org/oss-sec/2016/q1/452 Signed-off-by: Stanislav Brabec <sbrabec@suse.cz> Cc: Federico Bento <up201407890@alunos.dcc.fc.up.pt>
* trivial: use tabs consistentlyIgor Gnatenko2016-09-201-2/+2
| | | | Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
* tests: add columns separator to libsmartcols testKarel Zak2016-09-162-8/+30
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add export and raw to libsmartcols testKarel Zak2016-09-163-0/+43
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libsmartcols JSON testKarel Zak2016-09-164-0/+96
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libsmartcols wrap and wrapnl tree testsKarel Zak2016-09-153-0/+67
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add tree libsmartcols test filesKarel Zak2016-09-156-0/+40
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add support for trees to the sample applicationKarel Zak2016-09-151-1/+15
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add missing expected/ dir stuffKarel Zak2016-09-145-0/+62
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add libsmartcols title testKarel Zak2016-09-143-0/+41
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add another libsmartcols testsKarel Zak2016-09-148-1/+92
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: improve libsmartcols testKarel Zak2016-09-132-0/+20
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add application to test library featuresKarel Zak2016-09-1314-0/+137
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: update sfdisk output stringsKarel Zak2016-09-0111-20/+29
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: fix losetup tests for --nooverlapKarel Zak2016-08-171-18/+18
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>