Re: [PATCH 4/4] test: set up the outcount file for T380.1

2022-02-10 Thread Tomi Ollila
On Thu, Feb 10 2022, Michael J. Gruber wrote:

> Tomi Ollila venit, vidit, dixit 2022-02-09 21:50:35:
>> On Wed, Feb 09 2022, Michael J. Gruber wrote:
>> 
>> > If gdb is present but for some reason `atomicity.py` fails to write to
>> > the output file then the test fails with some ugly bash errors in the
>> > wrong places (because the outcount variable is empty).
>> >
>> > Therefore, set up the outcount file with `0` to get the test script to
>> > rund and the test to fail fpr a clearer reason.
>> >
>> > Background: We noticed this with arch armhfp emulated on x86_64 in
>> > Fedora's COPR test build environment.
>> >
>> > Signed-off-by: Michael J Gruber 
>> > ---
>> >  test/T380-atomicity.sh | 1 +
>> >  1 file changed, 1 insertion(+)
>> >
>> > diff --git a/test/T380-atomicity.sh b/test/T380-atomicity.sh
>> > index 49df5c38..caac28a3 100755
>> > --- a/test/T380-atomicity.sh
>> > +++ b/test/T380-atomicity.sh
>> > @@ -64,6 +64,7 @@ if test_require_external_prereq gdb; then
>> >  # -tty /dev/null works around a conflict between the 'timeout' wrapper
>> >  # and gdb's attempt to control the TTY.
>> >  export MAIL_DIR
>> > +echo -n 0 > outcount
>> 
>> printf 0 > outcount (is my suggestion)
>
> Would by mine, too :)
> Again, this is not the style of T380 which uses echo exclusively so far.

Right, I did not see the surrouding code in this series :D

(the only thing I saw use of $(expr ...) -- which I put to my notes of
trivial fixes one could do in (distant?) future)

Perhaps the series is good then (and perhaps incremental changing of
expected - actual order is better than newer changing any of those)

Tomi

___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: [PATCH 4/4] test: set up the outcount file for T380.1

2022-02-10 Thread Michael J Gruber
Tomi Ollila venit, vidit, dixit 2022-02-09 21:50:35:
> On Wed, Feb 09 2022, Michael J. Gruber wrote:
> 
> > If gdb is present but for some reason `atomicity.py` fails to write to
> > the output file then the test fails with some ugly bash errors in the
> > wrong places (because the outcount variable is empty).
> >
> > Therefore, set up the outcount file with `0` to get the test script to
> > rund and the test to fail fpr a clearer reason.
> >
> > Background: We noticed this with arch armhfp emulated on x86_64 in
> > Fedora's COPR test build environment.
> >
> > Signed-off-by: Michael J Gruber 
> > ---
> >  test/T380-atomicity.sh | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/test/T380-atomicity.sh b/test/T380-atomicity.sh
> > index 49df5c38..caac28a3 100755
> > --- a/test/T380-atomicity.sh
> > +++ b/test/T380-atomicity.sh
> > @@ -64,6 +64,7 @@ if test_require_external_prereq gdb; then
> >  # -tty /dev/null works around a conflict between the 'timeout' wrapper
> >  # and gdb's attempt to control the TTY.
> >  export MAIL_DIR
> > +echo -n 0 > outcount
> 
> printf 0 > outcount (is my suggestion)

Would by mine, too :)
Again, this is not the style of T380 which uses echo exclusively so far.

I do think that printf is more stable across different systems and
shells, so a mass replace would be in order (but requires careful nl
checking).

Overally in the test suite, [f]printf wins by 8:3 roughly.

> 
> >  ${TEST_GDB} -tty /dev/null -batch -x $NOTMUCH_SRCDIR/test/atomicity.py 
> > notmuch 1>gdb.out 2>&1
> >  
> >  # Get the final, golden output
> > -- 
> > 2.35.1.306.ga00bde9711
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: [PATCH 4/4] test: set up the outcount file for T380.1

2022-02-09 Thread Tomi Ollila
On Wed, Feb 09 2022, Michael J. Gruber wrote:

> If gdb is present but for some reason `atomicity.py` fails to write to
> the output file then the test fails with some ugly bash errors in the
> wrong places (because the outcount variable is empty).
>
> Therefore, set up the outcount file with `0` to get the test script to
> rund and the test to fail fpr a clearer reason.
>
> Background: We noticed this with arch armhfp emulated on x86_64 in
> Fedora's COPR test build environment.
>
> Signed-off-by: Michael J Gruber 
> ---
>  test/T380-atomicity.sh | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/test/T380-atomicity.sh b/test/T380-atomicity.sh
> index 49df5c38..caac28a3 100755
> --- a/test/T380-atomicity.sh
> +++ b/test/T380-atomicity.sh
> @@ -64,6 +64,7 @@ if test_require_external_prereq gdb; then
>  # -tty /dev/null works around a conflict between the 'timeout' wrapper
>  # and gdb's attempt to control the TTY.
>  export MAIL_DIR
> +echo -n 0 > outcount

printf 0 > outcount (is my suggestion)

>  ${TEST_GDB} -tty /dev/null -batch -x $NOTMUCH_SRCDIR/test/atomicity.py 
> notmuch 1>gdb.out 2>&1
>  
>  # Get the final, golden output
> -- 
> 2.35.1.306.ga00bde9711
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org