Re: Assertion in git log graphing [regression in v2.25]
- From
Derrick Stolee <stolee@gmail.com>
- Date
- Jan 7, 2020, 12:56 UTC
- Message-ID
- <3fd8d52c-622e-29a6-442c-66797a3ae1f9@gmail.com>
- In-Reply-To
- <CAPig+cRH-yeHmeikf=cbTTMDom+7SLtT2dmya=WP7fsy8tTY3g@mail.gmail.com>
On 1/7/2020 7:50 AM, Eric Sunshine wrote:
Show 7 quoted lines
> On Tue, Jan 7, 2020 at 7:42 AM Derrick Stolee <stolee@gmail.com> wrote: >> Here is a a patch that reproduces the test failure. It hits the >> assert, so it definitely fails. > > What happens if someone builds the project with NDEBUG? Then the test > won't fail as expected. Perhaps this patch ought to also change those > asserts() to `if (...) BUG(...)` to ensure consistent behavior.
A final version of the patch would probably fix the bug and not use test_expect_failure. The other option would be to replace every assert() with a macro that did the "if (...) BUG(...);" conversion, but maybe that's not necessary in general.
-Stolee