Re: [PATCH v3 06/12] builtin/config.c: test misuse of format_config()

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

 



Jonathan Tan <jonathantanmy@xxxxxxxxxx> writes:

> "Glen Choo via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:
>> +test_expect_success '--show-origin with --default' '
>> +	test_must_fail git config --show-origin --default foo some.key
>> +'
>
> On my machine, this fails with
>
>   BUG: config.c:4035: current_config_origin_type called outside config callback
>   /usr/local/google/home/jonathantanmy/git/t/test-lib-functions.sh: line 1067: 3255109 Aborted                 "$@" 2>&7
>   test_must_fail: died by signal 6: git config --show-origin --default foo some.key
>
> (So it indeed fails, as expected, but test_must_fail seems to not like
> the exit code.)

Ah you're right. I was under the impression that this was doing the
right thing on MacOS, but it doesn't work there either.

I think a good way to assert that we run into BUG() (Maybe
test_match_signal on the numeric value of SIGABRT? But that sounds error
prone), so I'll either use test_expect_failure or squash this patch.



[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]

  Powered by Linux