Package: release.debian.org Severity: normal Tags: bullseye User: release.debian....@packages.debian.org Usertags: pu X-Debbugs-Cc: postgresql-com...@packages.debian.org Control: affects -1 + src:postgresql-common
Hi, I've uploaded a new postgresql-common package to bullseye that fixes the autopktest tests on salsa-ci and ci.debian.net. (Test-only changes.) * Fix t/085 to correctly prepare the test environment * Tell ./testsuite to continue testing even when one test fails * Change debian/gitlab-ci.yml to use the standard pipeline The result is mostly green: https://salsa.debian.org/postgresql/postgresql-common/-/pipelines/585893 (The lintian error is an dependency on lsb-base that I don't want to touch in oldstable.) Please unblock postgresql-common/225+deb11u1 Thanks, Christoph
Control files: lines which differ (wdiff format) ------------------------------------------------ Vcs-Git: https://salsa.debian.org/postgresql/postgresql-common.git {+-b bullseye+} diff -Nru postgresql-common-225/debian/changelog postgresql-common-225+deb11u1/debian/changelog --- postgresql-common-225/debian/changelog 2021-02-02 15:40:25.000000000 +0100 +++ postgresql-common-225+deb11u1/debian/changelog 2023-10-02 10:20:47.000000000 +0200 @@ -1,3 +1,11 @@ +postgresql-common (225+deb11u1) bullseye; urgency=medium + + * t/085_pg_ctl.conf.t: sudo and salsa-ci set the core file size hard limit + to 0 by default, undo that. (Salsa: postgresql/postgresql#2) + * testsuite: Run all tests even when one is failing. + + -- Christoph Berg <m...@debian.org> Mon, 02 Oct 2023 10:20:47 +0200 + postgresql-common (225) unstable; urgency=medium * pg_lsclusters, cluster_info: Show cluster managed by pacemaker or patroni. diff -Nru postgresql-common-225/debian/control postgresql-common-225+deb11u1/debian/control --- postgresql-common-225/debian/control 2020-10-22 14:15:09.000000000 +0200 +++ postgresql-common-225+deb11u1/debian/control 2023-10-02 10:20:47.000000000 +0200 @@ -8,7 +8,7 @@ Peter Eisentraut <pet...@debian.org>, Standards-Version: 4.4.0 Rules-Requires-Root: no -Vcs-Git: https://salsa.debian.org/postgresql/postgresql-common.git +Vcs-Git: https://salsa.debian.org/postgresql/postgresql-common.git -b bullseye Vcs-Browser: https://salsa.debian.org/postgresql/postgresql-common Build-Depends: debhelper (>= 9), diff -Nru postgresql-common-225/debian/gitlab-ci.yml postgresql-common-225+deb11u1/debian/gitlab-ci.yml --- postgresql-common-225/debian/gitlab-ci.yml 2020-09-30 09:27:36.000000000 +0200 +++ postgresql-common-225+deb11u1/debian/gitlab-ci.yml 2023-10-02 10:20:47.000000000 +0200 @@ -1,44 +1,5 @@ -.debian_script: &debian_script - - $SUDO apt-get update - - $SUDO apt-get -o DPkg::Options::=--force-confnew dist-upgrade -y - - $SUDO apt-get install -y build-essential fakeroot debhelper libreadline-dev dh-systemd - - rm -f ../*.deb ../*.dsc ../*.buildinfo ../*.changes ../*.tar.* - - dpkg-buildpackage -uc -us -rfakeroot - - ( set -x; for deb in ../*.deb; do dpkg-deb --info $deb; dpkg-deb --contents $deb; done ) - - ( set -x; $SUDO dpkg --force-confmiss --force-confnew -i ../*.deb || { $SUDO apt-get install -fy; $SUDO dpkg --force-confmiss --force-confnew -i ../*.deb; } ) - - dpkg -l postgresql\* | cat - - $SUDO ./cleanpg - - cd /usr/share/postgresql-common && $SUDO ./testsuite -v "$(./supported-versions)" -i +include: + - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml -sid: - image: debian:unstable - script: *debian_script - variables: - SKIP_IPV6: 1 - -buster: - tags: - - buster - script: *debian_script - variables: - SUDO: sudo - -stretch: - tags: - - stretch - script: *debian_script - variables: - SUDO: sudo - -centos7: - tags: - - centos7 - script: - - sudo yum install -y rpm-build centos-release-scl epel-release # for llvm - - make rpmremove - - make rpmbuild - - rpm -ql pgdg-redhat-repo > /dev/null || sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm - - sudo yum -y update - - make rpminstall - - sudo ./cleanpg - - cd /usr/share/postgresql-common && sudo ./testsuite -v "$(./supported-versions)" -i +variables: + RELEASE: 'bullseye' diff -Nru postgresql-common-225/t/085_pg_ctl.conf.t postgresql-common-225+deb11u1/t/085_pg_ctl.conf.t --- postgresql-common-225/t/085_pg_ctl.conf.t 2019-11-15 19:58:53.000000000 +0100 +++ postgresql-common-225+deb11u1/t/085_pg_ctl.conf.t 2023-10-02 10:20:47.000000000 +0200 @@ -6,7 +6,7 @@ use TestLib; use PgCommon; -use Test::More tests => $MAJORS[-1] >= '8.3' ? 29 : 1; +use Test::More tests => $MAJORS[-1] >= '8.3' ? 33 : 1; # Do test with newest version my $v = $MAJORS[-1]; @@ -15,38 +15,37 @@ exit 0; } -is ((system "pg_createcluster $v main >/dev/null"), 0, "pg_createcluster $v main"); +# enable core dumps +# sudo and salsa-ci set the hard limit to 0 by default, undo that +is_program_out 0, "prlimit --core=0:unlimited --pid=$$", 0, '', "set core file size to unlimited"; +is_program_out 'postgres', "sh -c 'ulimit -Hc'", 0, "unlimited\n", "core file size is unlimited"; +# create cluster +is ((system "pg_createcluster $v main >/dev/null"), 0, "pg_createcluster $v main"); ok (-f "/etc/postgresql/$v/main/pg_ctl.conf", "/etc/postgresql/$v/main/pg_ctl.conf exists"); # Default behaviour, core size=0 -is_program_out 'postgres', "pg_ctlcluster $v main start", 0, '', "starting cluster"; - +is_program_out 0, "pg_ctlcluster $v main start", 0, '', "starting cluster as root"; is_program_out 'postgres', "xargs -i awk '/core/ {print \$5}' /proc/{}/limits < /var/run/postgresql/$v-main.pid", 0, "0\n", "soft core size is 0"; +my $hard_limit = `xargs -i awk '/core/ {print \$6}' /proc/{}/limits < /var/run/postgresql/$v-main.pid`; +chomp $hard_limit; +note "hard core file size limit of root-started postgres process is $hard_limit"; # -c in pg_ctl.conf, core size=unlimited ok (set_cluster_pg_ctl_conf($v, 'main', '-c'), "set pg_ctl default option to -c"); - -is_program_out 'postgres', "pg_ctlcluster $v main restart", 0, '', "restarting cluster"; - -is_program_out 'postgres', "xargs -i awk '/core/ {print \$5}' /proc/{}/limits < /var/run/postgresql/$v-main.pid", 0, "unlimited\n", "soft core size is unlimited"; +is_program_out 0, "pg_ctlcluster $v main restart", 0, '', "restarting cluster as root"; +is_program_out 'postgres', "xargs -i awk '/core/ {print \$5}' /proc/{}/limits < /var/run/postgresql/$v-main.pid", 0, "$hard_limit\n", "soft core size is $hard_limit"; # Back to default behaviour, core size=0 - +is_program_out 0, "pg_ctlcluster $v main stop", 0, '', "stopping cluster"; ok (set_cluster_pg_ctl_conf($v, 'main', ''), "restored pg_ctl default option"); -is_program_out 'postgres', "pg_ctlcluster $v main restart", 0, '', "restarting cluster"; - -is_program_out 'postgres', "xargs -i awk '/core/ {print \$5}' /proc/{}/limits < /var/run/postgresql/$v-main.pid", 0, "0\n", "soft core size is 0"; - # pg_ctl -c, core size=unlimited - -is_program_out 'postgres', "pg_ctlcluster $v main restart -- -c", 0, '', "restarting cluster with -c on the command line"; - +is_program_out 'postgres', "pg_ctlcluster $v main start -- -c", 0, '', "starting cluster with -c on the command line as postgres"; is_program_out 'postgres', "xargs -i awk '/core/ {print \$5}' /proc/{}/limits < /var/run/postgresql/$v-main.pid", 0, "unlimited\n", "soft core size is unlimited"; +is_program_out 'postgres', "pg_ctlcluster $v main stop", 0, '', "stopping cluster"; is ((system "pg_dropcluster $v main --stop"), 0, 'dropping cluster'); - check_clean; # vim: filetype=perl diff -Nru postgresql-common-225/testsuite postgresql-common-225+deb11u1/testsuite --- postgresql-common-225/testsuite 2020-10-22 14:13:18.000000000 +0200 +++ postgresql-common-225+deb11u1/testsuite 2023-10-02 10:20:47.000000000 +0200 @@ -200,14 +200,23 @@ for T; do TBASE=${T##*/} [ "${FROM:-}" ] && [ "${TBASE%%_*}" -lt "${FROM:-}" ] && continue - echo "=== Running test $TBASE ... ===" + echo "### PostgreSQL test $TBASE ###" perl -I. $T || { EXIT=$? + FAILED_TESTS="${FAILED_TESTS:-} $T" if [ "${FAILURE:-}" ]; then echo "*** $TBASE failed with status $EXIT, dropping you into a shell in the testbed ***" ${SHELL:-/bin/sh} fi - exit $EXIT } + echo "### End test $TBASE ###" + echo done done + +if [ "${FAILED_TESTS:-}" ]; then + echo "Failed tests: $FAILED_TESTS" + echo +fi + +exit ${EXIT:-0}