This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new bd6d7717eaa Enable ignore label in tests
bd6d7717eaa is described below
commit bd6d7717eaa475dab7a018c97594006202cd09df
Author: Jinbao Chen <[email protected]>
AuthorDate: Sat Mar 7 22:01:05 2026 -0500
Enable ignore label in tests
---
src/backend/optimizer/plan/setrefs.c | 2 +-
src/test/regress/expected/vacuum_stats.out | 8 ++++----
src/test/regress/pg_regress.c | 32 +++++++++++++++++++++++++++++-
3 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/src/backend/optimizer/plan/setrefs.c
b/src/backend/optimizer/plan/setrefs.c
index 268115f948c..10c36fac5d5 100644
--- a/src/backend/optimizer/plan/setrefs.c
+++ b/src/backend/optimizer/plan/setrefs.c
@@ -729,7 +729,7 @@ add_rte_to_flat_rtable(PlannerGlobal *glob, List
*rteperminfos,
* Add a copy of the RTEPermissionInfo, if any, corresponding to this
RTE
* to the flattened global list.
*/
- if (rte->perminfoindex > 0)
+ if (rte->perminfoindex > 0 && OidIsValid(rte->relid))
{
RTEPermissionInfo *perminfo;
RTEPermissionInfo *newperminfo;
diff --git a/src/test/regress/expected/vacuum_stats.out
b/src/test/regress/expected/vacuum_stats.out
index 685b9866636..573f7527fde 100644
--- a/src/test/regress/expected/vacuum_stats.out
+++ b/src/test/regress/expected/vacuum_stats.out
@@ -8,8 +8,8 @@ SELECT true FROM pg_class WHERE oid='vacstat_test'::regclass
AND relpages > 0
AND reltuples > 0
AND relallvisible > 0;
- bool
-------
+ ?column?
+----------
t
(1 row)
@@ -23,8 +23,8 @@ AND reltuples =
AND relallvisible =
(SELECT SUM(relallvisible) FROM gp_dist_random('pg_class')
WHERE oid='vacstat_test'::regclass);
- bool
-------
+ ?column?
+----------
t
(1 row)
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 0f6b9ea859e..e6ec0a860f2 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -2301,6 +2301,7 @@ run_schedule(const char *schedule, test_start_function
startfunc,
instr_time starttimes[MAX_PARALLEL_TESTS];
instr_time stoptimes[MAX_PARALLEL_TESTS];
int statuses[MAX_PARALLEL_TESTS];
+ _stringlist *ignorelist = NULL;
char scbuf[1024];
FILE *scf;
int line_num = 0;
@@ -2338,6 +2339,20 @@ run_schedule(const char *schedule, test_start_function
startfunc,
continue;
if (strncmp(scbuf, "test: ", 6) == 0)
test = scbuf + 6;
+ else if (strncmp(scbuf, "ignore: ", 8) == 0)
+ {
+ c = scbuf + 8;
+ while (*c && isspace((unsigned char) *c))
+ c++;
+ add_stringlist_item(&ignorelist, c);
+
+ /*
+ * Note: ignore: lines do not run the test, they just
say that
+ * failure of this test when run later on is to be
ignored. A bit
+ * odd but that's how the shell-script version did it.
+ */
+ continue;
+ }
else
{
bail("syntax error in schedule file \"%s\" line %d: %s",
@@ -2505,7 +2520,20 @@ run_schedule(const char *schedule, test_start_function
startfunc,
{
if (differ)
{
- test_status_failed(tests[i],
INSTR_TIME_GET_MILLISEC(stoptimes[i]), (num_tests > 1));
+ bool ignore = false;
+ _stringlist *sl;
+
+ for (sl = ignorelist; sl != NULL; sl =
sl->next)
+ {
+ if (strcmp(tests[i], sl->str)
== 0)
+ {
+ ignore = true;
+ break;
+ }
+ }
+
+ if (!ignore)
+ test_status_failed(tests[i],
INSTR_TIME_GET_MILLISEC(stoptimes[i]), (num_tests > 1));
}
else
{
@@ -2524,6 +2552,8 @@ run_schedule(const char *schedule, test_start_function
startfunc,
}
}
+ free_stringlist(&ignorelist);
+
fclose(scf);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]