From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j.sixt@viscovery.net>
Cc: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
git@vger.kernel.org, kusmabite@gmail.com,
"Ramsay Jones" <ramsay@ramsay1.demon.co.uk>
Subject: Re: [PATCH nd/threaded-index-pack] index-pack: disable threading if NO_PREAD is defined
Date: Fri, 20 Apr 2012 12:49:42 -0700 [thread overview]
Message-ID: <xmqqr4vimbe1.fsf@junio.mtv.corp.google.com> (raw)
In-Reply-To: <4F910145.5030102@viscovery.net> (Johannes Sixt's message of "Fri, 20 Apr 2012 08:25:09 +0200")
Johannes Sixt <j.sixt@viscovery.net> writes:
> Am 4/19/2012 16:05, schrieb Nguyễn Thái Ngọc Duy:
>> NO_PREAD simulates pread() as a sequence of seek, read, seek in
>> compat/pread.c. The simulation is not thread-safe because another
>> thread could move the file offset away in the middle of pread
>> operation. Do not allow threading in that case.
>
> Unsurprisingly, this fixes the breakage for me.
>
> I used the attached patch to keep t9300 running when the breakage
> was detected.
>
> --- 8< ---
> From: Johannes Sixt <j6t@kdbg.org>
> Subject: [PATCH] t9300-fast-import: avoid 'exit' in test_expect_success snippets
>
> Exiting from a for-loop early using '|| break' does not propagate the
> failure code, and for this reason, the tests used just 'exit'. But this
> ends the test script with 'FATAL: Unexpected exit code 1' in the case of
> a failed test.
>
> Fix this by moving the loop into a shell function, from which we can
> simply return early.
Makes sense. If the original were written more readably, I may have
suggested to run the entire for loop in a subshell, but a helper
function is equally readable and with many identical checks, it is the
right way to do this.
Thanks.
prev parent reply other threads:[~2012-04-20 19:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-19 14:05 [PATCH nd/threaded-index-pack] index-pack: disable threading if NO_PREAD is defined Nguyễn Thái Ngọc Duy
2012-04-19 20:44 ` Junio C Hamano
2012-04-20 6:25 ` Johannes Sixt
2012-04-20 19:49 ` Junio C Hamano [this message]
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=xmqqr4vimbe1.fsf@junio.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=kusmabite@gmail.com \
--cc=pclouds@gmail.com \
--cc=ramsay@ramsay1.demon.co.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.