This is an automated email from the ASF dual-hosted git repository.
reshke pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/main by this push:
new 01a7acd11cb FIx regress and TAP test for amcheck and enable in CI
(#1489)
01a7acd11cb is described below
commit 01a7acd11cb20c89371e779ff7f8f1f9674dacb3
Author: reshke <[email protected]>
AuthorDate: Mon Dec 15 20:04:12 2025 +0500
FIx regress and TAP test for amcheck and enable in CI (#1489)
Fix amcheck regression test output
Turns out amcheck contrib expression test were read since DIRECTORY TABLE
feature.
Fix that, also add amcheck to CI
Also, fix TAP test. 003 - disable this test, 2PC tx are not supported for
CBDB. for 001 - replace verify_heapam with verify_heapam_internal, for sake of
this test expected output.
---
.github/workflows/build-cloudberry.yml | 1 +
.github/workflows/build-deb-cloudberry.yml | 1 +
contrib/amcheck/expected/check_heap.out | 10 +++++-----
contrib/amcheck/t/001_verify_heapam.pl | 18 +++++++++---------
contrib/amcheck/t/003_cic_2pc.pl | 7 ++++++-
5 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/build-cloudberry.yml
b/.github/workflows/build-cloudberry.yml
index 4f4d4f3939a..1d529e21b11 100644
--- a/.github/workflows/build-cloudberry.yml
+++ b/.github/workflows/build-cloudberry.yml
@@ -286,6 +286,7 @@ jobs:
},
{"test":"ic-contrib",
"make_configs":["contrib/auto_explain:installcheck",
+ "contrib/amcheck:installcheck",
"contrib/citext:installcheck",
"contrib/btree_gin:installcheck",
"contrib/file_fdw:installcheck",
diff --git a/.github/workflows/build-deb-cloudberry.yml
b/.github/workflows/build-deb-cloudberry.yml
index 6299c9500c6..2e87b8aa948 100644
--- a/.github/workflows/build-deb-cloudberry.yml
+++ b/.github/workflows/build-deb-cloudberry.yml
@@ -225,6 +225,7 @@ jobs:
},
{"test":"ic-deb-contrib",
"make_configs":["contrib/auto_explain:installcheck",
+ "contrib/amcheck:installcheck",
"contrib/citext:installcheck",
"contrib/btree_gin:installcheck",
"contrib/file_fdw:installcheck",
diff --git a/contrib/amcheck/expected/check_heap.out
b/contrib/amcheck/expected/check_heap.out
index b6e98eaa68d..cf9ff0941d0 100644
--- a/contrib/amcheck/expected/check_heap.out
+++ b/contrib/amcheck/expected/check_heap.out
@@ -227,7 +227,7 @@ CREATE TABLE test_partitioned (a int, b text default
repeat('x', 5000))
SELECT * FROM verify_heapam('test_partitioned',
startblock := NULL,
endblock := NULL);
-ERROR: "test_partitioned" is not a table, materialized view, or TOAST table
+ERROR: "test_partitioned" is not a table, directory table, materialized view,
or TOAST table
CONTEXT: SQL statement "SELECT t.blkno, t.offnum, t.attnum, t.msg
FROM verify_heapam_internal(relation,
on_error_stop,
@@ -268,7 +268,7 @@ CREATE INDEX test_index ON test_partition (a);
SELECT * FROM verify_heapam('test_index',
startblock := NULL,
endblock := NULL);
-ERROR: "test_index" is not a table, materialized view, or TOAST table
+ERROR: "test_index" is not a table, directory table, materialized view, or
TOAST table
CONTEXT: SQL statement "SELECT t.blkno, t.offnum, t.attnum, t.msg
FROM verify_heapam_internal(relation,
on_error_stop,
@@ -283,7 +283,7 @@ CREATE VIEW test_view AS SELECT 1;
SELECT * FROM verify_heapam('test_view',
startblock := NULL,
endblock := NULL);
-ERROR: "test_view" is not a table, materialized view, or TOAST table
+ERROR: "test_view" is not a table, directory table, materialized view, or
TOAST table
CONTEXT: SQL statement "SELECT t.blkno, t.offnum, t.attnum, t.msg
FROM verify_heapam_internal(relation,
on_error_stop,
@@ -298,7 +298,7 @@ CREATE SEQUENCE test_sequence;
SELECT * FROM verify_heapam('test_sequence',
startblock := NULL,
endblock := NULL);
-ERROR: "test_sequence" is not a table, materialized view, or TOAST table
+ERROR: "test_sequence" is not a table, directory table, materialized view, or
TOAST table
CONTEXT: SQL statement "SELECT t.blkno, t.offnum, t.attnum, t.msg
FROM verify_heapam_internal(relation,
on_error_stop,
@@ -315,7 +315,7 @@ CREATE FOREIGN TABLE test_foreign_table () SERVER
dummy_server;
SELECT * FROM verify_heapam('test_foreign_table',
startblock := NULL,
endblock := NULL);
-ERROR: "test_foreign_table" is not a table, materialized view, or TOAST table
+ERROR: "test_foreign_table" is not a table, directory table, materialized
view, or TOAST table
CONTEXT: SQL statement "SELECT t.blkno, t.offnum, t.attnum, t.msg
FROM verify_heapam_internal(relation,
on_error_stop,
diff --git a/contrib/amcheck/t/001_verify_heapam.pl
b/contrib/amcheck/t/001_verify_heapam.pl
index 64ba64d6b41..b9dbb42a67f 100644
--- a/contrib/amcheck/t/001_verify_heapam.pl
+++ b/contrib/amcheck/t/001_verify_heapam.pl
@@ -31,18 +31,18 @@ check_all_options_uncorrupted('test', 'plain');
#
fresh_test_table('test');
corrupt_first_page('test');
-detects_heap_corruption("verify_heapam('test')", "plain corrupted table");
+detects_heap_corruption("verify_heapam_internal('test')", "plain corrupted
table");
detects_heap_corruption(
- "verify_heapam('test', skip := 'all-visible')",
+ "verify_heapam_internal('test', skip := 'all-visible')",
"plain corrupted table skipping all-visible");
detects_heap_corruption(
- "verify_heapam('test', skip := 'all-frozen')",
+ "verify_heapam_internal('test', skip := 'all-frozen')",
"plain corrupted table skipping all-frozen");
detects_heap_corruption(
- "verify_heapam('test', check_toast := false)",
+ "verify_heapam_internal('test', check_toast := false)",
"plain corrupted table skipping toast");
detects_heap_corruption(
- "verify_heapam('test', startblock := 0, endblock := 0)",
+ "verify_heapam_internal('test', startblock := 0, endblock := 0)",
"plain corrupted table checking only block zero");
#
@@ -50,13 +50,13 @@ detects_heap_corruption(
#
fresh_test_table('test');
$node->safe_psql('postgres', q(VACUUM (FREEZE, DISABLE_PAGE_SKIPPING) test));
-detects_no_corruption("verify_heapam('test')",
+detects_no_corruption("verify_heapam_internal('test')",
"all-frozen not corrupted table");
corrupt_first_page('test');
-detects_heap_corruption("verify_heapam('test')",
+detects_heap_corruption("verify_heapam_internal('test')",
"all-frozen corrupted table");
detects_no_corruption(
- "verify_heapam('test', skip := 'all-frozen')",
+ "verify_heapam_internal('test', skip := 'all-frozen')",
"all-frozen corrupted table skipping all-frozen");
# Returns the filesystem path for the named relation.
@@ -208,7 +208,7 @@ sub check_all_options_uncorrupted
. "endblock := $endblock";
detects_no_corruption(
-
"verify_heapam('$relname', $opts)",
+
"verify_heapam_internal('$relname', $opts)",
"$prefix: $opts");
}
}
diff --git a/contrib/amcheck/t/003_cic_2pc.pl b/contrib/amcheck/t/003_cic_2pc.pl
index 445aabaa5e9..eb4d9361955 100644
--- a/contrib/amcheck/t/003_cic_2pc.pl
+++ b/contrib/amcheck/t/003_cic_2pc.pl
@@ -9,7 +9,11 @@ use Config;
use PostgresNode;
use TestLib;
-use Test::More tests => 5;
+use Test::More tests => 0 + 1;#5;
+
+SKIP:
+{
+ skip "TWO PHASE transactions are not supported in Cloudberry, skip
test", 1;
Test::More->builder->todo_start('filesystem bug')
if TestLib::has_wal_read_bug;
@@ -186,3 +190,4 @@ $node->pgbench(
$node->stop;
done_testing();
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]