homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: test_commands assumes ls is in /bin
Type: Stage:
Components: Build Versions: Python 2.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: fdrake Nosy List: fdrake, gvanrossum, mwh, prjsf, sjoerd
Priority: normal Keywords:

Created on 2001年12月27日 21:38 by prjsf, last changed 2022年04月10日 16:04 by admin. This issue is now closed.

Messages (11)
msg8513 - (view) Author: Paul Jarc (prjsf) Date: 2001年12月27日 21:38
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".
msg8514 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001年12月28日 21:56
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.
msg8515 - (view) Author: Paul Jarc (prjsf) Date: 2001年12月28日 22:20
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?
msg8516 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001年12月28日 22:42
Logged In: YES 
user_id=6380
If the patch is so simple, why don't you provide it?
msg8517 - (view) Author: Sjoerd Mullender (sjoerd) * (Python committer) Date: 2001年12月29日 11:55
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.
msg8518 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001年12月29日 14:54
Logged In: YES 
user_id=6380
OK, reopening.
msg8519 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2001年12月29日 14:55
Logged In: YES 
user_id=6380
Assigned to Fred Drake, who wrote the test suite.
msg8520 - (view) Author: Paul Jarc (prjsf) Date: 2001年12月31日 07:12
Logged In: YES 
user_id=412110
Sorry, I should have thought of providing a patch to begin
with.
<URL:http://multivac.cwru.edu./prj/python-test-commands.patch>
This regexp test is weaker than the original one, but seems to 
be still stronger than necessary. If ls is broken here, we
don't care, because it isn't part of Python. All wee need is
to be able to spawn a shell.
msg8521 - (view) Author: Paul Jarc (prjsf) Date: 2002年03月26日 21:50
Logged In: YES 
user_id=412110
This problem still exists in 2.2.1c2. Is there something wrong
with my patch?
msg8522 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2002年03月27日 20:36
Logged In: YES 
user_id=6656
No attempt was made to fix this for 2.2.1c2.
I didn't make fixing little bugs in the tests a priority, 
sorry.
I don't think it's been fixed on the trunk.
msg8523 - (view) Author: Fred Drake (fdrake) (Python committer) Date: 2002年04月01日 23:58
Logged In: YES 
user_id=3066
Checked in patch as provided in Lib/test/test_commands.py
revision 1.4; closed bug #460613 as well.
History
Date User Action Args
2022年04月10日 16:04:50adminsetgithub: 35839
2001年12月27日 21:38:45prjsfcreate

AltStyle によって変換されたページ (->オリジナル) /