Subject: Issues running the testsuite as root (was: Re: bug#12041: GNU Automake 1.12.2 - FAIL 4 tests on SunOS5.10_sparcv9_64-bit)

From: Stefano Lattarini <[email-masked]>
Date: Tue, 24 Jul 2012 14:48:35 +0200

severity 12041 minor
retitle 12041 Issues running the testsuite as root
thanks

Hi Dennis, thanks for the report.

On 07/24/2012 02:25 PM, Dennis Clarke wrote:
> 
> 
> n.b.: see attached self-check-exit.log.gz 
>       and GNU_Automake_1.12.2_SunOS5.10_sparcv9_64-bit.test.log.gz
>       and GNU_Automake_1.12.2_SunOS5.10_sparcv9_64-bit.test-suite.log.gz
> 
> The final count at the bottom of a *over* 24 hour long test run was : 
> 
> ============================================================================
> Testsuite summary for GNU Automake 1.12.2
> ============================================================================
> # TOTAL: 2578
> # PASS:  2221
> # SKIP:  307
> # XFAIL: 46
> # FAIL:  4
> # XPASS: 0
> # ERROR: 0
> ============================================================================
> See ./test-suite.log
> Please report to [email-masked]
> ============================================================================
> 
> I go looking for "test-suite.log" and find these : 
> 
> bash-3.2# find . -type f -name test-suite.log
> ./test-suite.log
> ./t/parallel-tests-many.dir/test-suite.log
> ./t/tap-bad-prog.dir/test-suite.log
> 
> Not very helpful given this : 
> 
> bash-3.2# find . -type f -name test-suite.log | xargs wc -l 
>    37162 ./test-suite.log
>       14 ./t/parallel-tests-many.dir/test-suite.log
>       35 ./t/tap-bad-prog.dir/test-suite.log
>    37211 total
> 
> So I scroll back up the xterm until I see : 
> 
> FAIL: t/self-check-exit.tap 33 - syntax error 1
> FAIL: t/self-check-exit.tap 34 - syntax error 2
> FAIL: t/self-check-explicit-skips.sh
>
These are known testsuite issues (not real bugs in automake), and have
already been solved in the development version of Automake.  So we don't
need to worry about them.

> ..and a little further up I see : 
> 
> FAIL: t/primary-prefix-couples-force-valid.sh
>
This is new :-/

> bash-3.2# cat ./t/primary-prefix-couples-force-valid.log
>
> Running from installcheck: no
> Using TAP: no
> PATH = /usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/ax:/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/wrap:/usr/local/bin:/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/opt/studio/SOS12/SUNWspro/bin:/usr/bin:/sbin:/bin:/usr/sbin:/usr/dt/bin:/usr/openwin/bin:/opt/schily/bin
> +++ pwd
> /usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir
> + cat
> + cat
> + cat
> + cat
> + :
> + aclocal-1.12 -Werror
> + automake-1.12 --foreign -Werror -Wall -a
> configure.ac:5: installing './ar-lib'
> + autoconf
> ++ pwd
> + cwd=/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir
> + ./configure --prefix=/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst
> checking for a BSD-compatible install... ./install-sh -c
> checking whether build environment is sane... yes
> checking for a thread-safe mkdir -p... ./install-sh -c -d
> checking for gawk... no
> checking for mawk... no
> checking for nawk... nawk
> checking whether make sets $(MAKE)... yes
> checking for gcc... /opt/studio/SOS12/SUNWspro/bin/cc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables... 
> checking whether we are cross compiling... no
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... no
> checking whether /opt/studio/SOS12/SUNWspro/bin/cc accepts -g... yes
> checking for /opt/studio/SOS12/SUNWspro/bin/cc option to accept ISO C89... none needed
> checking for style of include used by make... GNU
> checking dependency style of /opt/studio/SOS12/SUNWspro/bin/cc... none
> checking the archiver (/usr/ccs/bin/ar) interface... ar
> checking for ranlib... ranlib
> checking that generated files are newer than configure... done
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: executing depfiles commands
> + make install
> source='libquux.c' object='libquux.o' libtool=no \
> DEPDIR=.deps depmode=none /bin/bash ./depcomp \
> /opt/studio/SOS12/SUNWspro/bin/cc -DPACKAGE_NAME=\"primary-prefix-couples-force-valid\" -DPACKAGE_TARNAME=\"primary-prefix-couples-force-valid\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"primary-prefix-couples-force-valid\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"primary-prefix-couples-force-valid\" -DVERSION=\"1.0\" -I.      -g -c libquux.c
> rm -f libquux.a
> /usr/ccs/bin/ar cru libquux.a libquux.o 
> ranlib libquux.a
> source='foo.c' object='foo.o' libtool=no \
> DEPDIR=.deps depmode=none /bin/bash ./depcomp \
> /opt/studio/SOS12/SUNWspro/bin/cc -DPACKAGE_NAME=\"primary-prefix-couples-force-valid\" -DPACKAGE_TARNAME=\"primary-prefix-couples-force-valid\" -DPACKAGE_VERSION=\"1.0\" -DPACKAGE_STRING=\"primary-prefix-couples-force-valid\ 1.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"primary-prefix-couples-force-valid\" -DVERSION=\"1.0\" -I.      -g -c foo.c
> /opt/studio/SOS12/SUNWspro/bin/cc  -g   -o foo foo.o  
>  ./install-sh -c -d '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/bin'
>  ./install-sh -c -m 644  libquux.a '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/bin'
>  ( cd '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/bin' && ranlib libquux.a )
>  ./install-sh -c -d '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/lib'
>   ./install-sh -c foo '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/lib'
>  ./install-sh -c -d '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/libexec'
>  ./install-sh -c -m 644 bar.h '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/libexec'
> + make installcheck
> (cd '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst' && find .);: For debugging.
> .
> ./bin
> ./bin/libquux.a
> ./lib
> ./lib/foo
> ./libexec
> ./libexec/bar.h
> ls -l '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/lib/foo'
> -rwxr-xr-x   1 root     root        7944 Jul 24 00:52 /usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/lib/foo
> test -f '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/lib/foo'
> test -x '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/lib/foo'
> ls -l '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/bin/libquux.a'
> -rw-r--r--   1 root     root        2360 Jul 24 00:52 /usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/bin/libquux.a
> test -f '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/bin/libquux.a'
> ls -l '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/libexec/bar.h'
> -rw-r--r--   1 root     root           0 Jul 24 00:52 /usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/libexec/bar.h
> test -f '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/libexec/bar.h'
> test ! -x '/usr/local/build/automake-1.12.2_SunOS5.10_sparcv9_64-bit/t/primary-prefix-couples-force-valid.dir/_inst/libexec/bar.h'
> *** Error code 1
> make: Fatal error: Command failed for target `test'
>
Huh?  According to the output of "ls -l" above, the installed file
'libexec/bar.h' is *not* executable.  So why is this test failing?

Hah!  It happens because you are running the test as root.  My advice
is: don't do that.  Still, since this seems to be the only spurious
failure experienced due to the extra privileges, it might be worth
fixing it, since that would be pretty easy to so.  So I'm not closing
this bug report yet.

> Any other info required ?  Let me know.
>
Just to be extra-sure: does the test pass if you run it as a non-root
user?  If you don't have to check this, no big deal, as I'm already
pretty sure my diagnosis is correct.

Thanks,
  Stefano