Last change
on this file since 2833 was 2725, checked in by Bruno Cornec, 14 years ago |
- Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
|
-
Property svn:executable
set to
*
|
File size:
1.0 KB
|
Rev | Line | |
---|
[821] | 1 | #!/bin/sh
|
---|
| 2 |
|
---|
| 3 | # pidof tests.
|
---|
[2725] | 4 | # Copyright 2005 by Bernhard Reutner-Fischer
|
---|
| 5 | # Licensed under GPLv2, see file LICENSE in this source tree.
|
---|
[821] | 6 |
|
---|
[1765] | 7 | # AUDIT:
|
---|
[821] | 8 |
|
---|
[2725] | 9 | . ./testing.sh
|
---|
[821] | 10 |
|
---|
| 11 | # testing "test name" "options" "expected result" "file input" "stdin"
|
---|
| 12 |
|
---|
| 13 | testing "pidof (exit with error)" \
|
---|
| 14 | "pidof veryunlikelyoccuringbinaryname ; echo \$?" "1\n" "" ""
|
---|
| 15 | testing "pidof (exit with success)" "pidof pidof > /dev/null; echo \$?" \
|
---|
| 16 | "0\n" "" ""
|
---|
| 17 | # We can get away with this because it says #!/bin/sh up top.
|
---|
| 18 |
|
---|
| 19 | testing "pidof this" "pidof pidof.tests | grep -o -w $$" "$$\n" "" ""
|
---|
| 20 |
|
---|
| 21 | optional FEATURE_PIDOF_SINGLE
|
---|
| 22 | testing "pidof -s" "pidof -s init" "1\n" "" ""
|
---|
[2725] | 23 | SKIP=
|
---|
[821] | 24 |
|
---|
[2725] | 25 | optional FEATURE_PIDOF_OMIT FEATURE_PIDOF_SINGLE
|
---|
| 26 | # This test fails now because process name matching logic has changed,
|
---|
| 27 | # but new logic is not "wrong" either... see find_pid_by_name.c comments
|
---|
| 28 | #testing "pidof -o %PPID" "pidof -o %PPID pidof.tests | grep -o -w $$" "" "" ""
|
---|
[821] | 29 | testing "pidof -o %PPID NOP" "pidof -o %PPID -s init" "1\n" "" ""
|
---|
[1765] | 30 | testing "pidof -o init" "pidof -o 1 init | grep -o -w 1" "" "" ""
|
---|
[2725] | 31 | SKIP=
|
---|
[821] | 32 |
|
---|
| 33 | exit $FAILCOUNT
|
---|
Note:
See
TracBrowser
for help on using the repository browser.