Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failures in test_os #47830

Closed
pitrou opened this issue Aug 17, 2008 · 8 comments
Closed

failures in test_os #47830

pitrou opened this issue Aug 17, 2008 · 8 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@pitrou
Copy link
Member

pitrou commented Aug 17, 2008

BPO 3580
Nosy @pitrou, @serhiy-storchaka
Files
  • fix_test_1565150.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-11-22.21:06:46.176>
    created_at = <Date 2008-08-17.16:51:44.077>
    labels = ['invalid', 'type-bug', 'tests']
    title = 'failures in test_os'
    updated_at = <Date 2012-11-22.21:06:46.176>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2012-11-22.21:06:46.176>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-11-22.21:06:46.176>
    closer = 'pitrou'
    components = ['Tests']
    creation = <Date 2008-08-17.16:51:44.077>
    creator = 'pitrou'
    dependencies = []
    files = ['11140']
    hgrepos = []
    issue_num = 3580
    keywords = ['patch']
    message_count = 8.0
    messages = ['71282', '71287', '71288', '71331', '71333', '71335', '175961', '175971']
    nosy_count = 4.0
    nosy_names = ['pitrou', 'ocean-city', 'draghuram', 'serhiy.storchaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'not a bug'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue3580'
    versions = ['Python 2.6']

    @pitrou
    Copy link
    Member Author

    pitrou commented Aug 17, 2008

    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

    @pitrou pitrou self-assigned this Aug 17, 2008
    @pitrou pitrou added tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Aug 17, 2008
    @pitrou pitrou changed the title failures test_os failures in test_os Aug 17, 2008
    @ocean-city
    Copy link
    Mannequin

    ocean-city mannequin commented Aug 17, 2008

    Maybe will first test failure be fixed by attached patch?
    Sorry, this is my bug in bpo-1709599. :-(

    @pitrou
    Copy link
    Member Author

    pitrou commented Aug 17, 2008

    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.

    @draghuram
    Copy link
    Mannequin

    draghuram mannequin commented Aug 18, 2008

    The other failure is trivial, I've fixed it in r65780.

    bpo-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.

    @pitrou
    Copy link
    Member Author

    pitrou commented Aug 18, 2008

    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)

    @draghuram
    Copy link
    Mannequin

    draghuram mannequin commented Aug 18, 2008

    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.

    @pitrou pitrou removed their assignment Mar 17, 2010
    @serhiy-storchaka
    Copy link
    Member

    Is this reproduced on modern Python versions?

    @pitrou
    Copy link
    Member Author

    pitrou commented Nov 19, 2012

    I don't know. Anyway, it is not really a Python bug, so I suggest we close it.

    @pitrou pitrou added the invalid label Nov 19, 2012
    @pitrou pitrou closed this as completed Nov 22, 2012
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants