From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: Michael J Gruber <git@grubix.eu>,
Adam Dinwoodie <adam@dinwoodie.org>,
Junio C Hamano <gitster@pobox.com>,
GIT Mailing-list <git@vger.kernel.org>, Jeff King <peff@peff.net>
Subject: Re: [PATCH] test-lib: don't use ulimit in test prerequisites on cygwin
Date: Thu, 14 Sep 2017 14:54:39 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.21.1.1709141440510.4132@virtualbox> (raw)
In-Reply-To: <b57731ed-4640-d27f-f7b2-6c70af8dd400@ramsayjones.plus.com>
Hi Ramsay,
On Wed, 13 Sep 2017, Ramsay Jones wrote:
> So, I finally got around to testing ulimit with open files and
> found that it does not limit them on cygwin (it actually fails
> on the hard limit of 3200).
Thank you!
> Having seen Johannes email earlier, I took a chance and added MinGW to
> this patch as well. (Hopefully this won't cause any screams!) ;-)
It earns you my gratitude instead.
If you want to see the difference between the MSYS2 runtime (Git for
Windows flavor) and the Cygwin runtime, the patches applied on top of the
Cygwin runtime's source code can be seen here:
https://github.com/git-for-windows/MSYS2-packages/tree/master/msys2-runtime
The current overall diff can be inspected here:
https://github.com/git-for-windows/msys2-runtime/compare/aca9144e65ba...874e2c8efeed
The changes are not *all* that extensive, revolving more around the
Windows <-> POSIX path conversion (I am actually no longer certain that
the characterisation of "POSIX path" is correct, think about VMS still
being considered POSIX...).
There is also some stuff about environment variables, but that's about it.
Most importantly, the core code (such as ulimit functionality) seems not
to be changed at all IIAC.
Meaning: I agree with your assessment to enable the workaround also for
`uname -s` starting with MINGW.
One suggestion:
> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
> index dc98b4bc6..49415074f 100755
> --- a/t/t1400-update-ref.sh
> +++ b/t/t1400-update-ref.sh
> @@ -1253,7 +1253,16 @@ run_with_limited_open_files () {
> (ulimit -n 32 && "$@")
> }
>
> -test_lazy_prereq ULIMIT_FILE_DESCRIPTORS 'run_with_limited_open_files true'
> +test_lazy_prereq ULIMIT_FILE_DESCRIPTORS '
> + case $(uname -s) in
> + CYGWIN*|MINGW*)
> + false
> + ;;
> + *)
> + run_with_limited_open_files true
> + ;;
> + esac
> +'
It would be more semantically meanginful to do this instead:
-test_lazy_prereq ULIMIT_FILE_DESCRIPTORS 'run_with_limited_open_files true'
+test_lazy_prereq ULIMIT_FILE_DESCRIPTORS '
+ test_have_prereq !MINGW,!CYGWIN && run_with_limited_open_files true
+'
In other words, *spell out* that we want neither MINGW nor CYGWIN as
prerequisites before testing ulimit with that shell function.
It would also be a little more succinct.
Ciao,
Dscho
next prev parent reply other threads:[~2017-09-14 12:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 19:00 [PATCH] test-lib: don't use ulimit in test prerequisites on cygwin Ramsay Jones
2017-09-13 19:20 ` Jonathan Nieder
2017-09-14 8:13 ` Michael J Gruber
2017-09-14 12:54 ` Johannes Schindelin [this message]
2017-09-14 14:52 ` [PATCH 1/2] test-lib: group system specific FIFO tests by system Michael J Gruber
2017-09-14 14:52 ` [PATCH 2/2] test-lib: ulimit does not limit on CYGWIN and MINGW Michael J Gruber
2017-09-14 17:31 ` Ramsay Jones
2017-09-14 22:21 ` [PATCH 1/2] test-lib: group system specific FIFO tests by system Johannes Schindelin
2017-09-15 10:31 ` Michael J Gruber
2017-09-15 16:38 ` Ramsay Jones
2017-09-15 19:32 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.21.1.1709141440510.4132@virtualbox \
--to=johannes.schindelin@gmx.de \
--cc=adam@dinwoodie.org \
--cc=git@grubix.eu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=ramsay@ramsayjones.plus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).