Skip to content

Commit 05017cd

Browse files
authored
test: fix on subprocess test (#11947)
Signed-off-by: Rudi Grinberg <[email protected]>
1 parent 7b57de6 commit 05017cd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/blackbox-tests/test-cases/cram/subprocess.t

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ project with a single cram test.
77

88
We create a file for tracking the PID of a subprocess.
99

10-
$ FILE=$(realpath ./pid.txt)
10+
$ pidFile="$PWD/pid.txt"
1111

1212
We create a cram test that spawns a subprocess and records its PID in the file
1313
we gave before.
1414

1515
$ cat > mycram.t <<EOF
1616
> $ sleep 5 &
17-
> $ echo \$! > $FILE
17+
> $ echo \$! > $pidFile
1818
> EOF
1919

2020
We can now run this test, which will record its PID in the file.
@@ -24,7 +24,7 @@ We can now run this test, which will record its PID in the file.
2424
The test finished successfully, now we make sure that the PID was correctly
2525
terminated.
2626

27-
$ [ -s $FILE ] && echo pid file created
27+
$ [ -s $pidFile ] && echo pid file created
2828
pid file created
29-
$ ps -p $(cat $FILE) > /dev/null || echo "Process terminated"
29+
$ ps -p $(cat $pidFile) > /dev/null || echo "Process terminated"
3030
Process terminated

0 commit comments

Comments
 (0)