Re: [PATCH] test: say_color() in one write(2)

Subject: Re: [PATCH] test: say_color() in one write(2)

Date: Sun, 23 May 2021 10:19:00 +0300

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Sat, May 22 2021, David Bremner wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>
>> say_color() used to call (builtin) printf (and tput(1) to stdout)
>> several times, which caused attempts to write messages with color
>> to have partial content (e.g. escape sequences) often intermixed
>> with other tests when parallel tests were run.
>
> I still see things like:
>
> T568-lib-thread: Testing API tests for notmuch_thread_*
>  PASS   PASS   count messages on closed db
>  get indexopts from closed database
>
> Is that expected? Both "PASS" are coloured OK.

Yes, that is (unfortunately) possible, say_color only writes that PASS
(with escape sequences coloring and reseting around it) (and subtest
message if $debug is set). The messages following are written in separate
lines, after say_color() returns (echo's if I remember correctly).

Much more overhaul would be required to get the full line written in
one write(1) -- I did think a few options when doing that change but
nothing seems clear enough at this moment...

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

Thread: