From: Giuseppe Scrivano Date: Sat, 4 Jul 2009 08:25:03 +0000 (+0200) Subject: tests: refactor code to use require_proc_pid_status_ X-Git-Tag: v7.5~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c20fd053bd60187a2837933d83238a0586a99f1;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/tests/tail-2/tail-n0f b/tests/tail-2/tail-n0f index 322fddcf3a..fce7ed16ec 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 ;;