From fe133bd419c802eb5795fab24c2de1fe73d96e9b Mon Sep 17 00:00:00 2001 From: Emir Beganovic Date: Mon, 5 Oct 2026 01:45:19 +0200 Subject: [PATCH] ci: hand root-owned test results to the runner; install progress every 30 s The harness runs as root in its container, so test-runs and the serial logs QEMU writes there belong to root. The runner's user could then neither record the pull request number beside them nor read install-serial.log into the artifact (EACCES at zip time), which failed the job after a passing install and boot. A chown -R step after the container step, run even on failure, fixes both. The install loop now prints a line every 30 s and still screenshots every 2 min. --- .github/workflows/install-test.yml | 14 +++++++++----- test/integration.d/base-test.sh | 4 +++- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/install-test.yml b/.github/workflows/install-test.yml index 4cd5e11..ccec9b0 100644 --- a/.github/workflows/install-test.yml +++ b/.github/workflows/install-test.yml @@ -57,6 +57,14 @@ jobs: ./test/integration release/*.iso boot --no-preview --memory 8192 --timeout 1800 ' + # The harness ran as root in its container: test-runs and what QEMU + # wrote there (the serial logs) belong to root until this step. + - name: Hand the results to the runner's user + if: always() + run: | + mkdir -p test-runs + sudo chown -R "$(id -u):$(id -g)" test-runs + - name: Report times if: always() run: | @@ -89,11 +97,7 @@ jobs: # it needs the PR number, which a workflow_run event omits for forks. - name: Record the pull request if: always() && github.event_name == 'pull_request' - run: | - # The harness ran as root in its container and created test-runs. - mkdir -p test-runs - sudo chown "$(id -u):$(id -g)" test-runs - echo "${{ github.event.pull_request.number }}" > test-runs/pr-number + run: echo "${{ github.event.pull_request.number }}" > test-runs/pr-number - name: Upload test artifacts if: always() diff --git a/test/integration.d/base-test.sh b/test/integration.d/base-test.sh index 901b9e5..b9d4ab3 100644 --- a/test/integration.d/base-test.sh +++ b/test/integration.d/base-test.sh @@ -569,11 +569,13 @@ install_phase() { return 1 fi + # A line every 30 s so a slow runner never looks hung; a screenshot of + # the installer's dashboard every 2 min, which is enough to see progress. if ((waited % 120 == 0)); then printf -v progress_name 'success-install-progress-%04ds' "$waited" capture_console "$progress_name" - echo " ... installing (${waited}s)" fi + ((waited % 30 == 0)) && echo " ... installing (${waited}s)" sleep 10 ((waited += 10))