Re: [PATCH 1/2 v2] test-lib: mark function variables as local

Subject: Re: [PATCH 1/2 v2] test-lib: mark function variables as local

Date: Sat, 09 May 2020 08:47:10 -0300

To: Daniel Kahn Gillmor, Notmuch Mail

Cc: Tomi Ollila

From: David Bremner


Daniel Kahn Gillmor <dkg@fifthhorseman.net> writes:

> Several functions in test/test-lib.sh used variable names that are
> also used outside of those functions (e.g. $output and $expected are
> used in many of the test scripts), but they are not expected to
> communicate via those variables.
>
> We mark those variables "local" within test-lib.sh so that they do not
> get clobbered when used outside test-lib.
>
> We also move the local variable declarations to beginning of each
> function, to avoid weird gotchas with local variable declarations as
> described in https://tldp.org/LDP/abs/html/localvar.html.

Pushed this one to master.

I'm confused about where to apply 2/2. If I apply it on top of (updated)
master, it causes test failures. If I apply after the rest of the
patches in this thread then presumably there is some interval where the
build is broken (if only for certain GMime versions).

d
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: