Subject: Re: Refactoring the regression tests for more independence

From: Julien Rouhaud <[email-masked]>
Date: Tue, 8 Feb 2022 10:57:40 +0800

On Mon, Feb 07, 2022 at 02:00:25PM -0500, Tom Lane wrote:
> Not too surprisingly, these patches broke during the commitfest.
> Here's a rebased version.
> 
> I'm not sure that anyone wants to review these in detail ...
> should I just go ahead and push them?

I don't see anything shocking after a quick glance, and I don't think any
review is going to give any more confidence compared to the script-dep-testing
script, so +1 for pushing them since the cf bot is green again.

---

From: Tom Lane <[email-masked]>
Date: Tue, 08 Feb 2022 15:42:01 -0500

> script, so +1 for pushing them since the cf bot is green again.

Done, will watch the farm.

			regards, tom lane

---

From: Aleksander Alekseev <[email-masked]>
Date: Fri, 22 Jul 2022 22:21:35 +0300

Hi hackers,

> Done, will watch the farm.

I wanted to test one of the patches we have for the July CF on the
Raspberry Pi 3 Model B+. It runs Raspbian GNU/Linux 10 (buster) and
Linux Kernel 5.10.60-v7+.

I discovered that the PostgreSQL tests don't pass in this environment.
Using `git bisect` I was able to pinpoint the problem to cc50080a and
found this thread. Currently `REL_15_STABLE` and `master` are
affected.

To build PostgreSQL I use my regular set of scripts [1] and the
following command:

```
./quick-build.sh && ./single-install.sh && make installcheck
``

regression.diffs and regression.out are attached. The same tests pass
just fine on Ubuntu Linux and MacOS.

I didn't investigate the problem further since it's pretty late in my
timezone. I just wanted to share my current discoveries with you.
Since we have several agents on buildfarm running Raspbian that are
pretty happy with the patch I would guess this may have something to
do with particular flags and/or configure options I'm using.

[1]: https://github.com/afiskon/pgscripts/

-- 
Best regards,
Aleksander Alekseev

---

From: Tom Lane <[email-masked]>
Date: Fri, 22 Jul 2022 15:42:48 -0400

> I discovered that the PostgreSQL tests don't pass in this environment.

Since you haven't explained what's different about this environment,
it's hard to comment on these results.  But is this really a stock
Postgres source tree, with no local modifications?  The fragment of
src/test/regress/expected/copy.out that you show does not look
current.

			regards, tom lane

---

From: Aleksander Alekseev <[email-masked]>
Date: Fri, 22 Jul 2022 22:58:28 +0300

Hi Tom,

> src/test/regress/expected/copy.out that you show does not look

Yes, this is a stock PostgreSQL source code without any modification,
with `git clean -dfx` etc.

The fragment of copy.out probably doesn't look current because I was
using `git bisect` and I'm on cc50080a82 right now. However the same
tests fail on both `master` and `REL_15_STABLE`. It takes a while on
Raspberry Pi to rebuild Postgres :)

To clarify, the step that is failing is `./quick-build.sh`, or `make
check' in this script to be precise. So postgresql.conf I'm using in
single-install.sh has nothing to do with the problem, this step is not
reached.

Sorry about the confusion regarding the environment differences. GCC
version is 8.3.0, Perl 5.28.1. All in all this is pretty much the
default Raspbian 10 environment, something you would typically get
after setting up your RPi 3 B+ using Raspberry Pi Imager and running
`apt update`, nothing exotic. Please let me know if there are any
other details of interest.

I'll continue looking for the source of the problem and will post an
update as soon as I have one.

-- 
Best regards,
Aleksander Alekseev

---

From: Tom Lane <[email-masked]>
Date: Fri, 22 Jul 2022 18:58:48 -0400

> other details of interest.

FWIW, I tried to replicate this locally on my own RPi3B+, using
current Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-1066-raspi aarch64).
No luck: it all works fine for me.  We have at least one Raspbian
buildfarm animal too, and it's not been unhappy either.  I suspect
there is something odd about your environment settings.

			regards, tom lane

---

From: Aleksander Alekseev <[email-masked]>
Date: Sat, 23 Jul 2022 13:58:31 +0300

Hi Tom,

> there is something odd about your environment settings.

Thanks for sharing this.

I repeated the experiment in a clean environment (Raspbian installed
from scratch on a brand new SD-card) and can confirm that the problem
is gone.

Sorry for the disturbance.

-- 
Best regards,
Aleksander Alekseev