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: failures in test_os
Type: behavior Stage:
Components: Tests Versions: Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: draghuram, ocean-city, pitrou, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2008-08-17 16:51 by pitrou, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix_test_1565150.patch ocean-city, 2008-08-17 18:18
Messages (8)
msg71282 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-08-17 16:51
I get failures under test_os when launched under Windows XP. More
precisely, it's a Windows XP image inside qemu with the Python build dir
in a Samba mount.


======================================================================
FAIL: test_1565150 (__main__.StatAttributeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_os.py", line 291, in test_1565150
    self.assertEquals(os.stat(self.fname).st_mtime, t1)
AssertionError: 1159195039.0 != 1159195039.25

======================================================================
FAIL: test_1686475 (__main__.StatAttributeTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "Lib\test\test_os.py", line 300, in test_1686475
    self.fail("Could not stat pagefile.sys")
AssertionError: Could not stat pagefile.sys

----------------------------------------------------------------------
msg71287 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2008-08-17 18:18
Maybe will first test failure be fixed by attached patch?
Sorry, this is my bug in issue1709599. :-(
msg71288 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-08-17 20:16
No, it doesn't fix it.
But I've just tried manually, and GetVolumeInformation() returns "NTFS"
for the Samba share. Apparently this is a Samba "feature" to work with
Windows NT. :-)
See http://lists.samba.org/archive/samba/2003-April/065027.html

The other failure is trivial, I've fixed it in r65780.
msg71331 - (view) Author: Raghuram Devarakonda (draghuram) (Python triager) Date: 2008-08-18 14:13
> The other failure is trivial, I've fixed it in r65780.

#1709112 has been reported earlier in relation to pagefile.sys. Your
patch addresses at least part of the problem there. I wonder if that
issue can be closed.
msg71333 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-08-18 14:28
According to the aforementioned bug report, we should also add a test
for e.winerror == 5. Chances are that other cases will arise one day or
another...

Since the purpose of the test is, allegedly, to "Verify that an open
file can be stat'ed", it may be simpler to create and open a file
ourselves (test_support.TESTFN being an obvious candidate :-)), and
check that it can be stat'ed. Expecting to be able to access
C:\pagefile.sys sounds as "right" as doing the same with, say,
/etc/passwd under Linux.

(and, incidentally, creating the file ourselves means the test will stop
being Windows-specific)
msg71335 - (view) Author: Raghuram Devarakonda (draghuram) (Python triager) Date: 2008-08-18 14:36
On Mon, Aug 18, 2008 at 10:28 AM, Antoine Pitrou <report@bugs.python.org> wrote:
> Since the purpose of the test is, allegedly, to "Verify that an open
> file can be stat'ed", it may be simpler to create and open a file
> ourselves (test_support.TESTFN being an obvious candidate :-)), and

No. Any open file does not do. There has been a discussion on
python-dev some time back about replacing the use of pagefile.sys with
a temporarily created open file. But the problem that spawned this
test case does not occur with just any open file.
msg175961 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2012-11-19 15:18
Is this reproduced on modern Python versions?
msg175971 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-11-19 22:28
I don't know. Anyway, it is not really a Python bug, so I suggest we close it.
History
Date User Action Args
2022-04-11 14:56:37adminsetgithub: 47830
2012-11-22 21:06:46pitrousetstatus: pending -> closed
2012-11-19 22:28:04pitrousetstatus: open -> pending
resolution: not a bug
messages: + msg175971
2012-11-19 15:18:13serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg175961
2010-03-17 17:33:24pitrousetassignee: pitrou ->
2008-08-18 14:36:23draghuramsetmessages: + msg71335
2008-08-18 14:28:15pitrousetmessages: + msg71333
2008-08-18 14:13:43draghuramsetnosy: + draghuram
messages: + msg71331
2008-08-17 20:16:04pitrousetmessages: + msg71288
2008-08-17 18:18:45ocean-citysetfiles: + fix_test_1565150.patch
keywords: + patch
messages: + msg71287
nosy: + ocean-city
2008-08-17 16:52:38pitrousettitle: failures test_os -> failures in test_os
2008-08-17 16:51:44pitroucreate