python 2.2.1 on Cygwin

Jason Tishler jason@tishler.net
Mon Apr 15 07:51:00 GMT 2002


Jochen,

[Sorry for the sluggish response time...]

On Tue, Apr 09, 2002 at 07:38:06PM -0400, Jochen Küpper wrote:
> The following message is a courtesy copy of an article
> that has been posted to comp.lang.python as well.

Why not just cross post?  Although the use of cross posting should be
minimized, IMO, it is appropriate is this case.

> I have just compiled latest cvs release22-maint on Cygwin.  I get the
> following test results:
> ,----
> | 149 tests OK.
> | 7 tests failed:
> |     test_mimetypes test_mmap test_pyclbr test_socket test_sundry
> |     test_urllib test_urllib2
> | 31 tests skipped:
> |     test___all__ test_al test_asynchat test_bsddb test_cd test_cgi
> |     test_cl test_curses test_dbm test_dl test_fork1 test_gl
> |     test_imgfile test_largefile test_linuxaudiodev test_locale
> |     test_minidom test_nis test_ntpath test_pyexpat test_sax
> |     test_socket_ssl test_socketserver test_sunaudiodev test_thread
> |     test_threaded_import test_threadedtempfile test_threading
> |     test_unicode_file test_winreg test_winsound
> `----

On my system:

    Cygwin CVS from 2002/4/5
    Python 2.2.1 with a static_socket module
    Windows 2000 SP2
    NTFS

I get the following results:

    156 tests OK.
    2 tests failed:
        test_commands test_mmap
    29 tests skipped:
        test_al test_asynchat test_bsddb test_cd test_cl test_curses
        test_dbm test_dl test_fork1 test_gl test_imgfile test_largefile
        test_linuxaudiodev test_locale test_minidom test_nis test_ntpath
        test_pyexpat test_sax test_socket_ssl test_socketserver
        test_sunaudiodev test_thread test_threaded_import
        test_threadedtempfile test_threading test_unicode_file test_winreg
        test_winsound


I diff-ed test_commands and test_mmap between 2.2 and 2.2.1 and there
are differences that explain the above failures:

    test_commands fails because the regular expression is pickier in
    2.2.1 and gets confused by spaces in the user and/or group name
    (e.g. Domain Users) fields in the output of "ls -ld /.".

    test_mmap fails because a test file is left open (i.e., only
    unlink-ed) which causes a subsequent (and completely independent)
    mmap test to fail due to the standard open file "problem" under
    Windows.

I'm not sure how to best fix the test_commands problem, but following
did the trick on my system :,)

    $ chgrp Administrators /

The attached patch fixes the test_mmap problem.  I will submit it to
Python CVS for consideration.

After making the above changes, all 2.2.1 regression tests pass on
my system.

> I am not sure why test reported to fail seem to work ok?

Me neither.

> Anyway, hope it helps.  Please cc me if you have questions or need
> more info.

What is your Windows and Cygwin version?

Jason
-------------- next part --------------
--- test_mmap.py.orig	Mon Apr 15 08:24:54 2002
+++ test_mmap.py	Mon Apr 15 09:31:29 2002
@@ -238,6 +238,7 @@ def test_both():
                 pass
             else:
                 verify(0, "Incompatible parameters should raise ValueError.")
+            f.close()
     finally:
         try:
             os.unlink(TESTFN)
@@ -252,6 +253,7 @@ def test_both():
         data = 'aabaac\x00deef\x00\x00aa\x00'
         n = len(data)
         f.write(data)
+        f.flush()
         m = mmap.mmap(f.fileno(), n)
         f.close()
 

-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list