unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* T050-new and T060-count fail if gdb prints a warning
@ 2020-03-10 15:43 Dan Čermák
  2020-03-10 16:04 ` David Bremner
  2020-03-10 19:56 ` Tomi Ollila
  0 siblings, 2 replies; 4+ messages in thread
From: Dan Čermák @ 2020-03-10 15:43 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 1504 bytes --]

Hi list,

I have encountered a test failure caused by the T050-new and T060-count
tests in the latest openSUSE-Tumbleweed rebuild with Python 3.8 instead
of Python 3.7. Both tests die with:

--8<---------------cut here---------------start------------->8---
T050-new: Testing "notmuch new" in several variations
 FAIL   Handle files vanishing between scandir and add_file
       --- T050-new.36.EXPECTED        2020-03-10 12:49:34.388407058 +0000
       +++ T050-new.36.OUTPUT  2020-03-10 12:49:34.388407058 +0000
       @@ -1,3 +1,7 @@
       +/usr/share/gdb/python/gdb/command/prompt.py:48: SyntaxWarning: "is not" with a literal. Did you mean "!="?
       +  if self.value is not '':
       +/usr/share/gdb/python/gdb/command/prompt.py:60: SyntaxWarning: "is not" with a literal. Did you mean "!="?
       +  if self.value is not '':
        Unexpected error with file /home/abuild/rpmbuild/BUILD/notmuch-0.29.3/test/tmp.T050-new/mail/vanish
        add_file: Something went wrong trying to read or write a file
        Error opening /home/abuild/rpmbuild/BUILD/notmuch-0.29.3/test/tmp.T050-new/mail/vanish: No such file or directory
--8<---------------cut here---------------end--------------->8---

which I think is caused by gdb 8 using some odd Python syntax and is
completely unrelated to notmuch.

The solution is of course to fix this in gdb (e.g. by updating to gdb
9), but the more general question is: can notmuch's testsuite do
something to avoid issues like this altogether?


Cheers,

Dan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: T050-new and T060-count fail if gdb prints a warning
  2020-03-10 15:43 T050-new and T060-count fail if gdb prints a warning Dan Čermák
@ 2020-03-10 16:04 ` David Bremner
  2020-03-10 19:56 ` Tomi Ollila
  1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2020-03-10 16:04 UTC (permalink / raw)
  To: Dan Čermák, notmuch

Dan Čermák <dan.cermak@posteo.net> writes:
>
> The solution is of course to fix this in gdb (e.g. by updating to gdb
> 9), but the more general question is: can notmuch's testsuite do
> something to avoid issues like this altogether?

I replaced some of the uses of gdb with LD_PRELOAD based shims. I'm not
sure how much work that would be to do here, but maybe someone(TM) would
like to try it? There is some examples in T070-insert.sh.

d

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: T050-new and T060-count fail if gdb prints a warning
  2020-03-10 15:43 T050-new and T060-count fail if gdb prints a warning Dan Čermák
  2020-03-10 16:04 ` David Bremner
@ 2020-03-10 19:56 ` Tomi Ollila
  2020-03-11  9:22   ` Dan Čermák
  1 sibling, 1 reply; 4+ messages in thread
From: Tomi Ollila @ 2020-03-10 19:56 UTC (permalink / raw)
  To: notmuch

On Tue, Mar 10 2020, Dan Čermák wrote:

> Hi list,
>
> I have encountered a test failure caused by the T050-new and T060-count
> tests in the latest openSUSE-Tumbleweed rebuild with Python 3.8 instead
> of Python 3.7. Both tests die with:
>
> --8<---------------cut here---------------start------------->8---
> T050-new: Testing "notmuch new" in several variations
>  FAIL   Handle files vanishing between scandir and add_file
>        --- T050-new.36.EXPECTED        2020-03-10 12:49:34.388407058 +0000
>        +++ T050-new.36.OUTPUT  2020-03-10 12:49:34.388407058 +0000
>        @@ -1,3 +1,7 @@
>        +/usr/share/gdb/python/gdb/command/prompt.py:48: SyntaxWarning: "is not" with a literal. Did you mean "!="?
>        +  if self.value is not '':
>        +/usr/share/gdb/python/gdb/command/prompt.py:60: SyntaxWarning: "is not" with a literal. Did you mean "!="?
>        +  if self.value is not '':
>         Unexpected error with file /home/abuild/rpmbuild/BUILD/notmuch-0.29.3/test/tmp.T050-new/mail/vanish
>         add_file: Something went wrong trying to read or write a file
>         Error opening /home/abuild/rpmbuild/BUILD/notmuch-0.29.3/test/tmp.T050-new/mail/vanish: No such file or directory
> --8<---------------cut here---------------end--------------->8---
>
> which I think is caused by gdb 8 using some odd Python syntax and is
> completely unrelated to notmuch.
>
> The solution is of course to fix this in gdb (e.g. by updating to gdb
> 9), but the more general question is: can notmuch's testsuite do
> something to avoid issues like this altogether?

setting PYTHONWARNINGS environment variable could probably do it.

IIRC the -count test is something that is harder to replace with
LD_PRELOAD shim...

(btw: thanks for this report -- i learned python3 -bb option
(been hit comparing strings and bytes with == ...) 

>
>
> Cheers,
>
> Dan


Tomi

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: T050-new and T060-count fail if gdb prints a warning
  2020-03-10 19:56 ` Tomi Ollila
@ 2020-03-11  9:22   ` Dan Čermák
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Čermák @ 2020-03-11  9:22 UTC (permalink / raw)
  To: Tomi Ollila; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 2252 bytes --]

Hi Tomi,

Tomi Ollila <tomi.ollila@iki.fi> writes:

> On Tue, Mar 10 2020, Dan Čermák wrote:
>
>> Hi list,
>>
>> I have encountered a test failure caused by the T050-new and T060-count
>> tests in the latest openSUSE-Tumbleweed rebuild with Python 3.8 instead
>> of Python 3.7. Both tests die with:
>>
>> --8<---------------cut here---------------start------------->8---
>> T050-new: Testing "notmuch new" in several variations
>>  FAIL   Handle files vanishing between scandir and add_file
>>        --- T050-new.36.EXPECTED        2020-03-10 12:49:34.388407058 +0000
>>        +++ T050-new.36.OUTPUT  2020-03-10 12:49:34.388407058 +0000
>>        @@ -1,3 +1,7 @@
>>        +/usr/share/gdb/python/gdb/command/prompt.py:48: SyntaxWarning: "is not" with a literal. Did you mean "!="?
>>        +  if self.value is not '':
>>        +/usr/share/gdb/python/gdb/command/prompt.py:60: SyntaxWarning: "is not" with a literal. Did you mean "!="?
>>        +  if self.value is not '':
>>         Unexpected error with file /home/abuild/rpmbuild/BUILD/notmuch-0.29.3/test/tmp.T050-new/mail/vanish
>>         add_file: Something went wrong trying to read or write a file
>>         Error opening /home/abuild/rpmbuild/BUILD/notmuch-0.29.3/test/tmp.T050-new/mail/vanish: No such file or directory
>> --8<---------------cut here---------------end--------------->8---
>>
>> which I think is caused by gdb 8 using some odd Python syntax and is
>> completely unrelated to notmuch.
>>
>> The solution is of course to fix this in gdb (e.g. by updating to gdb
>> 9), but the more general question is: can notmuch's testsuite do
>> something to avoid issues like this altogether?
>
> setting PYTHONWARNINGS environment variable could probably do it.

TIL about this environment variable! Thanks a lot for the hint, that
fixed the build in openSUSE and is a far better temporary workaround
than skipping two tests.

>
> IIRC the -count test is something that is harder to replace with
> LD_PRELOAD shim...
>
> (btw: thanks for this report -- i learned python3 -bb option
> (been hit comparing strings and bytes with == ...)

Well, thanks for sharing this too, thereby I learned another thing today ;-)


Cheers,

Dan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-11  9:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-10 15:43 T050-new and T060-count fail if gdb prints a warning Dan Čermák
2020-03-10 16:04 ` David Bremner
2020-03-10 19:56 ` Tomi Ollila
2020-03-11  9:22   ` Dan Čermák

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