git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael J Gruber <git@grubix.eu>
To: Jonathan Nieder <jrnieder@gmail.com>,
	Ramsay Jones <ramsay@ramsayjones.plus.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	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 10:13:24 +0200	[thread overview]
Message-ID: <6a413ecf-47d6-e562-7cdd-e4c3a1d666e6@grubix.eu> (raw)
In-Reply-To: <20170913192038.GH27425@aiede.mtv.corp.google.com>

Jonathan Nieder venit, vidit, dixit 13.09.2017 21:20:
> Ramsay Jones wrote:
> 
>> On cygwin (and MinGW), the 'ulimit' built-in bash command does not have
>> the desired effect of limiting the resources of new processes, at least
>> for the stack and file descriptors. However, it always returns success
>> and leads to several test prerequisites being erroneously set to true.
>>
>> Add a check for cygwin and MinGW to the prerequisite expressions, using
>> 'uname -s', and return false instead of (indirectly) using 'ulimit'.
>> This affects the prerequisite expressions for the ULIMIT_STACK_SIZE,
>> CMDLINE_LIMIT and ULIMIT_FILE_DESCRIPTORS prerequisites.
>>
>> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
>> ---
>>  t/t1400-update-ref.sh | 11 ++++++++++-
>>  t/t6120-describe.sh   |  1 -
>>  t/t7004-tag.sh        |  1 -
>>  t/test-lib.sh         | 22 ++++++++++++++++++++--
>>  4 files changed, 30 insertions(+), 5 deletions(-)
> 
> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
> 
> Thanks.
> 
> An alternative would be to do some more explicit feature-based test
> like using "ulimit" to set a limit and then reading back the limit in
> a separate process, but that feels like overkill.

It's still not clear whether these limits would be in effect or just
reported.

Rather than checking uname -s in several places, I think we should just
define ulimit to be false in one place, or rather set the prerequisite
there.

Michael

  reply	other threads:[~2017-09-14  8:13 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 [this message]
2017-09-14 12:54 ` Johannes Schindelin
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=6a413ecf-47d6-e562-7cdd-e4c3a1d666e6@grubix.eu \
    --to=git@grubix.eu \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=adam@dinwoodie.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.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).