Commit Graph

52 Commits

Author SHA1 Message Date
Sami Kerola 652822e08b misc: remove path name definitions that are unused
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>
2016-03-09 11:44:05 +01:00
Ruediger Meier 0ec9bba2ca misc-utils: build test_uuidd only if BUILD_UUIDD
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
2016-02-12 14:11:19 +01:00
Boris Egorov 4ec6062678 tests: remove redundant check for NULL [cppcheck]
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.
2016-01-19 12:59:12 +06:00
Karel Zak 28f47fd2e0 test_uuidd: add comment
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-24 17:09:17 +02:00
Karel Zak a539def589 test_uuidd: add pid, tid and idx back to object
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-24 15:53:28 +02:00
Karel Zak 032776e8b0 test_uuidd: make objdump more robust
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-24 15:01:23 +02:00
Karel Zak adbc73eb61 test_uuidd: fix include
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-24 14:54:09 +02:00
Karel Zak cfa4171a14 test_uuidd: don't exit on failed pthread_create()
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-24 14:47:49 +02:00
Karel Zak 4d5241584f test_uuidd: don't exit on failed pthread_create()
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-24 14:47:09 +02:00
Karel Zak 1d27cd1193 test_uuidd: improve readability
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-24 14:25:30 +02:00
Karel Zak 179306122c test_uuidd: cleanup counters names
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-24 13:39:17 +02:00
Karel Zak 7eeb7e1d56 test_uuidd: cleanup pid usage
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-24 13:35:54 +02:00
Karel Zak f4be1406a3 test_uuidd: cleanup used types
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-24 13:28:12 +02:00
Karel Zak 0f2b00ce0a test_uuidd: err messages, argv[] parsing and another cleanups
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-24 12:40:51 +02:00
Huschaam Hussain 963f128cfa tests: add uuidd test program
References: https://bugzilla.redhat.com/show_bug.cgi?id=678306
Signed-off-by: Karel Zak <kzak@redhat.com>
2015-04-24 11:30:49 +02:00
Sami Kerola 558445c93d tests: add kill --queue check
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>
2014-07-15 13:22:24 +02:00
Ruediger Meier 60cb2c3720 build: fix some compiler warnings
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
2014-05-30 01:18:09 +02:00
Sami Kerola 6b93dcbee1 tests: add signal receiver program
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>
2014-04-26 19:04:52 +01:00
Gilles Espinasse e992a7b20d tests: new warning fix
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>
2013-05-21 11:38:55 +02:00
Karel Zak 7194825b7b tests: fix compiler warning
Signed-off-by: Karel Zak <kzak@redhat.com>
2013-04-18 11:23:34 +02:00
Karel Zak 922e6775e0 build-sys: move tests to check_PROGRAMS
Thanks to Mike Frysinger.

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-30 17:59:16 +02:00
Karel Zak c5e8db5f46 test_sysinfo: fix compiler warning [-Wmissing-prototypes]
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-07-16 18:38:14 +02:00
Karel Zak f38e5ff355 build-sys: cleanup .gitignore files
- move all binaries to top-level .gitignore
 - remove unnecessary */.gitignore files

Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:54 +02:00
Karel Zak ac73480a34 build-sys: convert tests/ to module
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-06-26 20:50:53 +02:00
Sami Kerola 6a91958bf8 pathnames: clean up various user database paths
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-18 14:28:05 +01:00
Sami Kerola f06b43285d build-sys: enhance readability of the autotools files
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>
2012-02-28 13:29:35 +01:00
Karel Zak 6301d23a65 tests: fix compiler warnings [-Wunused-parameter]
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-08-01 15:27:26 +02:00
Sami Kerola e429d14106 md5: use symbolical digest length
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>
2011-07-21 23:56:48 +02:00
Karel Zak aeefa8a416 test_sysinfo: fix printf format
Signed-off-by: Karel Zak <kzak@redhat.com>
2011-06-14 14:22:58 +02:00
Josiah Worcester 416723f089 test_sysinfo: Use CHAR_BIT*sizeof(void*) instead of __WORDSIZE.
Signed-off-by: Josiah Worcester <josiahw@gmail.com>
2011-06-14 13:59:07 +02:00
Fabian Groffen aabe244176 build-sys: use WORDS_BIGENDIAN to determine platform byte-order
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>
2011-01-17 15:34:45 +01:00
Karel Zak 601d12fb10 rename util-linux-ng back to util-linux
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-11-30 11:41:59 +01:00
Karel Zak c74c0dafff include: clean up _PATH_DEV_* macros
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-06-30 01:13:42 +02:00
Karel Zak 1f94344954 tests: add "byte-order" to helpers/test_sysinfo
Signed-off-by: Karel Zak <kzak@redhat.com>
2009-02-11 23:32:58 +01:00
Karel Zak 788a14403d tests: add MD5 regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-06 01:43:55 +01:00
Karel Zak 0112925a99 tests: add swabN() regression test
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-12-05 16:27:19 +01:00
maximilian attems d144727bc3 use getpagesize()
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>
2008-07-30 13:26:58 +02:00
James Youngman c4e1583799 build-sys: ignore a bunch of generated files, mostly binaries
Signed-off-by: James Youngman <jay@gnu.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2008-04-14 14:08:00 +02:00
Karel Zak 4d43977ffc include: add mount paths to pathnames.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-28 14:08:33 +01:00
Karel Zak 2f4564eac4 include: cleanup pathnames.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-28 13:17:16 +01:00
Karel Zak 1f5641f979 tests: add test for include/pathnames.h
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-28 12:52:59 +01:00
Karel Zak d00ed8911e tests: move test_bkdev to lib/
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-28 12:27:00 +01:00
Karel Zak 7df454fc9b tests: rename test_sysinfo, remove tailing white-spaces
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-28 12:11:51 +01:00
Stefan Krah 3738a48e08 lib: add blkdev.{c,h}
Now we duplicate BLK* ioctls on many places... This patch also
fix BLKGETSIZE64 usage in dependence on kernel version.

Co-Author: Karel Zak <kzak@redhat.com>
Signed-off-by: Stefan Krah <stefan@bytereef.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-11-07 12:37:30 +01:00
Karel Zak cd5e23c56a tests: fix ULONG_MAX usage on 32bit machines
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-08-14 12:05:29 +02:00
Karel Zak 92f2c23e68 tests: add license notices, change from gplv2-only to gplv2-or-later
The previous "gplv2-only" was copy&past mistake. This re-licensing is
correct -- there is not any other contributor to this code.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-23 14:31:14 +02:00
Karel Zak db0aaaa6a8 build-sys: remove libtool
Signed-off-by: Karel Zak <kzak@redhat.com>
2007-07-11 00:59:49 +02:00
Matthias Koenig 0df2f5d5aa tests: add missing header
minor patch, which adds a missing string.h header to
mnt_test_sysinfo.c

Signed-Off-By: Matthias Koenig <mkoenig@suse.de>
2007-04-04 12:43:39 +02:00
Karel Zak 82640b11ba tests: add library for LD_PRELOAD to manipulate with time() in tests
The cal command generates output that depends on time(). For reliable
regression tests we need to use still same time. It seems that LD_PRELOAD is
pretty simple way.

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-03-14 14:10:18 +01:00
Karel Zak 7ac3b5b8e3 Clean up pagesize/PAGE_SIZE usage.
Now all code in util-linux uses sysconf(_SC_PAGESIZE) that is standardized and
preferred way of querying page size. The asm/page.h file is not included to the
code anymore. (This patch doesn't change mount's FS detection code which will
be removed later).

Signed-off-by: Karel Zak <kzak@redhat.com>
2007-02-06 11:35:15 +01:00