[Python-bugs-list] [ python-Bugs-497160 ] test_commands assumes ls is in /bin

noreply@sourceforge.net noreply@sourceforge.net
Sat, 29 Dec 2001 03:55:19 -0800


Bugs item #497160, was opened at 2001-12-27 13:38
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=497160&group_id=5470

Category: Build
Group: Python 2.2
Status: Closed
Resolution: Wont Fix
Priority: 5
Submitted By: Paul Jarc (prjsf)
Assigned to: Guido van Rossum (gvanrossum)
Summary: test_commands assumes ls is in /bin

Initial Comment:
I got this test failure while building Python 2.2:
test test_commands failed -- Traceback (most recent
call last):
  File "./Lib/test/test_commands.py", line 43, in
test_getstatus
    self.assert_(re.match(pat, getstatus("/bin/ls"),
re.VERBOSE))
  File
"/fs/home/mount/home/prj/b/Python-2.2/Lib/unittest.py",
line 262, in failUnless
    if not expr: raise self.failureException, msg
AssertionError

My ls happens to be somewhere other than /bin.  It would
be nice if the test used a different file, such as "/",
".", or even "./Lib/test/test_commands.py".

----------------------------------------------------------------------

>Comment By: Sjoerd Mullender (sjoerd)
Date: 2001-12-29 03:55

Message:
Logged In: YES 
user_id=43607

This bug report is related to [ #460613 ] test_commands fails on SGI, which nobody ever seems to have noticed 
and which is still open.
The problem there is that /bin/ls *does* exist, but is a symlink.

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-28 14:42

Message:
Logged In: YES 
user_id=6380

If the patch is so simple, why don't you provide it?

----------------------------------------------------------------------

Comment By: Paul Jarc (prjsf)
Date: 2001-12-28 14:20

Message:
Logged In: YES 
user_id=412110

The test suite already uses $PATH to *run* ls (as does other
software, which is why I don't get into a lot of trouble).
It merely uses /bin/ls as a filename to pass to ls so it can
check the output.  Any other filename will do just as well
here, and the fix is extremely simple; what's the benefit of
listing /bin/ls in particular that makes it worth risk
breaking on systems like this?

----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-12-28 13:56

Message:
Logged In: YES 
user_id=6380

I think you are going to get in a lot of trouble when
/bin/ls doesn't exist. It's not worth fixing the test suite
for this.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=497160&group_id=5470