From f767ccd7a8f294f192e7d99b357660a376fad4b4 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Wed, 3 Jul 2024 22:59:04 +0200 Subject: [PATCH] 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 fec38819acc9a95a7ed18b8f103fb5d9a59c3c41 $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: --- src/tests/kvm/virtme-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/kvm/virtme-run.sh b/src/tests/kvm/virtme-run.sh index e509d3443..1e707d308 100755 --- a/src/tests/kvm/virtme-run.sh +++ b/src/tests/kvm/virtme-run.sh @@ -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="\