From 4a846a9d19962691142b0cef01fd043a4346842b Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Fri, 9 Apr 2021 03:28:05 +0100 Subject: [PATCH] tests/basic.sh: ensure use of correct tmp directory --- src/cmd/ksh93/tests/basic.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmd/ksh93/tests/basic.sh b/src/cmd/ksh93/tests/basic.sh index ea88cd83d..fb00ba4a7 100755 --- a/src/cmd/ksh93/tests/basic.sh +++ b/src/cmd/ksh93/tests/basic.sh @@ -215,6 +215,7 @@ if [[ $x != "hello there" ]] then err_exit "scripts in subshells fail" fi cd ~- || err_exit "cd back failed" +cd "$tmp" x=$( ("$binecho" foo) 2> /dev/null ) if [[ $x != foo ]] then err_exit "subshell in command substitution fails" @@ -616,6 +617,7 @@ esac # When running a script without a #! hashbang path, ksh attempts to replace argv with the arguments # of the script. However, fixargs() didn't wipe out the rest of previous arguments after the last # \0. This caused an erroneous record in /proc//cmdline and the output of the ps command. +cd '$tmp" getPsOutput() { # UNIX95=1 makes this work on HP-UX. actual=$(UNIX95=1 ps -o args= -p "$1" 2>&1)