X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type; q=dns; s=default; b= G8AbCAowvw2NLSklE6qhk8hsHj6P9clkIkHeeFi7ZootHr8J7uOeZy76U5++gvN5 RXxOay6UC47xd+sbaccJr4fAP5OH5XCcHlypRNR+uO0XTNFy8gTiY7M4A1p5j3Yj tf7PRqlYYmYcJ6i6k4T9KzbFNIhxLwE300Yd2WhOsFA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:cc :subject:references:in-reply-to:content-type; s=default; bh=RxXM QFTLHmvUrsnOfCQgnn+aN84=; b=okJ19NIxivyOxMB1vEU9ymz2QNc3MwdVh137 P6LS8h57A6pWzc/YfRJikZ8VviLKof98JXvSBtnN8+tffm5edGM8ttaastlorxrd Z+x4glR2HMGV9wU+kz/o1ELZQe/ambhGrpqYR2IIad/y0Y8yl7nsOhnScHuKlyjU O4Dc1Xc= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 Message-ID: <5241DBE6.4000007@redhat.com> Date: Tue, 24 Sep 2013 12:37:26 -0600 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 AT cygwin DOT com Subject: Re: [PATCH] tests: don't assume getdtablesize () <= 10000000 References: <517EF2F1 DOT 2030802 AT cs DOT ucla DOT 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 --VxR5bJhcNN9pok4ktC2kTGGrrv9xEshrQ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable [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" -----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--