Re: [PATCH nd/threaded-index-pack] index-pack: disable threading if NO_PREAD is defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Sixt <j.sixt@xxxxxxxxxxxxx> 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@xxxxxxxx>
> 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.



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]