summaryrefslogtreecommitdiffstats
path: root/tests/commands.sh
Commit message (Collapse)AuthorAgeFilesLines
* tests: add --use-system-commandsKarel Zak2019-03-041-98/+98
| | | | | | | | | | | | | 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>
* hardlink: add first simple testsRuediger Meier2018-11-151-0/+1
| | | | | | | 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>
* tests: use TS_HELPER_CALKarel Zak2018-02-021-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add tests for encode functions from lib/mbsalign.cVaclav Dolezal2018-01-101-0/+1
| | | | Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* lsns: add a case for testing netnsid columnMasatake YAMATO2017-11-271-0/+1
| | | | Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* libuuid: add support for hash-based UUIDsPhilip Prindeville2017-09-051-0/+2
| | | | | | | | | 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>
* tests: use sample-fdisk-mkpart-fullspecKarel Zak2017-07-111-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: use sample-fdisk-mkpartKarel Zak2017-07-111-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* uuidparse: add new commandSami Kerola2017-06-261-0/+1
| | | | | | | | | | | 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>
* tailf: remove deprecated utilitySami Kerola2017-04-021-1/+0Star
| | | | | | | | March 2017 is gone, it is time to remove this utility as scheduled in earlier commit, and promised in manual page. Reference: 3f8478a71ccde6883d4c81b7e65561a106653b28 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add cases for testing fincore commandMasatake YAMATO2017-03-231-0/+1
| | | | Signed-off-by: Masatake YAMATO <yamato@redhat.com>
* lsmem: add testcaseHeiko Carstens2016-11-091-0/+1
| | | | | | | | | | 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: add flock testsKarel Zak2016-10-311-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: Add helper for TIOCSTI exploitStanislav Brabec2016-09-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tests: add libsmartcols title testKarel Zak2016-09-141-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libsmartcols: add application to test library featuresKarel Zak2016-09-131-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add chrt testKarel Zak2016-07-111-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add uuidd output checkSami Kerola2015-10-181-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add uuid parser checkSami Kerola2015-10-181-0/+1
| | | | | | | The check is based on code by Theodore Ts'o to test libuuid, from which unstable output is commented out. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add colcrt regression testsSami Kerola2015-08-101-0/+1
| | | | | | | Thanks to Alaa Mubaied for providing crash1 input file making colcrt to crash. The crash2 was generated using American Fuzzy Lop. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add way to control mkfs.minix time stampsSami Kerola2015-08-031-0/+1
| | | | | | | Needed in order to create reproducable file systems image files, so that out come of mkfs.minix can be checksum'ed. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add scriptreplay testSami Kerola2015-06-081-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: check script options work as expectedSami Kerola2015-06-061-0/+1
| | | | | | | Options --flush and --timing remain unchecked, as I do not have an idea how to check them reliably. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* libfdisk: (gpt) add API for raw partition attributesMichael Marineau2015-05-051-0/+1
| | | | | | | | | | | | | | | | | The existing APIs can only toggle individual bits or get and set bits in a complex text representation, making it impractical to use libfdisk for manipulating the GPT partition attribute field in more complex ways such as updating a value that is multiple bits wide. For example priority based partition selection originally designed for ChromeOS includes two integer values that are 4-bits wide. http://www.chromium.org/chromium-os/chromiumos-design-docs/disk-format#TOC-Trusting-the-GPT [kzak@redhat.com: - add new symbols to .sym file and docs - remove unused variables from test program] Signed-off-by: Michael Marineau <michael.marineau@coreos.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add test_dmesg that has fixed boot timeSami Kerola2015-03-231-1/+1
| | | | | | This allows testing time stamp formats. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: mount/move also tests findmnt vs. mountpointRuediger Meier2015-03-191-0/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* logger: add -DTEST_LOGGERKarel Zak2015-03-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | "make test_logger" now compiles logger(1) test program to overwrite system datetime stuff, hostname and PID, for example: export TZ=GMT export LOGGER_TEST_TIMEOFDAY=1234567890.123456 export LOGGER_TEST_HOSTNAME=foo export LOGGER_TEST_GETPID=123 ./test_logger --rfc5424 --no-act --stderr -i --tag MyTag mesg <13>1 2009-02-13T23:31:30.123456+00:00 foo MyTag 123 - [timeQuality tzKnown="1" isSynced="0"] mesg if the LOGGER_TEST_* variables are not specified then default to standard logger(1) behavior. Note that it would be possible to use for example "unshare --utc" to make hostname stable and portable, but LOGGER_TEST_* variables allow to keep the tests less complex. Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add blkdiscard offsets testFederico Simoncelli2014-10-271-0/+1
| | | | Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
* tests: add sfdisk testKarel Zak2014-10-071-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* libs/debug: accept human readable names for _DEBUG=Ondrej Oprala2014-08-131-0/+1
| | | | | | | | | | For example $ LIBMOUNT_DEBUG=tab,cache findmnt to debug only TAB and CACHE subsystem. Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add rename(1) checksSami Kerola2014-07-181-0/+1
| | | | | | | | | Check basic file moves, symlink relinking, and both file moves and symlinks when operations are have directory in destination path. Reviewed-by: Ruediger Meier <sweet_f_a@gmx.de> Reviewed-by: Karel Zak <kzak@redhat.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: fix python tests for dist and out-of-tree buildsRuediger Meier2014-06-041-3/+3
| | | | | | | | | - add python helper scripts to the dist - helper scripts are always in srcdir - python libs are in builddir - abort tests if helpers are missing Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: remove test_fsck.cramfs (reverts 6c32ae78)Ruediger Meier2014-05-191-1/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: introduce TS_CMD_UUIDGEN (never use installed one)Ruediger Meier2014-05-131-0/+1
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: check kill all user processesSami Kerola2014-04-261-1/+1
| | | | | CC: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: check kill is converting signals names correctlySami Kerola2014-04-261-0/+1
| | | | | CC: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add signal receiver programSami Kerola2014-04-261-0/+1
| | | | | | | Target to kill with a check that will be written later. CC: Bernhard Voelker <mail@bernhard-voelker.de> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: check swaplabel, and perform more swapon boundary testsSami Kerola2014-03-121-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add last(1) testSami Kerola2013-08-291-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* pylibmount: add regression testsOndrej Oprala2013-08-191-0/+3
| | | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add losetup testsKarel Zak2013-05-131-0/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* wipefs: add --backupOndrej Oprala2013-04-261-0/+1
| | | | | | | | [kzak@redhat.com: - don't wipe if failed to create a backup file - use ts_scsi_debug_init in the regression tests] Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add partx regression testsOndrej Oprala2013-04-261-0/+2
| | | | Signed-off-by: Ondrej Oprala <ooprala@redhat.com>
* tests: sort commands stringsSami Kerola2013-01-251-62/+43Star
| | | | | | | The list is starting to be long enough that making any order to it seems like right thing to do. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add ipcmk(1) and ipcrm(1) checksSami Kerola2013-01-251-0/+2
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add whereis(1) checkSami Kerola2013-01-251-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add isosize(1) checkSami Kerola2013-01-251-0/+1
| | | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add fallocate(1) checkSami Kerola2013-01-251-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add setarch(8) checkSami Kerola2013-01-251-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: add setsid(1) checkSami Kerola2013-01-251-0/+1
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>