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 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; } 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';"