Re: [PATCH 2/6] t1406: prepare for the refs code to fail with BUG()
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- May 1, 2018, 11:26 UTC
- Message-ID
- <CACsJy8A7K6-W=H_08JcJgtziz3aQ4B1WgOcsoMSMuSvEQDW8=A@mail.gmail.com>
- In-Reply-To
- <9bbfd73a8e03a888a5e9e8800d853ece518a8bf5.1525040253.git.johannes.schindelin@gmx.de>
On Mon, Apr 30, 2018 at 12:17 AM, Johannes Schindelin <johannes.schindelin@gmx.de> wrote:
Show 6 quoted lines
> t1406 specifically verifies that certain code paths fail with a BUG: ...
> message.
>
> In the upcoming commit, we will convert that message to be generated via
> BUG() instead of die("BUG: ..."), which implies SIGABRT instead of a
> regular exit code.On the other hand, SIGABRT on linux creates core dumps. And on some setup (like mine) core dumps may be redirected to some central place via /proc/sys/kernel/core_pattern. I think systemd does it too but I didn't check.
This moving to SIGABRT when we know it _will_ happen when running the test suite will accumulate core dumps over time and not cleaned up by the test suite. Maybe keeping die("BUG: here is a good compromise.
-- Duy