Commit Graph

18 Commits

Author SHA1 Message Date
Craig Small ffff3eabdd testsuite: Remove trailing whitespace 2023-01-25 20:35:43 +11:00
Craig Small dd3cb0892d ps: Correct BSD c option
procps 3.3.17 the c option changed the command/args field
to cmd but this got removed as part of newlib

Functionality is back in with a test case.

References:
 https://bugs.debian.org/1026326

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2022-12-19 16:50:12 +11:00
Craig Small 56db0bd32c build-sys: Update tests to new binary locations 2022-08-29 19:13:10 +10:00
Craig Small 7597aaf7f9 testsuite: Add AIX field checks for ps
AIX fields (generally %char) have had some love now but
are parsed slightly differently to other fields, so they
have some tests.

References:
 commit 4fbf8d22a9
 https://www.freelists.org/post/procps/some-procpsn4400-fixes,7
Signed-off-by: Craig Small <csmall@dropbear.xyz>
2022-04-09 14:50:53 +10:00
Craig Small b98e5657ee testsuite: ps out tests more lenient
Sometimes due to race conditions or the way dejagnu gates the
output, or even there is another interesting process, the ps tests
sometimes fail. These changes make it a little more lenient without
losing the purpose of the test.

Replaces Debian patch ps_tests

References:
 https://salsa.debian.org/debian/procps/-/blob/debian/2%253.3.17-7/debian/patches/ps_checks
2022-03-22 20:20:53 +11:00
Craig Small 5d8746b941 misc: fix ps etime tests
The test assumes only one process appears which, depending on the
speed of things, may not be true. It now matches one to many process
lines.
2018-05-03 21:13:16 +10:00
Craig Small 90a4aee474 ps: Add NEWS and checks for times and cputimes
The previous commit had one minor bug in it because the fields need
to be alphabetical and times comes after timeout.

Added NEWS item for this feature
Added another testsuite check for new flags in case they
disappear or go strange one day.

References:
 commit 8a94ed6111
2018-03-02 22:22:25 +11:00
Craig Small 898e3cc3cf testsuite: fix ps signals test
On some setups the signals count can change and be truncated. You
will notice this because the number will have "<" prepended. The
testsuite didn't handle this.
You could either get:
         BLOCKED          BLOCKED          BLOCKED           CAUGHT
CAUGHT          CATCHED
0000000000000000 0000000000000000 0000000000000000 00000001f3d1fef9 00000001f3d1fef9 00000001f3d1fef9

or
  BLOCKED   BLOCKED   BLOCKED    CAUGHT    CAUGHT   CATCHED
 00000000  00000000  00000000 <f3d1fef9 <f3d1fef9 <f3d1fef9
2015-06-14 15:20:48 +10:00
dmarc-noreply@freelists.org af6e264b46 tests: fix regexp in ps_sched_batch.exp to match in first line
The current regexp checks for a \s+ in the beginning, however that will
only match if there is a \n in the `ps` output before test-schedbatch,
but that will not happen if test-schedbatch is the first process in the
list, which happens if the PID of test-schedbatch is low enough to bring
it up in the sorted list.

Fix it by enabling newline-sensitive matching with (?n) which then
allows using ^ and $ anchors in the regexp (including an optional \r
introduced by expect.) Matching the end of line also improves checking
that the last field matches 18 exactly and not something like 181, etc.

Tested that `make check` does not break and also fixed the flakiness
seen in an environment with few processes running under the test user
which made the issue more frequent.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
Signed-off-by: Craig Small <csmall@enc.com.au>
2015-05-10 15:05:02 +10:00
dmarc-noreply@freelists.org e981f2bbd2 tests: do not mark ps_sched_batch.exp as untested
Right now the test case is both testing it (expect_pass "$test") and
marking it as untested (untested "$test"), it should do either one or
the other, so stop marking it as untested.

Before this change, these lines appear in testsuite/ps.log or the output
of `make check RUNTESTFLAGS="--all"`:

  PASS: ps SCHED_BATCH scheduler
  UNTESTED: ps SCHED_BATCH scheduler

Note that the second line is confusing, it's implying that the test is
untested, right after having tested it and indicated it passes.

After this change, only the first line will appear.

Tested that both `make check` and `make distcheck` continue working with
this commit.

Signed-off-by: Filipe Brandenburger <filbranden@google.com>
Signed-off-by: Craig Small <csmall@enc.com.au>
2015-05-10 15:04:46 +10:00
Craig Small e0256d1fd6 revert ps_sched checks for following commits 2015-05-10 15:04:19 +10:00
Craig Small 4050148a45 Fix some sched and tty tests
The ps sched test has been disabled. There are too many
odd build farms this fails in strange ways.

Other odd build farms have no tty and so some tests check
for no tty and skip if not found.
2015-05-09 17:48:12 +10:00
Wouter van Kesteren cfd0dbd336 ps.test: see truncated user/group names as valid
With ps now truncating the names instead of chaning to UIDs for long
usernames, the check needs to be updated too
2012-12-13 21:45:28 +11:00
Craig Small ff6c8aad3e Added debian patch for kfreebsd bug 674785 2012-10-30 21:36:04 +11:00
Steven Chamberlain a5ba6b98c1 Description: fix to build on non-Linux arches
Fix the build where it seems a code fix for Linux was likely untested
on other systems.
Define SCHED_BATCH in test-schedbatch, for systems that don't have it;
the corresponding RH BZ#741090 patch used the magic value 3 in output.c
anyway.

Bug-Debian: http://bugs.debian.org/677055
2012-06-11 22:11:23 +10: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 23afed732a fixed small tests for pmap and ps checks 2011-12-01 22:42:23 +11:00
Craig Small 261a3fae83 fixed pgrep and added ps tests 2011-11-29 22:55:03 +11:00