bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with rm testsuite?


From: Ronald Hummelink
Subject: Problems with rm testsuite?
Date: 10 Apr 2003 02:00:46 +0200

Hello list,

I ran into 2 problems with the rm testsuite.
I build coreutils 5.0 on redhat 9 as non-root user. The part of the
testsuite that can run as non-root passes perfectly.
Then I su to root and run 'make check-root'
There I was able to identify 2 problems with the fail-2eperm part of the
testsuite. It tries to find a non-root user with a valid shell.
For me it finds the news account which has no shell defined at all

news:x:9:13:news:/etc/news:

If shell is /bin/true it is also found, but then nothing seems to
execute using " su -c '....' news "

The second problem is that the $non_root_username user seems to have
some kind of permission problem when the coreutils-.../src dir has
certain permissions. In this case the test is run using rm installed on
the host instead of the newly build rm, which may rightfully or not make
the test fail or succeed.

Below the very verbose log of the testsuite run, with some added
commands that helped me understand a little what was going on.

Hope this is enough for you to understand the problem. I will be
monitoring the archives since i'm not subscribed, a CC however might
help speed up if further explanation is requested.

Thank you for your time,

Ronald



make  check-TESTS
make[1]: Entering directory `/home/ronald/coreutils-5.0/tests/rm'
+ rm --version
rm (coreutils) 5.0
Written by Paul Rubin, David MacKenzie, Richard Stallman, and Jim
Meyering.
 
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
+ . ./../lang-default
++ eval 'LANG=; export LANG'
+++ LANG=
+++ export LANG
++ eval 'LANGUAGE=; export LANGUAGE'
+++ LANGUAGE=
+++ export LANGUAGE
++ eval 'LC_ALL=; export LC_ALL'
+++ LC_ALL=
+++ export LC_ALL
++ eval 'LC_COLLATE=; export LC_COLLATE'
+++ LC_COLLATE=
+++ export LC_COLLATE
++ eval 'LC_CTYPE=; export LC_CTYPE'
+++ LC_CTYPE=
+++ export LC_CTYPE
++ eval 'LC_MESSAGES=; export LC_MESSAGES'
+++ LC_MESSAGES=
+++ export LC_MESSAGES
++ eval 'LC_NUMERIC=; export LC_NUMERIC'
+++ LC_NUMERIC=
+++ export LC_NUMERIC
++ eval 'LC_TIME=; export LC_TIME'
+++ LC_TIME=
+++ export LC_TIME
+ PRIV_CHECK_ARG=require-root
+ . ./../priv-check
++ who=as root
++ priv_check_temp=priv-check.21238
++ touch priv-check.21238
++ chmod a-w priv-check.21238
++ overwrite_status=0
++ give_msg=no
++ test no = yes
++ rm -f priv-check.21238
++ pwd
+ pwd=/home/ronald/coreutils-5.0/tests/rm
++ echo ./fail-2eperm
++ sed 's,.*/,,'
+ t0=fail-2eperm.tmp
+ tmp=fail-2eperm.tmp/21238
+ trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit
$status' 0
+ trap '(exit $?); exit $?' 1 2 13 15
+ framework_failure=0
+ mkdir -p fail-2eperm.tmp/21238
+ cd fail-2eperm.tmp/21238
+ non_root_username=
++ grep -v '[^:]*:[^:]*:0:' /etc/passwd
++ sed 's/:.*//'
+ names=bin
daemon
adm
lp
mail
news
uucp
games
gopher
ftp
nobody
rpm
vcsa
nscd
sshd
rpc
rpcuser
nfsnobody
mailnull
smmsp
pcap
apache
squid
webalizer
xfs
named
ntp
gdm
mysql
postgres
desktop
ronald
joop
+ su -c : bin
This account is currently not available.
+ su -c : daemon
This account is currently not available.
+ su -c : adm
This account is currently not available.
+ su -c : lp
This account is currently not available.
+ su -c : mail
This account is currently not available.
+ su -c : news
+ non_root_username=news
+ break
+ test xnews = x
+ chown news .
+ mkdir a
+ chmod 1777 a
+ touch a/b
+ test 0 = 1
+ fail=0
+ rm --version
rm (coreutils) 5.0
Written by Paul Rubin, David MacKenzie, Richard Stallman, and Jim
Meyering.
 
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
+ su -c 'rm --version' news
rm (coreutils) 4.5.3
Written by Paul Rubin, David MacKenzie, Richard Stallman, and Jim
Meyering.
 
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.
+ echo
/home/ronald/coreutils-5.0/tests/rm/../../src:/stage1/bin:/stage1/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/ronald/bin
/home/ronald/coreutils-5.0/tests/rm/../../src:/stage1/bin:/stage1/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/ronald/bin
+ su -c 'echo $PATH' news
/home/ronald/coreutils-5.0/tests/rm/../../src:/stage1/bin:/stage1/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/ronald/bin
+ su -c pwd news
/home/ronald/coreutils-5.0/tests/rm/fail-2eperm.tmp/21238
+ su -c 'ls ../../../../src/rm -l' news
-rwxrwxr-x    1 ronald   ronald      27780 Apr  9 16:00
../../../../src/rm
+ su -c 'which rm'
/home/ronald/coreutils-5.0/src/rm
+ su -c 'rm -rf a' news
+ cat
+ cmp out exp
out exp differ: char 12, line 1
+ fail=1
+ test 1 = 1
+ diff out exp
1c1
< rm: cannot chdir from `a/.' to `b': Not a directory
---
> rm: cannot remove `a/b': Operation not permitted
+ exit 1
+ exit 1
+ status=1
+ cd /home/ronald/coreutils-5.0/tests/rm
+ chmod -R u+rwx fail-2eperm.tmp
+ rm -rf fail-2eperm.tmp
+ exit 1
FAIL: fail-2eperm
======================================
1 of 1 tests failed
Please report to address@hidden
======================================
make[1]: *** [check-TESTS] Error 1
make[1]: Leaving directory `/home/ronald/coreutils-5.0/tests/rm'
make: *** [check-am] Error 2


-- 
Linux is like a small snowball rolling downhill. Microsoft is just
waiting down the mountain...





reply via email to

[Prev in Thread] Current Thread [Next in Thread]