From a8a0b1ffced343d358c47289d3ccc6e73de252e5 Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Wed, 29 Jul 2026 11:30:59 +0200 Subject: [PATCH 1/3] Include output of failing TAP tests into regression diff section --- .github/workflows/linux-32bit-build-and-test.yaml | 15 +++++++++++++++ .github/workflows/linux-build-and-test.yaml | 15 +++++++++++++++ .github/workflows/sanitizer-build-and-test.yaml | 14 ++++++++++++++ 3 files changed, 44 insertions(+) diff --git a/.github/workflows/linux-32bit-build-and-test.yaml b/.github/workflows/linux-32bit-build-and-test.yaml index f929a0b966d..26850836302 100644 --- a/.github/workflows/linux-32bit-build-and-test.yaml +++ b/.github/workflows/linux-32bit-build-and-test.yaml @@ -230,6 +230,21 @@ jobs: run: | find . -name regression.diffs -exec cat {} + > regression.log + # TAP tests do not produce regression.diffs. Append prove's failure + # summary from installcheck.log plus, for each failing test, the failed + # assertions + sed -n '/^Test Summary Report/,/^Result:/p' installcheck.log >> regression.log 2>/dev/null || true + for t in $(grep -hoE 't/[^ ]+\.pl[[:space:]]+\(Wstat' installcheck.log 2>/dev/null | sed -E 's#t/(.+)\.pl.*#\1#'); do + echo "=== regress_log_$t ===" >> regression.log + find . -name "regress_log_$t" -exec awk ' + FNR==1 { blk=0 } + { sub(/^\[[0-9:.]+\]\([0-9.]+s\) /, "") } + /^ok |^not ok |^# Looks like|^# Running:|^1\.\.|^Bail out/ { blk=0 } + /^# Failed test/ { blk=1 } + blk { print } + ' {} + >> regression.log || true + done + if [[ -s regression.log ]]; then echo "regression_diff=true" >>$GITHUB_OUTPUT; fi grep -e 'FAILED' -e 'failed (ignored)' -e 'not ok' installcheck.log || true cat regression.log diff --git a/.github/workflows/linux-build-and-test.yaml b/.github/workflows/linux-build-and-test.yaml index 4738a66a74d..c9369430eb6 100644 --- a/.github/workflows/linux-build-and-test.yaml +++ b/.github/workflows/linux-build-and-test.yaml @@ -267,6 +267,21 @@ jobs: run: | find . -name regression.diffs -exec cat {} + > regression.log + # TAP tests do not produce regression.diffs. Append prove's failure + # summary from installcheck.log plus, for each failing test, the failed + # assertions + sed -n '/^Test Summary Report/,/^Result:/p' installcheck.log >> regression.log 2>/dev/null || true + for t in $(grep -hoE 't/[^ ]+\.pl[[:space:]]+\(Wstat' installcheck.log 2>/dev/null | sed -E 's#t/(.+)\.pl.*#\1#'); do + echo "=== regress_log_$t ===" >> regression.log + find . -name "regress_log_$t" -exec awk ' + FNR==1 { blk=0 } + { sub(/^\[[0-9:.]+\]\([0-9.]+s\) /, "") } + /^ok |^not ok |^# Looks like|^# Running:|^1\.\.|^Bail out/ { blk=0 } + /^# Failed test/ { blk=1 } + blk { print } + ' {} + >> regression.log || true + done + if [[ "${{ runner.os }}" == "Linux" ]] ; then # wait in case there are in-progress coredumps sleep 10 diff --git a/.github/workflows/sanitizer-build-and-test.yaml b/.github/workflows/sanitizer-build-and-test.yaml index 5b43dbc8ab6..16b9e058bc7 100644 --- a/.github/workflows/sanitizer-build-and-test.yaml +++ b/.github/workflows/sanitizer-build-and-test.yaml @@ -174,6 +174,20 @@ jobs: id: collectlogs run: | find . -name regression.diffs -exec cat {} + > regression.log + # TAP tests do not produce regression.diffs. Append prove's failure + # summary from installcheck.log plus, for each failing test, the failed + # assertions + sed -n '/^Test Summary Report/,/^Result:/p' installcheck.log >> regression.log 2>/dev/null || true + for t in $(grep -hoE 't/[^ ]+\.pl[[:space:]]+\(Wstat' installcheck.log 2>/dev/null | sed -E 's#t/(.+)\.pl.*#\1#'); do + echo "=== regress_log_$t ===" >> regression.log + find . -name "regress_log_$t" -exec awk ' + FNR==1 { blk=0 } + { sub(/^\[[0-9:.]+\]\([0-9.]+s\) /, "") } + /^ok |^not ok |^# Looks like|^# Running:|^1\.\.|^Bail out/ { blk=0 } + /^# Failed test/ { blk=1 } + blk { print } + ' {} + >> regression.log || true + done if [[ "${{ runner.os }}" == "Linux" ]] ; then # wait in case there are in-progress coredumps sleep 10 From d872d1d4dc22d479ea6286778442dc3be3d111dd Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Wed, 29 Jul 2026 20:44:28 +0200 Subject: [PATCH 2/3] Make compression_merge_race test output not depend on chunk name --- tsl/test/isolation/expected/compression_merge_race.out | 8 ++++---- tsl/test/isolation/specs/compression_merge_race.spec | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tsl/test/isolation/expected/compression_merge_race.out b/tsl/test/isolation/expected/compression_merge_race.out index a4b5b97b41e..70302dd2f77 100644 --- a/tsl/test/isolation/expected/compression_merge_race.out +++ b/tsl/test/isolation/expected/compression_merge_race.out @@ -98,11 +98,11 @@ count|expected starting permutation: s1_compress_single_chunk s1_compress_all_chunks_single_transaction s3_select_on_compressed_chunk s3_wait_for_finish s1_compress_finish step s1_compress_single_chunk: - select compress_chunk(c, true) from show_chunks('sensor_data') c limit 1; + select compress_chunk(c, true) is not null as compress from show_chunks('sensor_data') c limit 1; -compress_chunk -------------------------------------------- -_timescaledb_internal._hyper_X_X_chunk +compress +-------- +t step s1_compress_all_chunks_single_transaction: BEGIN; diff --git a/tsl/test/isolation/specs/compression_merge_race.spec b/tsl/test/isolation/specs/compression_merge_race.spec index 399ef596091..16592b50293 100644 --- a/tsl/test/isolation/specs/compression_merge_race.spec +++ b/tsl/test/isolation/specs/compression_merge_race.spec @@ -74,7 +74,7 @@ step "s1_compress_finish" { } step "s1_compress_single_chunk" { - select compress_chunk(c, true) from show_chunks('sensor_data') c limit 1; + select compress_chunk(c, true) is not null as compress from show_chunks('sensor_data') c limit 1; } From 8bd0fe3690361171b0e8fb52800c7f3a21d699ff Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Wed, 29 Jul 2026 21:44:28 +0200 Subject: [PATCH 3/3] Fix race-condition in recompression_spin_lock_test --- tsl/test/t/005_recompression_spin_lock_test.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tsl/test/t/005_recompression_spin_lock_test.pl b/tsl/test/t/005_recompression_spin_lock_test.pl index fbab1372ada..ee89e7e5f92 100644 --- a/tsl/test/t/005_recompression_spin_lock_test.pl +++ b/tsl/test/t/005_recompression_spin_lock_test.pl @@ -150,6 +150,12 @@ $s3->query_safe( "SELECT debug_waitpoint_release('chunk_recompress_after_latch');"); +# Session 1 re-acquires the lock asynchronously after the waitpoint is +# released, so poll until it shows up before asserting. +$node->poll_query_until('postgres', + "SELECT count(*) > 0 FROM pg_locks WHERE relation::regclass::text LIKE '%hyper_1_%chunk' AND granted AND mode = 'ExclusiveLock';" +) or die "timed out waiting for ExclusiveLock on uncompressed chunk"; + # Verify ExclusiveLock on uncompressed chunk $result = $node->safe_psql('postgres', "SELECT relation::regclass::text FROM pg_locks WHERE relation::regclass::text LIKE '%hyper_1_%chunk' AND granted AND mode = 'ExclusiveLock';"