From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12236 invoked by alias); 24 Sep 2013 18:37:37 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 12226 invoked by uid 89); 24 Sep 2013 18:37:36 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 24 Sep 2013 18:37:36 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,LOTS_OF_MONEY,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r8OIbRki029948 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 24 Sep 2013 14:37:27 -0400 Received: from [10.3.113.164] (ovpn-113-164.phx2.redhat.com [10.3.113.164]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r8OIbQiE023222; Tue, 24 Sep 2013 14:37:26 -0400 Message-ID: <5241DBE6.4000007@redhat.com> Date: Tue, 24 Sep 2013 19:27:00 -0000 From: Eric Blake User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 MIME-Version: 1.0 To: Paul Eggert CC: Gnulib Bugs , cygwin@cygwin.com Subject: Re: [PATCH] tests: don't assume getdtablesize () <= 10000000 References: <517EF2F1.2030802@cs.ucla.edu> In-Reply-To: <517EF2F1.2030802@cs.ucla.edu> OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="VxR5bJhcNN9pok4ktC2kTGGrrv9xEshrQ" X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00354.txt.bz2 --VxR5bJhcNN9pok4ktC2kTGGrrv9xEshrQ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-length: 1798 [adding cygwin] On 04/29/2013 04:23 PM, Paul Eggert wrote: > --- > + > + tests: don't assume getdtablesize () <=3D 10000000 > + * modules/cloexec-tests: > + * modules/dup2-tests: > + * modules/dup3-tests: > + * modules/nonblocking-tests: > + * modules/posix_spawn_file_actions_addclose-tests: > + * modules/posix_spawn_file_actions_adddup2-tests: > + * modules/posix_spawn_file_actions_addopen-tests: > + * modules/unistd-safer-tests: > + Depend on the getdtablesize module. > + * tests/test-cloexec.c: > + * tests/test-dup-safer.c: > + * tests/test-dup2.c: > + * tests/test-dup3.c: > + * tests/test-fcntl.c: > + * tests/test-nonblocking.c: > + * tests/test-posix_spawn_file_actions_addclose.c: > + * tests/test-posix_spawn_file_actions_adddup2.c: > + * tests/test-posix_spawn_file_actions_addopen.c: > + Don't assume getdtablesize () <=3D 10000000. This patch causes failures on at least test-fcntl and test-dup2 on cygwin (both 32-bit and 64-bit); there, getdtablesize() currently returns the current runtime value, but this value starts at 256, and automatically expands as needed at runtime up to 3200. I think cygwin should be patched to make getdtablesize() return a constant 3200 (rather than the current runtime value); but meanwhile, we need to do something in gnulib to pick a larger value for bad_fd if getdtablesize() returns a small runtime value. I also wonder whether cygwin's sysconf(_SC_OPEN_MAX) should likewise be modified. (gdb) p getdtablesize() $5 =3D 256 (gdb) p dup2(0, 256) $6 =3D 256 (gdb) p getdtablesize() $7 =3D 288 (gdb) p dup2(0, 3200) $8 =3D -1 (gdb) p getdtablesize() $9 =3D 288 (gdb) p dup2(0, 3199) $10 =3D 3199 (gdb) p getdtablesize() $11 =3D 3200 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --VxR5bJhcNN9pok4ktC2kTGGrrv9xEshrQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 621 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJSQdvmAAoJEKeha0olJ0NqaEgH/RW3WeD7TOr1AUkkHOdnfbXO F3RQmsYscYa1080eMR5ig1dYD/VSb0pEPj7LnNSLW7rXMWzJUPECS9dDf913q3us 1V/uUP220OtLlTwn/ZLojoq2bKIFy22k7S9m0HbVzijv3rFdH7itIysiutXXoqpN /dOSjnpxCXbddcscVn4kT7dxcb9s5I+b34p+VX37vKtrf9pVeuBq3oekplxvTBD7 xk7MN/E0BFMXVvoUErw5QfGXp8gHsyTKX0T5eknZffad7oagjLR6CmE3Voj++sVH XPf+et14Q1lmGuPNu3byv7Bo8dVgv1zOLN/0Oe0AX/DnCcfq+ws3AaIt+E27T5o= =vFKZ -----END PGP SIGNATURE----- --VxR5bJhcNN9pok4ktC2kTGGrrv9xEshrQ--