1
0
Fork 0

tests/kvm: Create the status tempfile in the build dir

mktemp can create a tempfile relative to a directory passed in via -p.
It also uses the $TMPDIR variable for the same purpose. When the
template is specified via -t, $TMPDIR takes precedence over -p. When the
template is specified via a positional argument, -p takes precedence.

Since fec38819ac $TMPDIR is set via the
dbus runner which took precedence.

virtme-ng doesn't seem to share /tmp with the host system which results
in the exit status from the test in the VM not propagating back to the
test harness.

Fix that by making sure we always create the tempfile for the result in
the build directory.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3867>
This commit is contained in:
Sebastian Wick 2024-07-03 22:59:04 +02:00 committed by Marge Bot
parent 041a404ba0
commit f767ccd7a8

View file

@ -9,7 +9,7 @@ WRAPPER_ARGS="$3"
TEST_BUILD_DIR="$4"
VM_ENV="$5"
TEST_RESULT_FILE=$(mktemp -p "$TEST_BUILD_DIR" -t test-result-XXXXXX)
TEST_RESULT_FILE=$(mktemp -p "$TEST_BUILD_DIR" test-result-XXXXXX)
echo 1 > "$TEST_RESULT_FILE"
VIRTME_ENV="\