diff options
author | Giuseppe Scrivano <gscrivano@gnu.org> | 2009-07-04 10:25:03 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-07-04 10:47:56 +0200 |
commit | 2c20fd053bd60187a2837933d83238a0586a99f1 (patch) | |
tree | 1c0aa4102ad4720a5d2b6c565f66f94ebd24642f | |
parent | 42cd6653b06e63fc36ef3f105fd37de036012e05 (diff) | |
download | coreutils-2c20fd053bd60187a2837933d83238a0586a99f1.tar.xz |
tests: refactor code to use require_proc_pid_status_
* tests/tail-2/tail-n0f: Read the process status using the test-lib.sh
require_proc_pid_status_ function.
-rwxr-xr-x | tests/tail-2/tail-n0f | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f index 322fddcf3..fce7ed16e 100755 --- a/tests/tail-2/tail-n0f +++ b/tests/tail-2/tail-n0f @@ -40,9 +40,7 @@ for file in empty nonempty; do tail --sleep=4 -${c_or_n} 0 -f $file & pid=$! sleep .5 - set _ `sed -n '/^State:[ ]*\([^ ]\)/s//\1/p' /proc/$pid/status` - shift # Remove the leading `_'. - state=$1 + state=$(get_process_status_ $pid) case $state in S*) ;; *) echo $0: process in unexpected state: $state 1>&2; fail=1 ;; |