unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>,
	Michael J Gruber <git@grubix.eu>,
	notmuch@notmuchmail.org
Subject: Re: [PATCH 2/4] test: due not pass T380.1 for the wrong reasons
Date: Sat, 19 Feb 2022 23:50:51 +0200	[thread overview]
Message-ID: <m2h78ujzk4.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87y22fx1d9.fsf@tethera.net>

On Sat, Feb 12 2022, David Bremner wrote:

> 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.

If there currently is zero printf's and only echo, I'd personally continue
to use echos -- but either way is ok by me

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

Wat? afaik echo is builtin in every modern bourne shell derivative...

(I tested:
 $ bash -c 'builtin echo foo'
 foo
 $ bash -c 'export PATH=/tmp; echo foo; ls'
 foo
 bash: ls: command not found
)

Tomi

>
> d

  reply	other threads:[~2022-02-19 21:50 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 11:52 [PATCH 0/4] test: T380 rework Michael J Gruber
2022-02-09 11:52 ` [PATCH 1/4] test: correct comparison order in T380 Michael J Gruber
2022-02-09 20:47   ` Tomi Ollila
2022-02-10 10:05     ` Michael J Gruber
2022-02-09 11:52 ` [PATCH 2/4] test: due not pass T380.1 for the wrong reasons Michael J Gruber
2022-02-09 20:49   ` Tomi Ollila
2022-02-10 10:08     ` Michael J Gruber
2022-02-09 22:12   ` David Bremner
2022-02-10 10:56     ` Michael J Gruber
2022-02-12 20:42       ` David Bremner
2022-02-19 21:50         ` Tomi Ollila [this message]
2022-02-19 23:02           ` David Bremner
2022-02-20 10:58             ` Michael J Gruber
2022-02-20 12:58               ` David Bremner
2022-02-09 11:52 ` [PATCH 3/4] test: reword T380.2 to be clearer Michael J Gruber
2022-02-09 20:49   ` Tomi Ollila
2022-02-09 11:52 ` [PATCH 4/4] test: set up the outcount file for T380.1 Michael J Gruber
2022-02-09 20:50   ` Tomi Ollila
2022-02-10 10:13     ` Michael J Gruber
2022-02-10 17:29       ` Tomi Ollila
2023-11-24 17:05 ` [PATCH 0/4] test: T380 rework Michael J Gruber
2023-11-24 22:20   ` Tomi Ollila

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2h78ujzk4.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.net \
    --cc=git@grubix.eu \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).