Annotation of /trunk/mkinitrd-magellan/busybox/testsuite/pidof.tests
Parent Directory | Revision Log
Revision 816 -
(hide annotations)
(download)
Fri Apr 24 18:33:46 2009 UTC (15 years, 1 month ago) by niro
File size: 1022 byte(s)
Fri Apr 24 18:33:46 2009 UTC (15 years, 1 month ago) by niro
File size: 1022 byte(s)
-updated to busybox-1.13.4
1 | niro | 532 | #!/bin/sh |
2 | |||
3 | # pidof tests. | ||
4 | niro | 816 | # Copyright 2005 by Bernhard Reutner-Fischer |
5 | niro | 532 | # Licensed under GPL v2, see file LICENSE for details. |
6 | |||
7 | # AUDIT: | ||
8 | |||
9 | . testing.sh | ||
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" "" "" | ||
23 | |||
24 | optional FEATURE_PIDOF_OMIT | ||
25 | niro | 816 | # This test fails now because process name matching logic has changed, |
26 | # but new logic is not "wrong" either... see find_pid_by_name.c comments | ||
27 | #testing "pidof -o %PPID" "pidof -o %PPID pidof.tests | grep -o -w $$" "" "" "" | ||
28 | niro | 532 | testing "pidof -o %PPID NOP" "pidof -o %PPID -s init" "1\n" "" "" |
29 | testing "pidof -o init" "pidof -o 1 init | grep -o -w 1" "" "" "" | ||
30 | |||
31 | exit $FAILCOUNT |
Properties
Name | Value |
---|---|
svn:executable | * |