From 8f46f07df551d27acf71e5e4485d4471cca7bc57 Mon Sep 17 00:00:00 2001 From: Jo Zzsi Date: Sun, 25 Aug 2024 12:28:50 -0400 Subject: [PATCH] test: document and fix extra verbose mode (V=2) Set 'rd.debug' for all tests in 'V=2' mode to make it more verbose than 'V=1' test mode. --- .github/workflows/integration.yml | 4 +++- docs/HACKING.md | 7 ++++++- test/test-functions | 4 ++++ tools/test-github.sh | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 16c0bbe86..52893cbcd 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -5,7 +5,9 @@ on: branches: [ main ] env: - DEBUGFAIL: "${{ secrets.ACTIONS_STEP_DEBUG && 'rd.debug' }}" + # set V to 2 when re-running jobs with debug logging enabled + # see https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/troubleshooting-workflows/enabling-debug-logging + V: "${{ secrets.ACTIONS_STEP_DEBUG && '2' }}" jobs: basic: diff --git a/docs/HACKING.md b/docs/HACKING.md index 1921ec73e..9f489ce20 100644 --- a/docs/HACKING.md +++ b/docs/HACKING.md @@ -246,11 +246,16 @@ mentioned in the `test/container` Dockerfiles. $ make clean check ``` -in verbose mode: +in verbose mode (enabled for GitHub Actions): ``` $ make V=1 clean check ``` +in extra verbose mode (enabled for debug logging): +``` +$ make V=2 clean check +``` + only specific test: ``` $ make TESTS="01 20 40" clean check diff --git a/test/test-functions b/test/test-functions index a00578278..8aac2ec72 100644 --- a/test/test-functions +++ b/test/test-functions @@ -24,6 +24,10 @@ if [[ $V != "1" && $V != "2" ]]; then TEST_KERNEL_CMDLINE+="quiet " fi +if [[ $V == "2" ]]; then + TEST_KERNEL_CMDLINE+="rd.debug " +fi + test_dracut() { # directory for test configurations mkdir -p /tmp/dracut.conf.d diff --git a/tools/test-github.sh b/tools/test-github.sh index 73201d6e0..7b3c13655 100755 --- a/tools/test-github.sh +++ b/tools/test-github.sh @@ -34,6 +34,6 @@ else )" \ TEST_RUN_ID="$RUN_ID" \ ${TESTS:+TESTS="$TESTS"} \ - -k V=1 \ + -k V="${V:=1}" \ check fi