diff mbox series

[meta-oe,V2,1/1] postgresql: fix ptest failure of sysviews test

Message ID 20230327072939.2419804-1-manojsingh.saun@windriver.com
State Under Review
Headers show
Series [meta-oe,V2,1/1] postgresql: fix ptest failure of sysviews test | expand

Commit Message

Manoj Saun March 27, 2023, 7:29 a.m. UTC
In postgresql sysview ptest are failing due to hidden build info in pg_config table.
The information is hidden due to existing patch 0001-config_info.c-not-expose-build-info.patch
So for passing the test we need to reduce the row count in the sysviews test.
Also for test results to be shown as pass we need to reduce the row count for
the expected count in the sysviews.out file.

Signed-off-by: Manoj Saun <manojsingh.saun@windriver.com>
---
 ...gresql-fix-ptest-failure-of-sysviews.patch | 45 +++++++++++++++++++
 .../recipes-dbs/postgresql/postgresql_15.2.bb |  1 +
 2 files changed, 46 insertions(+)
 create mode 100644 meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch

Comments

Khem Raj March 27, 2023, 11:56 p.m. UTC | #1
There was a patch fuzz detected in this patch, I have fixed it this
time and pushed a refreshed patch to master-next, please check and
also make sure
to check this next time around.

On Mon, Mar 27, 2023 at 3:31 AM Manoj Saun
<manojsingh.saun@windriver.com> wrote:
>
> In postgresql sysview ptest are failing due to hidden build info in pg_config table.
> The information is hidden due to existing patch 0001-config_info.c-not-expose-build-info.patch
> So for passing the test we need to reduce the row count in the sysviews test.
> Also for test results to be shown as pass we need to reduce the row count for
> the expected count in the sysviews.out file.
>
> Signed-off-by: Manoj Saun <manojsingh.saun@windriver.com>
> ---
>  ...gresql-fix-ptest-failure-of-sysviews.patch | 45 +++++++++++++++++++
>  .../recipes-dbs/postgresql/postgresql_15.2.bb |  1 +
>  2 files changed, 46 insertions(+)
>  create mode 100644 meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch
>
> diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch b/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch
> new file mode 100644
> index 000000000..8abea7ff4
> --- /dev/null
> +++ b/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch
> @@ -0,0 +1,45 @@
> +From 9f81377dddfe32d950844d7053020a36b40fce08 Mon Sep 17 00:00:00 2001
> +From: Manoj Saun <manojsingh.saun@windriver.com>
> +Date: Wed, 22 Mar 2023 08:07:26 +0000
> +Subject: [PATCH] postgresql: fix ptest failure of sysviews
> +
> +The patch "0001-config_info.c-not-expose-build-info.patch" hides the debug info
> +in pg_config table which reduces the count of rows from pg_config and leads to
> +sysviews test failure.
> +To fix it we need to reduce the count of parameters in sysviews test.
> +Also we need to reduce the row count in expected result of sysview test
> +to make the test output shown as pass.
> +
> +Upstream-Status: Inappropriate [oe specific]
> +
> +Signed-off-by: Manoj Saun <manojsingh.saun@windriver.com>
> +---
> + src/test/regress/expected/sysviews.out | 2 +-
> + src/test/regress/sql/sysviews.sql      | 2 +-
> + 2 files changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/src/test/regress/expected/sysviews.out b/src/test/regress/expected/sysviews.out
> +index 579b861..3bfc31f 100644
> +--- a/src/test/regress/expected/sysviews.out
> ++++ b/src/test/regress/expected/sysviews.out
> +@@ -29,7 +29,7 @@ select name, ident, parent, level, total_bytes >= free_bytes
> + (1 row)
> +
> + -- At introduction, pg_config had 23 entries; it may grow
> +-select count(*) > 20 as ok from pg_config;
> ++select count(*) > 13 as ok from pg_config;
> +  ok
> + ----
> +  t
> +diff --git a/src/test/regress/sql/sysviews.sql b/src/test/regress/sql/sysviews.sql
> +index 351e469..84c113e 100644
> +--- a/src/test/regress/sql/sysviews.sql
> ++++ b/src/test/regress/sql/sysviews.sql
> +@@ -18,7 +18,7 @@ select name, ident, parent, level, total_bytes >= free_bytes
> +   from pg_backend_memory_contexts where level = 0;
> +
> + -- At introduction, pg_config had 23 entries; it may grow
> +-select count(*) > 20 as ok from pg_config;
> ++select count(*) > 13 as ok from pg_config;
> +
> + -- We expect no cursors in this test; see also portals.sql
> + select count(*) = 0 as ok from pg_cursors;
> +--
> +2.34.1
> +
> diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_15.2.bb b/meta-oe/recipes-dbs/postgresql/postgresql_15.2.bb
> index befb0caec..5c95e4da3 100644
> --- a/meta-oe/recipes-dbs/postgresql/postgresql_15.2.bb
> +++ b/meta-oe/recipes-dbs/postgresql/postgresql_15.2.bb
> @@ -8,6 +8,7 @@ SRC_URI += "\
>     file://0001-Improve-reproducibility.patch \
>     file://0001-configure.ac-bypass-autoconf-2.69-version-check.patch \
>     file://0001-config_info.c-not-expose-build-info.patch \
> +   file://0001-postgresql-fix-ptest-failure-of-sysviews.patch \
>  "
>
>  SRC_URI[sha256sum] = "99a2171fc3d6b5b5f56b757a7a3cb85d509a38e4273805def23941ed2b8468c7"
> --
> 2.32.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#101778): https://lists.openembedded.org/g/openembedded-devel/message/101778
> Mute This Topic: https://lists.openembedded.org/mt/97878908/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch b/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch
new file mode 100644
index 000000000..8abea7ff4
--- /dev/null
+++ b/meta-oe/recipes-dbs/postgresql/files/0001-postgresql-fix-ptest-failure-of-sysviews.patch
@@ -0,0 +1,45 @@ 
+From 9f81377dddfe32d950844d7053020a36b40fce08 Mon Sep 17 00:00:00 2001
+From: Manoj Saun <manojsingh.saun@windriver.com>
+Date: Wed, 22 Mar 2023 08:07:26 +0000
+Subject: [PATCH] postgresql: fix ptest failure of sysviews
+
+The patch "0001-config_info.c-not-expose-build-info.patch" hides the debug info
+in pg_config table which reduces the count of rows from pg_config and leads to
+sysviews test failure.
+To fix it we need to reduce the count of parameters in sysviews test.
+Also we need to reduce the row count in expected result of sysview test
+to make the test output shown as pass.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Manoj Saun <manojsingh.saun@windriver.com>
+---
+ src/test/regress/expected/sysviews.out | 2 +-
+ src/test/regress/sql/sysviews.sql      | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/test/regress/expected/sysviews.out b/src/test/regress/expected/sysviews.out
+index 579b861..3bfc31f 100644
+--- a/src/test/regress/expected/sysviews.out
++++ b/src/test/regress/expected/sysviews.out
+@@ -29,7 +29,7 @@ select name, ident, parent, level, total_bytes >= free_bytes
+ (1 row)
+ 
+ -- At introduction, pg_config had 23 entries; it may grow
+-select count(*) > 20 as ok from pg_config;
++select count(*) > 13 as ok from pg_config;
+  ok 
+ ----
+  t
+diff --git a/src/test/regress/sql/sysviews.sql b/src/test/regress/sql/sysviews.sql
+index 351e469..84c113e 100644
+--- a/src/test/regress/sql/sysviews.sql
++++ b/src/test/regress/sql/sysviews.sql
+@@ -18,7 +18,7 @@ select name, ident, parent, level, total_bytes >= free_bytes
+   from pg_backend_memory_contexts where level = 0;
+ 
+ -- At introduction, pg_config had 23 entries; it may grow
+-select count(*) > 20 as ok from pg_config;
++select count(*) > 13 as ok from pg_config;
+ 
+ -- We expect no cursors in this test; see also portals.sql
+ select count(*) = 0 as ok from pg_cursors;
+-- 
+2.34.1
+
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql_15.2.bb b/meta-oe/recipes-dbs/postgresql/postgresql_15.2.bb
index befb0caec..5c95e4da3 100644
--- a/meta-oe/recipes-dbs/postgresql/postgresql_15.2.bb
+++ b/meta-oe/recipes-dbs/postgresql/postgresql_15.2.bb
@@ -8,6 +8,7 @@  SRC_URI += "\
    file://0001-Improve-reproducibility.patch \
    file://0001-configure.ac-bypass-autoconf-2.69-version-check.patch \
    file://0001-config_info.c-not-expose-build-info.patch \
+   file://0001-postgresql-fix-ptest-failure-of-sysviews.patch \
 "
 
 SRC_URI[sha256sum] = "99a2171fc3d6b5b5f56b757a7a3cb85d509a38e4273805def23941ed2b8468c7"