Re: [PATCH v4 3/3] worktree add: Add hint to use --orphan when bad ref

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

 



On Mon, Dec 12, 2022 at 1:19 PM Ævar Arnfjörð Bjarmason
<avarab@xxxxxxxxx> wrote:
> On Mon, Dec 12 2022, Jacob Abel wrote:
> > Also, Is there an easier way to debug the `test_expect_success` statements? I
> > tried enabling tracing mode but it doesn't seem to trace into those statements.
>
> Not really, other than just enabling "-x" for the test-lib.sh itself, i.e.:
>
>         sh -x ./t0001-init.sh
>
> I *think* that should work, but I didn't test it...

Isn't the question here how to debug the body of a
test_expect_success? If that's the case, then running the test with -x
and -i should help:

    ./t001-init.sh -x -i

The -x makes it print all the output as it's executing the body of the
test_expect_success rather than suppressing it, and -i makes it stop
as soon as it encounters a failing test, which makes it easier to
examine the state of that test. After the script aborts (via -i), look
inside the "trash*" directory. Also, you can insert calls to
test_pause in the body of a test, which will make it drop into an
interactive shell session in the trash directory at the point of the
test_pause, so you can examine the state of the test directly as it
exists at that point (as opposed to examining it after the test
failed, as with -i).



[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