Commit Graph

84 Commits

Author SHA1 Message Date
Gilles Espinasse
e6bc629756 Fix w tests when no user is logged in
When the build system is a chroot with no user logged in , all w tests fail because of {1,} match rule for the userline
Allow 0 match replacing {1,} with *

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
2012-05-08 22:51:19 +10:00
Jim Warner
421b08a4df all: fix misspellings in docs and program comments
We might as well join the coreutils and util-linux
projects in correcting our own typos.

The following was left unchanged:
   top/top.c[1797]: thru -> "through"

references:
http://lists.gnu.org/archive/html/coreutils/2012-04/msg00057.html
http://marc.info/?l=util-linux-ng&m=133518057419736&w=2

Signed-off-by: Jim Warner <james.warner@comcast.net>
2012-04-25 13:46:02 +10:00
Sami Kerola
beab98a036 tests: do not assume sleep command path
The testsuite failed on archlinux which has sleep in /usr/bin/
instead of /bin/ directory.  This commit will make expect to use
$PATH to determine where sleep is.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-16 20:25:23 +02:00
Sami Kerola
f97fd76667 tests: add lib/ contents to make check
This will take tests in following commits in use.

commit 56ed9826a5
commit c7cf98b0e0

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-04-06 15:32:57 +02:00
Sami Kerola
c7cf98b0e0 lib: add fileutils file with stream error checking facility
The close_stream() is copied from GNU lib. Inspiration to do this
is talk by Jim Meyering - Goodbye World! The perils of relying on
output streams in C.

Reference: http://www.irill.org/events/ghm-gnu-hackers-meeting/videos/jim-meyering-goodbye-world-the-perils-of-relying-on-output-streams-in-c
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-23 15:57:41 +01:00
Sami Kerola
00744108c6 docs: add testsuite readme file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-03 18:36:29 +11:00
Sami Kerola
56ed9826a5 test: add lib/strutils check
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-03-03 18:36:29 +11:00
Craig Small
502a79e02f Merge remote-tracking branch 'sami/to-craig' into sami-merge
Conflicts:
	pgrep.c
	w.c
2012-03-03 13:56:32 +11:00
Craig Small
a15520db8c ps abort causes problems in testsuite
Under certain circumstances, using abort() when either make check
or make distcheck puts ps into an infinite loop around the
function catastrophic_failure() in ps and the C library raise
and abort functions.

Using exit removes this problem and does almost the same thing.
2012-03-03 11:49:48 +11:00
Craig Small
82c6fccacb fixed uptime check regexp 2012-03-02 23:05:28 +11:00
Sami Kerola
4d8f9522a7 tests: fix dejagnu pwdx and vmstat checks
The pwdx check expected error message, which where in use for only
short period of time.  The old message was put in place in commit
9d47cb0c38

The vmstat issue was triggered by 'sr0' cdrom device, which gives
following unexpected output.  Fix simply ignores partitions which has
zero activity.  Besides such partitions probably would not apply as
good candidate of -p option anyway.

$ vmstat -p sr0
Partition was not found

Reported-By: Moritz Muehlenhoff <jmm@debian.org>
Bug-Debian: http://bugs.debian.org/656508
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2012-02-11 21:42:21 +01:00
Jim Warner
3ad8fd56ed vmstat: slabinfo (-m option) test disabled if not readable
The dejagnu tests for slabtop are skipped when "/proc/slabinfo" is
unreadable due to permissions.  This commit provides the same check
for vmstat under its -m (slabinfo) option.
2012-01-14 00:04:46 +11:00
Mike Fleetwood
23d2e0b0b7 tests: add SCHED_BATCH test
Reference: https://bugzilla.redhat.com/show_bug.cgi?id=741090
Acked-by:: Jaromir Capik <jcapik@redhat.com>
Acked-by:  Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
2012-01-09 21:37:41 +01:00
Craig Small
5219a9c453 Check for 0 repeat count and tests in free
free checks for -c 0 now too.
testsuite has new checks for the checks.
2012-01-04 10:07:31 +11:00
Craig Small
532dc9239d Updated testsuite files for new NLS output 2012-01-02 17:39:41 +11:00
Craig Small
f9ab2fec43 Added Debian bug note for pgrep -u and testsuite
Makefile.am testsuite needed to explicitly state the files because while
everything else works, make distcheck fails.

NEWS got updated with the Debian bug number for pgrep -u
2011-12-06 21:37:45 +11:00
Craig Small
db602e1d44 slabtop check has optional spaces at start of line
There is a race condition between expect script consuming the output
from slabtop. There were a sequences of lines that looked like
^\d+ ... \s*
with the last \s* consuming the first space on the start of the line.
However if the line takes too long to print, then expect stops there and
the space at the start of the subsquent line does not match.

The solution is a \s* at the start ofthe line.
2011-12-04 22:08:23 +11:00
Sami Kerola
5277341278 tests: clean up kill temporary file
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-03 20:20:27 +01:00
Sami Kerola
adab19653a build-sys: site.exp does not need to be in dist package
The file is automatically generated by make.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-03 20:20:27 +01:00
Sami Kerola
9d6dc4d8c3 build-sys: simplify tests EXTRA_DIST configuration
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-03 20:20:27 +01:00
Sami Kerola
03a1a42e28 build-sys: make DEJATOOL definition uncondictional
Fix to ./autogen.sh error bellow.

/usr/share/automake-1.11/am/dejagnu.am: DEJATOOL was already defined in condition LINUX, which is included in condition TRUE ...
testsuite/Makefile.am:6: ... `DEJATOOL' previously defined here

Reference: http://www.freelists.org/post/procps/procpsng-331-nearly-there,5
Reported-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-03 20:20:14 +01:00
Craig Small
e7a0fe5bee Fixing tests due to some results
Makefile will now only test for Linux systems, a work around in the
makefile due to some silly redefine restrictions.

uptime and w now won't error due to being one user logged in, thanks to
Sami for the patch

kill processes by pid test commented out due to false negatives

pwdx process 1 check also commented out due to false negatives
2011-12-04 00:50:36 +11:00
Craig Small
3d807ae853 Minor test fixes for non-linux
procps works well on Linux, on other arches there are some strange
differences due to their emulation of procfs which is not 100%
Disabling checks for non-linux until that can be sorted out.
2011-12-03 00:32:14 +11:00
Craig Small
226c1f2a6f Added slabtop tests 2011-12-02 22:41:03 +11:00
Craig Small
23afed732a fixed small tests for pmap and ps checks 2011-12-01 22:42:23 +11:00
Craig Small
f05e15e830 More testing added for procps 2011-11-30 23:11:35 +11:00
Craig Small
261a3fae83 fixed pgrep and added ps tests 2011-11-29 22:55:03 +11:00
Craig Small
b36fe6efc5 Add sysctl check and tests to extra_dist 2011-11-28 22:02:27 +11:00
Craig Small
919e37787e added uptime and vmstat tests 2011-11-27 19:12:56 +11:00
Craig Small
5c48d8b79a rearranged testsuite 2011-11-27 18:32:10 +11:00
Craig Small
2cad7c5667 more free tests and pgrep tests
Almost fully testing all features of pgrep now.
free had additional tests added to it
2011-11-27 15:30:04 +11:00
Craig Small
49c99b1189 Additional tests for free command 2011-11-24 23:06:06 +11:00
Craig Small
82eafe3fe8 new free commands 2011-11-23 22:48:49 +11:00
Craig Small
451f6e6111 testsuite fixes 2011-11-23 21:44:51 +11:00