Re: [PATCH 2/4] test: due not pass T380.1 for the wrong reasons

Subject:Re: [PATCH 2/4] test: due not pass T380.1 for the wrong reasons

Date:Sat, 12 Feb 2022 16:42:58 -0400

To:Michael J Gruber ,notmuch@notmuchmail.org

Cc:

From:David Bremner


Michael J Gruber <git@grubix.eu> writes:


> When analysing this, I was confused by the way
> test_require_external_prereq works and the "if" in T380 (as opposed to how
> test_require_external_prereq is used in other tests). Over at git.git,
> we have test setup code in functions which don't get executed if
> prerequisites fail. I guess the "if" emulates that, but then the actual
> tests in T380 are outside the if block and use files and variables which
> are created in the if block. So, this is something to fix anyways.

agreed.

> Add to this the fact that the tests needing sfsexp or asan (and probably
> others) do things yet differently and call "test_done" immediately, so
> that no SKIP appears. And those were the only ones skipped at all here ...
>

I think that's probably my fault for also not really understanding the
prereq system.


> In the short run, initialising variables and files which are used is
> still a good thing, but I would have to rewrite some commit messages.

sure.

> I'll wait until it's clear how to handle style, though: switch to printf
> from echo whenever I touch those lines (leading to mixed use) or keeing
> style and leaving the style change for another series.

I think I lean to fixing the usage of echo -n incrementally (i.e. don't
introduce more). It might be a bit uglier in the short term, but
eventually we'll get there.

It turns out that echo is _not_ builtin in bash, so this really is a
portability bug.

d
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: