Re: [PATCH 0/4] test: T380 rework

Subject: Re: [PATCH 0/4] test: T380 rework

Date: Sat, 25 Nov 2023 00:20:58 +0200

To: Michael J Gruber, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Fri, Nov 24 2023, Michael J. Gruber wrote:

> So, with the key-value pairs sorted by both, I resumed testing for Python
> 3.1.13 and encountered failing T380 which gave me some a deja-vue due to
> its confusing messages:
>
> ```
> T380-atomicity: Testing atomicity
> cat: outcount: No such file or directory
> /builddir/build/BUILD/notmuch-0.38.1/test/T380-atomicity.sh: line 79: ((: i
> < : syntax error: operand expected (error token is "< ")

Minimal change would be to change line:

    for ((i = 0; i < $outcount; i++)); do

as

    for ((i = 0; i < ${outcount:=0}; i++)); do

that would change the empty ('') $outcount to be as '0', and also
return the same value (0) there in expression.

Then, at least the message is less confusing...

Tomi

>  PASS   "notmuch new" is idempotent under arbitrary aborts
>  FAIL   detected >10 abort points
>         test  -gt 10
> /builddir/build/BUILD/notmuch-0.38.1/test/test-lib.sh: line 701: test: -gt:
> unary operator expected
> ```
>
> And that is why this is a reply to the old thread where I suggested making
> this less confusing, because everything reported is not the actual failure,
> but the consequence of not safe-guarding against a failed test setup.
>
> The *real cause* is most likely that `import gdb` fails in `atomicity.py`
> because it's not ready for py 3.13 yet.
>
> But maybe it's time to reconsider some bits of the old series? We ended up
> discussing "echo vs printf" and never addressed the real issues here.
>
> Cheers,
> Michael
>
> P.S.: There are also a few lines like
> ```
> Error: database path
> '/builddir/build/BUILD/notmuch-0.38.1/test/tmp.T400-hooks/database.85' does
> not exist or is not a directory.
> ```
> sprinkled in the test output between PASS tests, apparently without making
> any test fail. I don't know whether I never noticed for a apassing test
> suite, or whether this is new.
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: