Skip to content

Commit

Permalink
test: fix work dir path
Browse files Browse the repository at this point in the history
linux-user now resolves the full path name of the
started process at startup.

more info: qemu/qemu@258bec3

Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Jun 18, 2023
1 parent 736c99f commit 19ad4ea
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions test/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ execdirect() {
@test "shebang-direct" {
execdirect ./shebang.sh foo bar1
assert_success
assert_output "./printargs ./shebang.sh foo bar1"
assert_output "./printargs /work/shebang.sh foo bar1"
}

@test "relative-exec" {
Expand Down Expand Up @@ -111,23 +111,15 @@ execdirect() {
}

@test "shell-command-relative" {
if [ -n "$BINFMT_EMULATOR" ]; then
skip "prepend_workdir_if_relative is altering the behaviour for args when run under emulation"
fi

exec0 sh sh -c './shebang-path.sh foo bar1 bar2'
assert_success
assert_output "./printargs ./shebang-path.sh foo bar1 bar2"
assert_output "./printargs /work/shebang-path.sh foo bar1 bar2"
}

@test "shell-command-relative-direct" {
if [ -n "$BINFMT_EMULATOR" ]; then
skip "prepend_workdir_if_relative is altering the behaviour for args when run under emulation"
fi

execdirect sh -c './shebang-path.sh foo bar1 bar2'
assert_success
assert_output "./printargs ./shebang-path.sh foo bar1 bar2"
assert_output "./printargs /work/shebang-path.sh foo bar1 bar2"
}

@test "shell-command-relative-nested" {
Expand Down

0 comments on commit 19ad4ea

Please sign in to comment.