I found that it depends on file permissions/ownership.
The construct:
  open L, ">$default_log"; close L; # empty default log file
only works if you are the file owner.

The test is running as root and the open/close will fail to open the
postgres:adm opened file.

A simple test might look like:
use strict;
use warnings;

my $default_log = "/tmp/test";

system("rm $default_log");
system("echo 'SOME TEST CONTENT' > $default_log");
system("chmod 666 $default_log");
system("chown postgres:adm $default_log");
system("id");

system("/usr/bin/ls","-laF","$default_log");
system("echo","PRE");
system("/usr/bin/cat","$default_log");
                                                                                
                                                                                
                              
open L, ">$default_log"; close L; # empty default log file                      
                                                                                
                              
                                  
system("echo","POST");
system("/usr/bin/cat","$default_log");


I'm still missing the role of the new procps version in this, as the
above is the same in both procps versions.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to procps in Ubuntu.
https://bugs.launchpad.net/bugs/1864423

Title:
  Failed test 'default log is not used' with new procps 3.3.16-1

Status in postgresql-common package in Ubuntu:
  New
Status in procps package in Ubuntu:
  New

Bug description:
  Since the new procps upload
   procps | 2:3.3.16-1ubuntu1   | focal-proposed  | source, amd64, arm64, 
armhf, i386, ppc64el, s390x
  the tests of postgresql-common fail.

  The issues are:
  autopkgtest [15:43:10]: test run-testsuite:  - - - - - - - - - - results - - 
- - - - - - - -
  run-testsuite        FAIL non-zero exit status 2
  autopkgtest [15:43:10]: test run-testsuite:  - - - - - - - - - - stderr - - - 
- - - - - - -
  #   Failed test 'default log is not used'
  #   at ./t/020_create_sql_remove.t line 143.
  #   Failed test 'default log is not used'
  #   at ./t/020_create_sql_remove.t line 154.
  # Looks like you failed 2 tests of 144.

  It was retried a few times by different people now and reproduced so
  we can assume it is a real issues for now.

  I was running two VMs to compare:
  $ sudo ~/work/autopkgtest/autopkgtest/runner/autopkgtest --no-built-binaries 
--apt-upgrade --test-name=run-testsuite --apt-pocket=proposed=src:procps 
--shell postgresql-common_211.dsc -- qemu --qemu-options='-cpu host' 
--ram-size=2048 --cpus 2 ~/work/autopkgtest-focal-amd64.img
  (and the other one without --apt-pocket=proposed=src:procps)

  The issue reproduced locally in only the one with the new procps.

  In Debian the latest similar run is
  
https://ci.debian.net/data/autopkgtest/testing/amd64/p/postgresql-common/4279031/log.gz
  
https://ci.debian.net/data/packages/testing/amd64/p/postgresql-common/4279031.log
  But that is pre-3.3.16 and I wasn't able to find their result with the same 
combination.

  Lets mark this bug update-excuse and check if we can find anything in
  these VMs.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/postgresql-common/+bug/1864423/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to