Hi,

On Tue, May 06, 2025 at 11:50:12AM +0200, Mark Wielaard wrote:
> The testsuite relies on there being no files in the test directory
> after the test finishes. A test will fail if the test dir cannot be
> removed. But the test dir isn't really random, it uses the pid of the
> shell script that executes the test. On some of the buildbots that
> execute a lot of tests it can happen that the pid number wraps around
> and a pid of a previous pid is reused. To prevent that happening
> generate a real random number (8 bytes) using od /dev/urandom and
> xargs (to trim away spaces left by od).
> 
>       * tests/test-subr.sh: Define test_name and random_number and use
>       those to define test_dir.

There were some discussions on irc one variants on this idea using
e.g. date +%s. But it didn't seem people objected to using od
/dev/urandom. So I pushed this variant since that is what I have been
testing.

Cheers,

Mark

Reply via email to