summaryrefslogtreecommitdiffstats
path: root/tests/helpers
Commit message (Collapse)AuthorAgeFilesLines
* tests: add tests for encode functions from lib/mbsalign.cVaclav Dolezal2018-01-102-0/+55
| | | | Signed-off-by: Vaclav Dolezal <vdolezal@redhat.com>
* lib/md5: use ul_/UL_ prefixKarel Zak2017-12-121-6/+6
| | | | | | | The symbols names are too generic. Addresses: https://github.com/karelzak/util-linux/issues/548 Signed-off-by: Karel Zak <kzak@redhat.com>
* test_sha1: update helperKarel Zak2017-12-121-6/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* misc: replace magic number 37 with UUID_STR_LENPhilip Prindeville2017-09-051-1/+1
| | | | Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* libuuid: add support for hash-based UUIDsPhilip Prindeville2017-09-053-0/+73
| | | | | | | | | 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: add static keyword where needed [smatch scan]Sami Kerola2017-03-172-4/+4
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* agetty: remove obsolete HAVE_UPDWTMP fallbackRuediger Meier2016-12-071-1/+0Star
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: Add helper for TIOCSTI exploitStanislav Brabec2016-09-292-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: test_md5 prints md5sum onlyRuediger Meier2016-04-131-1/+1
| | | | | | | We want to to use it for other tests without depending on gnu md5sum and without cut or awk. Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* misc: remove path name definitions that are unusedSami Kerola2016-03-091-13/+0Star
| | | | | | | | | | | | | | | | | | | | | | After this commit the following produces zero matches. $ for i in \ _PATH_DEV_TTY \ _PATH_INITTAB \ _PATH_MNTTAB_DIR \ _PATH_MOUNTED_LOCK \ _PATH_MOUNTED_TMP \ _PATH_RC \ _PATH_REBOOT \ _PATH_SECURE \ _PATH_SECURETTY \ _PATH_SHUTDOWN_CONF \ _PATH_SINGLE \ _PATH_UMOUNT \ _PATH_USERTTY do git grep $i; done Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* misc-utils: build test_uuidd only if BUILD_UUIDDRuediger Meier2016-02-122-344/+0Star
| | | | Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
* tests: remove redundant check for NULL [cppcheck]Boris Egorov2016-01-191-3/+2Star
| | | | | | We set SA_SIGINFO flag, so we should not get NULL. [tests/helpers/test_sigreceive.c:45] -> [tests/helpers/test_sigreceive.c:47]: (warning) Either the condition 'if(info)' is redundant or there is possible null pointer dereference: info.
* test_uuidd: add commentKarel Zak2015-04-241-0/+17
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: add pid, tid and idx back to objectKarel Zak2015-04-241-5/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: make objdump more robustKarel Zak2015-04-241-4/+5
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: fix includeKarel Zak2015-04-241-2/+1Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: don't exit on failed pthread_create()Karel Zak2015-04-241-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: don't exit on failed pthread_create()Karel Zak2015-04-241-8/+22
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: improve readabilityKarel Zak2015-04-241-64/+82
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: cleanup counters namesKarel Zak2015-04-241-35/+35
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: cleanup pid usageKarel Zak2015-04-241-25/+23Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: cleanup used typesKarel Zak2015-04-241-74/+71Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_uuidd: err messages, argv[] parsing and another cleanupsKarel Zak2015-04-242-198/+132Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add uuidd test programHuschaam Hussain2015-04-242-0/+362
| | | | | References: https://bugzilla.redhat.com/show_bug.cgi?id=678306 Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add kill --queue checkSami Kerola2014-07-151-5/+12
| | | | | | | | | | | | Correction. The final failure to catch signal exit should not use exiter() function. --->8---- From: Sami Kerola <kerolasa@iki.fi> Date: Mon, 14 Jul 2014 18:35:56 +0100 Subject: [PATCH] tests: add kill --queue check Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build: fix some compiler warningsRuediger Meier2014-05-301-1/+1
| | | | | | | | | | | | Most of them catched on 32bit gcc and icc. disk-utils/fsck.cramfs.c: printf format type lib/boottime.c: unused variables misc-utils/cal.c: set but never used sys-utils/losetup.c: set but never used sys-utils/lscpu-dmi.c: defined but not used sys-utils/switch_root.c: comparison between signed and unsigned tests/helpers/test_sysinfo.c: printf format type
* tests: add signal receiver programSami Kerola2014-04-262-0/+179
| | | | | | | 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: new warning fixGilles Espinasse2013-05-211-1/+1
| | | | | | | | 2.23 added -Wstrict-prototypes check. Fix make check showing CC tests/helpers/test_md5.o tests/helpers/test_md5.c:8: warning: function declaration isn't a prototype Signed-off-by: Gilles Espinasse <g.esp@free.fr>
* tests: fix compiler warningKarel Zak2013-04-181-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: move tests to check_PROGRAMSKarel Zak2012-07-301-4/+4
| | | | | | Thanks to Mike Frysinger. Signed-off-by: Karel Zak <kzak@redhat.com>
* test_sysinfo: fix compiler warning [-Wmissing-prototypes]Karel Zak2012-07-161-19/+10Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: cleanup .gitignore filesKarel Zak2012-06-261-4/+0Star
| | | | | | | - move all binaries to top-level .gitignore - remove unnecessary */.gitignore files Signed-off-by: Karel Zak <kzak@redhat.com>
* build-sys: convert tests/ to moduleKarel Zak2012-06-262-9/+12
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* pathnames: clean up various user database pathsSami Kerola2012-03-181-9/+0Star
| | | | Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: enhance readability of the autotools filesSami Kerola2012-02-281-3/+5
| | | | | | | | Several horizontal lists are turned to vertical, and sorted to alphabetical order. Additionally spaces are converted to tabs where ever possible. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* tests: fix compiler warnings [-Wunused-parameter]Karel Zak2011-08-012-3/+2Star
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* md5: use symbolical digest lengthSami Kerola2011-07-211-2/+2
| | | | | | | Magic hash lenght number 16 is turned to a definition MD5LENGTH, and put into use everywhere where md5 checksum is in use. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* test_sysinfo: fix printf formatKarel Zak2011-06-141-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* test_sysinfo: Use CHAR_BIT*sizeof(void*) instead of __WORDSIZE.Josiah Worcester2011-06-141-1/+1
| | | | Signed-off-by: Josiah Worcester <josiahw@gmail.com>
* build-sys: use WORDS_BIGENDIAN to determine platform byte-orderFabian Groffen2011-01-171-6/+1Star
| | | | | | | | | | | | Autoconf contains the right magic to determine the endianness on many platforms next to Linux. This reverses previous commits to move away from WORDS_BIGENDIAN: "use __BYTE_ORDER rather than AC specific WORDS_BIGENDIAN" This is necessary to compile on non Linux platforms like Darwin and Solaris. Signed-off-by: Fabian Groffen <grobian@gentoo.org>
* rename util-linux-ng back to util-linuxKarel Zak2010-11-302-2/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include: clean up _PATH_DEV_* macrosKarel Zak2009-06-301-1/+2
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add "byte-order" to helpers/test_sysinfoKarel Zak2009-02-111-1/+18
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add MD5 regression testKarel Zak2008-12-063-1/+35
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add swabN() regression testKarel Zak2008-12-053-1/+116
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* use getpagesize()maximilian attems2008-07-301-1/+1
| | | | | | | | | | | | getpagesize() is said to be more portable than sysconf(_SC_PAGESIZE) to anything Linux. this patch helps klibc porting effort as the sysconf multiplex API is not supported there. also remove comment of the switch to sysconf in mkswap.c. Signed-off-by: maximilian attems <max@stro.at>
* build-sys: ignore a bunch of generated files, mostly binariesJames Youngman2008-04-141-0/+2
| | | | | Signed-off-by: James Youngman <jay@gnu.org> Signed-off-by: Karel Zak <kzak@redhat.com>
* include: add mount paths to pathnames.hKarel Zak2007-11-281-1/+10
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include: cleanup pathnames.hKarel Zak2007-11-281-1/+1
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* tests: add test for include/pathnames.hKarel Zak2007-11-282-1/+100
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>