delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/04/15/10:28:32

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Mon, 15 Apr 2002 10:34:36 -0400
From: Jason Tishler <jason AT tishler DOT net>
Subject: Re: python 2.2.1 on Cygwin
In-reply-to: <ly7kngfnoh.fsf@bock.chem.unc.edu>
To: cygwin AT cygwin DOT com
Cc: Python-List <python-list AT python DOT org>
Mail-followup-to: cygwin AT cygwin DOT com, Python-List <python-list AT python DOT org>
Message-id: <20020415143436.GA1324@tishler.net>
MIME-version: 1.0
User-Agent: Mutt/1.3.24i
References: <ly7kngfnoh DOT fsf AT bock DOT chem DOT unc DOT edu>

--Boundary_(ID_yWSfv3GUSlhwdJe1ti16gg)
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 8BIT
Content-disposition: inline

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

--Boundary_(ID_yWSfv3GUSlhwdJe1ti16gg)
Content-type: text/plain; charset=us-ascii; NAME=test_mmap.py.diff
Content-transfer-encoding: 7BIT
Content-disposition: attachment; filename=test_mmap.py.diff

--- 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()
 


--Boundary_(ID_yWSfv3GUSlhwdJe1ti16gg)
Content-Type: text/plain; charset=us-ascii

--
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/
--Boundary_(ID_yWSfv3GUSlhwdJe1ti16gg)--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019