GNU bug report logs - #12778
Failure when running check-root make target

Previous Next

Package: coreutils;

Reported by: Matt Burgess <matthew <at> linuxfromscratch.org>

Date: Thu, 1 Nov 2012 20:33:01 UTC

Severity: normal

To reply to this bug, email your comments to 12778 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#12778; Package coreutils. (Thu, 01 Nov 2012 20:33:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Matt Burgess <matthew <at> linuxfromscratch.org>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 01 Nov 2012 20:33:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Matt Burgess <matthew <at> linuxfromscratch.org>
To: bug-coreutils <at> gnu.org
Cc: matthew <at> linuxfromscratch.org
Subject: Failure when running check-root make target
Date: Thu, 01 Nov 2012 20:29:33 +0000
Hi,

When running 'make NON_ROOT_USERNAME=nobody check-root' on
coreutils-8.20, I get:

  CCLD   test-xvasprintf
  CC     test-yesno.o
  CCLD   test-yesno
make[6]: Leaving directory
`/home/burgessm/sources/coreutils-8.20/gnulib-tests'
make  check-TESTS
make[6]: Entering directory
`/home/burgessm/sources/coreutils-8.20/gnulib-tests'
make[7]: Entering directory
`/home/burgessm/sources/coreutils-8.20/gnulib-tests'
make[7]: *** No rule to make target `tests/chown/basic.sh.log', needed
by `test-suite.log'.  Stop.
make[7]: Leaving directory
`/home/burgessm/sources/coreutils-8.20/gnulib-tests'
make[6]: *** [check-TESTS] Error 2

This looks a little odd to me, as it appears that its finished building
the gnulib-tests, comes out of that directory, then immediately goes
back in to then start running coreutils' own tests, which it has already
successfully run.  Unless I've completely misread the logs, that is.

This is on a Fedora-17 host, in case it's caused by make (3.82) or
something else in the toolchain.

Thanks,

Matt.





Information forwarded to bug-coreutils <at> gnu.org:
bug#12778; Package coreutils. (Sun, 04 Nov 2012 19:13:01 GMT) Full text and rfc822 format available.

Message #8 received at 12778 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Warshall <warshall <at> 99main.com>
To: 12778 <at> debbugs.gnu.org
Subject: Failure when running check-root make target
Date: Sun, 4 Nov 2012 13:13:01 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Hi,
> 
> When running 'make NON_ROOT_USERNAME=nobody check-root' on
> coreutils-8.20, I get:
> 
>   CCLD   test-xvasprintf
>   CC     test-yesno.o
>   CCLD   test-yesno
> make[6]: Leaving directory
> `/home/burgessm/sources/coreutils-8.20/gnulib-tests'
> make  check-TESTS
> make[6]: Entering directory
> `/home/burgessm/sources/coreutils-8.20/gnulib-tests'
> make[7]: Entering directory
> `/home/burgessm/sources/coreutils-8.20/gnulib-tests'
> make[7]: *** No rule to make target `tests/chown/basic.sh.log', needed
> by `test-suite.log'.  Stop.
> make[7]: Leaving directory
> `/home/burgessm/sources/coreutils-8.20/gnulib-tests'
> make[6]: *** [check-TESTS] Error 2
> 
> This looks a little odd to me, as it appears that its finished
> building the gnulib-tests, comes out of that directory, then
> immediately goes back in to then start running coreutils' own tests,
> which it has already successfully run.  Unless I've completely
> misread the logs, that is.
> 
> This is on a Fedora-17 host, in case it's caused by make (3.82) or
> something else in the toolchain.
> 
> Thanks,
> 
> Matt.


I'm getting the same thing --- same version of make, too. I think it's
finished building the gnulib-tests and is at the time of the error
trying to start running them. At that point, it's looking for  logs
of the non-gnulib tests in tests/ (the non-gnulib testing dir). Those
exist, but under names like foo.log (for test foo), whereas
gnulib-tests/Makefile is expecting foo.sh.log. I tried to wade through
the Makefile to find the problem, but failed miserably. It would be
good if someone who understands Autoconf could look at this.

Please note that this problem didn't exist in 8.19.

              -Andrew Warshall
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBAgAGBQJQlrAtAAoJEESPRWh79T7teZsH/R3m6XDE8xfMO5q3RntSPNoQ
UzdBeeUnykY7OlUX4uJO5dwA1fOaEPqNAw9exValA0zj6UO+oZfbYBsJyOKcxSDK
hlKsbHJXxQPIe4FcO4ALJyU9CuNxuZJU4DLpC1Qwste1cbUzcraWJQc2RHAptg4C
5sgOx/yEVHdmW6UM4jQtVa4xYaw7l8pWlQbuwJOzszufVMa/YJREcscFlPT7k1WQ
zEMy8dE0REPV8nh3KT8YS6zmUw3PLYjcqu+xzsm2lQZNIoKwQ1ZXZCWwP6SxzjBh
hqdp8el62PR7CxRu4YpbqUasHZ5WPlpERd7vziYWMFAjgLBPYI3NKjPDBYMqLSA=
=p2g+
-----END PGP SIGNATURE-----

Information forwarded to bug-coreutils <at> gnu.org:
bug#12778; Package coreutils. (Sun, 04 Nov 2012 20:21:02 GMT) Full text and rfc822 format available.

Message #11 received at 12778 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Warshall <warshall <at> 99main.com>
To: 12778 <at> debbugs.gnu.org
Subject: Re: Failure when running check-root make target
Date: Sun, 4 Nov 2012 14:21:05 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> > Hi,
> > 
> > When running 'make NON_ROOT_USERNAME=nobody check-root' on
> > coreutils-8.20, I get:_ROOT_USERNAME=nobody check-
> > 
> >   CCLD   test-xvasprintf
> >   CC     test-yesno.o
> >   CCLD   test-yesno
> > make[6]: Leaving directory
> > `/home/burgessm/sources/coreutils-8.20/gnulib-tests'
> > make  check-TESTS
> > make[6]: Entering directory
> > `/home/burgessm/sources/coreutils-8.20/gnulib-tests'
> > make[7]: Entering directory
> > `/home/burgessm/sources/coreutils-8.20/gnulib-tests'
> > make[7]: *** No rule to make target `tests/chown/basic.sh.log',
> > needed by `test-suite.log'.  Stop.
> > make[7]: Leaving directory
> > `/home/burgessm/sources/coreutils-8.20/gnulib-tests'
> > make[6]: *** [check-TESTS] Error 2
> > 
> > This looks a little odd to me, as it appears that its finished
> > building the gnulib-tests, comes out of that directory, then
> > immediately goes back in to then start running coreutils' own tests,
> > which it has already successfully run.  Unless I've completely
> > misread the logs, that is.
> > 
> > This is on a Fedora-17 host, in case it's caused by make (3.82) or
> > something else in the toolchain.
> > 
> > Thanks,
> > 
> > Matt.
> 
> 
> I'm getting the same thing --- same version of make, too. I think it's
> finished building the gnulib-tests and is at the time of the error
> trying to start running them. At that point, it's looking for  logs
> of the non-gnulib tests in tests/ (the non-gnulib testing dir). Those
> exist, but under names like foo.log (for test foo), whereas
> gnulib-tests/Makefile is expecting foo.sh.log. I tried to wade through
> the Makefile to find the problem, but failed miserably. It would be
> good if someone who understands Autoconf could look at this.
> 
> Please note that this problem didn't exist in 8.19.


I did some more testing; apparently the tests run fine if you just run
"make NON_ROOT_USERNAME=nobody -k check-TESTS" in gnulib-tests/. So I
think there's some variable getting passed down the chain of recursion
which is making it look for testing logs for non-gnulib tests.
(Incidentally, it's also looking for them under the wrong filename, but
that's not the underlying problem.) Is anyone else having our problem?
In particular, is it local to GNU make 3.82?

              -Andrew Warshall
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBAgAGBQJQlsAhAAoJEESPRWh79T7tEAMIAIGjVeEgDje4qEbK1ErTnoAV
59STT+EhILGeY8fsgZe7TeQ1pJvjBYypQ1etU/XbndL58043+pYIVu3jw659ikoc
fKiLbhNxTeUhR771mlItGSnvRMAXwtyh9tEemtww3/6e6wcRkJIsNbP48dctcJpe
X0seu5PV4MUCqXQCI4m7/UQC9hRzgoeNWlyHdniHV/reHrpqoV4H1HebTxxHglJc
C9pS2+/DazUw5bsy2fO273g6TVA8yPA2nMYGC0In7yakmrXBqJGH9f3Je73KsrA8
qJX9DRMY5iG4lC5haBT8xh3WKJHbwg73+PUBDFkorNyxyUaqMCIglXBZvaXvhBA=
=YcUo
-----END PGP SIGNATURE-----

Information forwarded to bug-coreutils <at> gnu.org:
bug#12778; Package coreutils. (Mon, 05 Nov 2012 11:21:01 GMT) Full text and rfc822 format available.

Message #14 received at 12778 <at> debbugs.gnu.org (full text, mbox):

From: "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com>
To: Andrew Warshall <warshall <at> 99main.com>, "12778 <at> debbugs.gnu.org"
	<12778 <at> debbugs.gnu.org>
Subject: RE: bug#12778: Failure when running check-root make target
Date: Mon, 5 Nov 2012 11:17:03 +0000
Andrew Warshall wrote: (Sunday, November 04, 2012 8:21 PM)

>>> make[7]: *** No rule to make target `tests/chown/basic.sh.log',
>>> needed by `test-suite.log'.  Stop.

> Is anyone else having our problem?
> In particular, is it local to GNU make 3.82?

well, not the same, but ...

  make  check-TESTS
  make[6]: Entering directory `/home/berny/coreutils/gnulib-tests'
  make[7]: Entering directory `/home/berny/coreutils/gnulib-tests'
  make[8]: Entering directory `/home/berny/coreutils/gnulib-tests'
  make[8]: Nothing to be done for `tests/chown/basic.sh.log'.
  make[8]: Nothing to be done for `tests/cp/cp-a-selinux.sh.log'.
  make[8]: Nothing to be done for `tests/cp/preserve-gid.sh.log'.
  ...
  make[8]: Nothing to be done for `tests/touch/now-owned-by-other.sh.log'.
  make[8]: Leaving directory `/home/berny/coreutils/gnulib-tests'
  fatal: making test-suite.log: failed to create tests/chown/basic.sh.trs
  fatal: making test-suite.log: failed to create tests/chown/basic.sh.log
  fatal: making test-suite.log: failed to create tests/cp/cp-a-selinux.sh.trs
  ...
  fatal: making test-suite.log: failed to create tests/touch/now-owned-by-other.sh.log
  make[7]: *** [test-suite.log] Error 1
  make[7]: Leaving directory `/home/berny/coreutils/gnulib-tests'
  make[6]: *** [check-TESTS] Error 2

This is on OpenSuSE 12.2 with GNU make 3.82.

Have a nice day,
Berny




Information forwarded to bug-coreutils <at> gnu.org:
bug#12778; Package coreutils. (Mon, 05 Nov 2012 15:30:02 GMT) Full text and rfc822 format available.

Message #17 received at 12778 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Warshall <warshall <at> 99main.com>
To: bernhard.voelker <at> siemens-enterprise.com
Cc: 12778 <at> debbugs.gnu.org
Subject: bug#12778: Failure when running check-root make target
Date: Mon, 5 Nov 2012 09:30:26 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> > Is anyone else having our problem?
> > In particular, is it local to GNU make 3.82?
> 
> well, not the same, but ...
> 
>   make  check-TESTS
>   make[6]: Entering directory `/home/berny/coreutils/gnulib-tests'
>   make[7]: Entering directory `/home/berny/coreutils/gnulib-tests'
>   make[8]: Entering directory `/home/berny/coreutils/gnulib-tests'
>   make[8]: Nothing to be done for `tests/chown/basic.sh.log'.
>   make[8]: Nothing to be done for `tests/cp/cp-a-selinux.sh.log'.
>   make[8]: Nothing to be done for `tests/cp/preserve-gid.sh.log'.
>   ...
>   make[8]: Nothing to be done for
>   `tests/touch/now-owned-by-other.sh.log'. make[8]: Leaving directory
>   `/home/berny/coreutils/gnulib-tests' fatal: making test-suite.log:
>   failed to create tests/chown/basic.sh.trs fatal: making
>   test-suite.log: failed to create tests/chown/basic.sh.log fatal:
>   making test-suite.log: failed to create
>   tests/cp/cp-a-selinux.sh.trs ... fatal: making test-suite.log:
> failed to create tests/touch/now-owned-by-other.sh.log
>   make[7]: *** [test-suite.log] Error 1
>   make[7]: Leaving directory `/home/berny/coreutils/gnulib-tests'
>   make[6]: *** [check-TESTS] Error 2
> 
> This is on OpenSuSE 12.2 with GNU make 3.82.

I'd be curious to know what it's supposed to be doing. For example,
should "make check-root" be running any gnulib-tests at all? Those
should all get run by "make check" anyway, no?

Does "make NON_ROOT_USERNAME=nobody check-TESTS" run as root in the
gnulib-tests/ directory work for you?

       -Andrew Warshall
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBAgAGBQJQl82CAAoJEESPRWh79T7tWhsH/2va4lrVhh8EbC2VuQ+5AMu6
jembgHIc/0LUoZxLcsbGbbU96VArrgywf25Jk6hRLrKWICSpap1kSGFjbjqbx2lP
FCrPTsARoug13KnmocZt97HVA5wQfZFLBGgHSULVv+0chcAg4RUFb0eZAQnxKwgO
n+ZQ+Jt23ZLqBFVgkA5hHQZm1oR2NYrXbXLcBhFe/iVMOwQpp1VPGrohm2xZEEOZ
9jFRhX5zPQsGFsSfPKIKnch9Zvr8JYvKJoulONfTr1mKZLPuesE2fxOoRIauGpMC
dK38FAoYbQHP/v9tYwSWAUHFGghn+Cc+ptoGmlY4IVgid+UGCH+JrEnEa/uifQ8=
=m67B
-----END PGP SIGNATURE-----

Information forwarded to bug-coreutils <at> gnu.org:
bug#12778; Package coreutils. (Mon, 05 Nov 2012 15:51:02 GMT) Full text and rfc822 format available.

Message #20 received at 12778 <at> debbugs.gnu.org (full text, mbox):

From: "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com>
To: Andrew Warshall <warshall <at> 99main.com>
Cc: "12778 <at> debbugs.gnu.org" <12778 <at> debbugs.gnu.org>
Subject: RE: bug#12778: Failure when running check-root make target
Date: Mon, 5 Nov 2012 15:46:32 +0000
Andrew Warshall wrote (Monday, November 05, 2012 3:30 PM):
>> This is on OpenSuSE 12.2 with GNU make 3.82.
>
> I'd be curious to know what it's supposed to be doing. For example,
> should "make check-root" be running any gnulib-tests at all? Those
> should all get run by "make check" anyway, no?

not sure. Are there any root-tests in gnulib?

> Does "make NON_ROOT_USERNAME=nobody check-TESTS" run as root in the
> gnulib-tests/ directory work for you?

Sure it does. ;-)

But with sudo it fails for 1 test:

  $ sudo env PATH="$PATH"  make NON_ROOT_USERNAME=nobody check-TESTS
  PASS: [...]
  ../build-aux/test-driver: line 95:  5158 Aborted                 "$@" > $log_file 2>&1
  FAIL: test-getlogin

Have a nice day,
Berny




Information forwarded to bug-coreutils <at> gnu.org:
bug#12778; Package coreutils. (Mon, 05 Nov 2012 16:19:01 GMT) Full text and rfc822 format available.

Message #23 received at 12778 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Warshall <warshall <at> 99main.com>
To: "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com>
Cc: "12778 <at> debbugs.gnu.org" <12778 <at> debbugs.gnu.org>
Subject: Re: bug#12778: Failure when running check-root make target
Date: Mon, 5 Nov 2012 10:19:23 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 5 Nov 2012 15:46:32 +0000
"Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com> wrote:
> > Does "make NON_ROOT_USERNAME=nobody check-TESTS" run as root in the
> > gnulib-tests/ directory work for you?
> 
> Sure it does. ;-)
> 
> But with sudo it fails for 1 test:
> 
>   $ sudo env PATH="$PATH"  make NON_ROOT_USERNAME=nobody check-TESTS
>   PASS: [...]
>   ../build-aux/test-driver: line 95:  5158 Aborted
> "$@" > $log_file 2>&1 FAIL: test-getlogin

You've uncovered bug #11150, I believe. Is this in an xterm? The
getlogin test fails for me too there (at least, it's done so for a
while), and arguably rightly so. Basically, all that getlogin() does is
to look the TTY it's connected to up in /var/run/utmp. This should list
who's logged in at every terminal. Unfortunately, xterm doesn't write
to /var/run/utmp, so getlogin() fails in this case. Whether you think
this counts as a bug in getlogin() is up to you; anyway, it's different
(I assume) from the issue we were having.

If you want to complain about the getlogin() issue, by the way, 
that should go to the bug-gnulib list (at least, that's where it got
forwarded before).

         -Andrew Warshall
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBAgAGBQJQl9j7AAoJEESPRWh79T7tLaoH/3HDBf6GFl99Z1pUyozENCss
XnVO7n+gwNLAKz0NQM0JXDKh37krUOWEeAyG48+AAX2lYtD0NKQBvuCQFXxYh3Bl
VMKecWOAsdUKzzz5N46IuwotPSR5Hjpvs6K8N5EodQY/kri26wEz29EWMbxatiON
mKqNlXUUFMj7XwBs31NASrEWvuJdkSjPg61eFyqg0R3AHx3SXoX/dwFRKdJ88236
BIxSpHEjzvW4FbzXXzb02FV0e9U4uElv29Cs6odkg0MbSTNURBIgDxfh39/dST5p
9EmGt39JpmaPP/xzC9fd6k/ic9GJatM9dfTXdEZsbDD1bhyEOMdbasyk7PROU98=
=/msi
-----END PGP SIGNATURE-----

Information forwarded to bug-coreutils <at> gnu.org:
bug#12778; Package coreutils. (Mon, 05 Nov 2012 16:27:02 GMT) Full text and rfc822 format available.

Message #26 received at 12778 <at> debbugs.gnu.org (full text, mbox):

From: "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com>
To: Andrew Warshall <warshall <at> 99main.com>
Cc: "12778 <at> debbugs.gnu.org" <12778 <at> debbugs.gnu.org>
Subject: RE: bug#12778: Failure when running check-root make target
Date: Mon, 5 Nov 2012 16:22:37 +0000
Andrew Warshall wrote (Monday, November 05, 2012 4:19 PM):

> On Mon, 5 Nov 2012 15:46:32 +0000
> "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com> wrote:
>>   $ sudo env PATH="$PATH"  make NON_ROOT_USERNAME=nobody check-TESTS
>>   PASS: [...]
>>   ../build-aux/test-driver: line 95:  5158 Aborted
>> "$@" > $log_file 2>&1 FAIL: test-getlogin
>
> You've uncovered bug #11150, I believe. Is this in an xterm? The
> getlogin test fails for me too there (at least, it's done so for a
> while), and arguably rightly so. Basically, all that getlogin() does is
> to look the TTY it's connected to up in /var/run/utmp. This should list
> who's logged in at every terminal. Unfortunately, xterm doesn't write
> to /var/run/utmp, so getlogin() fails in this case. Whether you think
> this counts as a bug in getlogin() is up to you; anyway, it's different
> (I assume) from the issue we were having.
>
> If you want to complain about the getlogin() issue, by the way, 
> that should go to the bug-gnulib list (at least, that's where it got
> forwarded before).

Well, I don't mind. Actually, I find it more important to know
whether gnulib tests should be run as root or not: are the gnulib
tests secure enough to be run as root? I don't know, but I don't
think a dependant project like coreutils should run them as root.

Have a nice day,
Berny




Information forwarded to bug-coreutils <at> gnu.org:
bug#12778; Package coreutils. (Mon, 05 Nov 2012 17:30:01 GMT) Full text and rfc822 format available.

Message #29 received at 12778 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Warshall <warshall <at> 99main.com>
To: "Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com>
Cc: "12778 <at> debbugs.gnu.org" <12778 <at> debbugs.gnu.org>
Subject: Re: bug#12778: Failure when running check-root make target
Date: Mon, 5 Nov 2012 11:30:32 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 5 Nov 2012 16:22:37 +0000
"Voelker, Bernhard" <bernhard.voelker <at> siemens-enterprise.com> wrote:
> Well, I don't mind. Actually, I find it more important to know
> whether gnulib tests should be run as root or not: are the gnulib
> tests secure enough to be run as root? I don't know, but I don't
> think a dependant project like coreutils should run them as root.

Since gnulib does no releases of its own, though, the only way its
tests get run is through its dependent projects. I don't know of an
easy way to run the tests excluding gnulib.

In any event, the getlogin test doesn't need to be run as root (in
fact, I'm not sure why you'd want to). So a) something strange is
happening and b) I'd like to know whom it's happening to (i.e. what's
different about our setups from everyone else's). I find it hard to
believe that noone else is using the current version of GNU make.

                   -Andrew Warshall
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQEcBAEBAgAGBQJQl+moAAoJEESPRWh79T7tSVwH/RJWl+RQKMrCHuaGUUWhCnom
i9GpUN5mYDsH5i4sbvfJ7xiKIDTTJHSJsdJY+9uGG51XQVfF+dMNGlcMsTAqryUf
mRRC0GT5oEIvEABan14UOvphHOeCucXNNh26cy3yua6A8NO5nDwkGLskbfVx2UhL
gzqVU37qKS+/lYBPibSkt4hzKdKGQeAbYsdJADS+2MIKAMOaTNvTuKglFPYym8IE
mi2D1ZSz+MSrRwKwgQRCdO+yyEL8Qaz24Ryp/P57OztQjMOXpxw0bKXQCBpxtq7o
XlaLkLUkqdettzsfnmdRt7BgdIjYst3LMPHGCXwYFltyD4s31kgrqxRHOApXDTE=
=d9kn
-----END PGP SIGNATURE-----

Information forwarded to bug-coreutils <at> gnu.org:
bug#12778; Package coreutils. (Sun, 18 Nov 2012 18:19:01 GMT) Full text and rfc822 format available.

Message #32 received at 12778 <at> debbugs.gnu.org (full text, mbox):

From: g.esp <at> free.fr
To: Matt Burgess <matthew <at> linuxfromscratch.org>
Cc: Stefano Lattarini <stefano.lattarini <at> gmail.com>, 12778 <at> debbugs.gnu.org
Subject: Re: bug#12778: Failure when running check-root make target
Date: Sun, 18 Nov 2012 19:16:55 +0100 (CET)

----- Mail original -----
> De: "Matt Burgess" <matthew <at> linuxfromscratch.org>
> À: 12778 <at> debbugs.gnu.org
> Cc: matthew <at> linuxfromscratch.org
> Envoyé: Jeudi 1 Novembre 2012 21:29:33
> Objet: bug#12778: Failure when running check-root make target
> 
> Hi,
> 
> When running 'make NON_ROOT_USERNAME=nobody check-root' on
> coreutils-8.20, I get:
> 
>   CCLD   test-xvasprintf
>   CC     test-yesno.o
>   CCLD   test-yesno
> make[6]: Leaving directory
> `/home/burgessm/sources/coreutils-8.20/gnulib-tests'
> make  check-TESTS
> make[6]: Entering directory
> `/home/burgessm/sources/coreutils-8.20/gnulib-tests'
> make[7]: Entering directory
> `/home/burgessm/sources/coreutils-8.20/gnulib-tests'
> make[7]: *** No rule to make target `tests/chown/basic.sh.log',
> needed
> by `test-suite.log'.  Stop.
> make[7]: Leaving directory
> `/home/burgessm/sources/coreutils-8.20/gnulib-tests'
> make[6]: *** [check-TESTS] Error 2
> 
> This looks a little odd to me, as it appears that its finished building
> the gnulib-tests, comes out of that directory, then immediately goes
> back in to then start running coreutils' own tests, which it has already
> successfully run.  Unless I've completely misread the logs, that is.
> 
> This is on a Fedora-17 host, in case it's caused by make (3.82) or
> something else in the toolchain.
> 
> Thanks,
> 
> Matt.
> 
> 

I think this was commit 21b5147fd8ee493727e2a3ca17b3bf695c5024d3 in v8.20 that broke the behavior.

-# Some tests always need root privileges, others need them only sometimes.
-ALL_RECURSIVE_TARGETS += check-root
-check-root:
-       cd tests && $(MAKE) $@ SUBDIRS=
-


Previously check-root was a recursive target going nowhere but in tests directory.
Now, top Makefile contain

ALL_RECURSIVE_TARGETS = distcheck-hook check-root
SUBDIRS = po . gnulib-tests

check-root:
	$(MAKE) check TESTS='$(root_tests)'


So check-root target would go in 'po . gnulib-tests' directories if not stopped by the above issue.

With coreutils-8.20, same result could be achieved using :
make NON_ROOT_USERNAME=nobody SUBDIRS= check-root

This patch allow again "make NON_ROOT_USERNAME=nobody check-root" to run without the error above.
This worked for me running autoreconf -fiv && configure again && make && make NON_ROOT_USERNAME=nobody check-root
I supposed it is not required to run both 'check-TESTS check-local' targets while running check-root, so I replaced too 'check' target by 'check-TESTS'.

Gilles

diff --git a/tests/local.mk b/tests/local.mk
index 1b0ace4..f3b4849 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -137,7 +137,7 @@ all_root_tests =                            \
 ALL_RECURSIVE_TARGETS += check-root
 .PHONY: check-root
 check-root:
-       $(MAKE) check TESTS='$(root_tests)'
+       $(MAKE) check-TESTS TESTS='$(root_tests)' SUBDIRS=

 # Do not choose a name that is a shell keyword like 'if', or a
 # commonly-used utility like 'cat' or 'test', as the name of a test.






This bug report was last modified 12 years and 219 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.