From: Michael J Gruber <michaeljgruber+grubix+git@gmail.com>
To: David Bremner <david@tethera.net>
Cc: notmuch@notmuchmail.org
Subject: Re: T610 failing on Fedora rawhide
Date: Fri, 24 Nov 2023 16:40:24 +0100 [thread overview]
Message-ID: <CAA19uiQQ1Ui0gB3ocZqb_KRSZm-rh9Qe1wq3DJu+WYiRbuwJXw@mail.gmail.com> (raw)
In-Reply-To: <878r6n45lc.fsf@tethera.net>
[-- Attachment #1.1: Type: text/plain, Size: 1614 bytes --]
Am Fr., 24. Nov. 2023 um 14:57 Uhr schrieb David Bremner <david@tethera.net
>:
> Michael J Gruber <michaeljgruber+grubix+git@gmail.com> writes:
>
> > Hi there,
> >
> > during my first tests for Python 3.13 (hooray...) I noticed that some
> tests
> > in T610 started to fail independent of that. It seems that with notmuch
> > 0.38.1 on current Fedora rawhide, `notmuch_message_get_properties()`
> > returns properties in a different order, while the tests expect a
> specific
> > order. So I'm wondering:
> > - Is there a particular order which the interface promises to deliver?
> > - If yes: What could cause it to be different?
> > If not there's some work to do making the tests independent of the order
> ...
> > This is not glib again, is it?
>
> Can you try the following patch?
>
> diff --git a/lib/string-map.c b/lib/string-map.c
> index e3a81b4f..99bc2ea2 100644
> --- a/lib/string-map.c
> +++ b/lib/string-map.c
> @@ -86,10 +86,14 @@ _notmuch_string_map_append (notmuch_string_map_t *map,
> static int
> cmppair (const void *pa, const void *pb)
> {
> + int cmp = 0;
> notmuch_string_pair_t *a = (notmuch_string_pair_t *) pa;
> notmuch_string_pair_t *b = (notmuch_string_pair_t *) pb;
>
> - return strcmp (a->key, b->key);
> + cmp = strcmp (a->key, b->key);
> + if (cmp == 0)
> + cmp = strcmp (a->value, b->value);
> + return cmp;
> }
>
> static void
>
So I guess we did not quite sort completely before, ey? ;-)
That patch makes T610 pass again, thanks. It's a good change independent of
any glibc promises, I think.
Glad we got this sorted out!
Cheers
Michael
[-- Attachment #1.2: Type: text/html, Size: 2299 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
prev parent reply other threads:[~2023-11-24 15:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-23 16:38 T610 failing on Fedora rawhide Michael J Gruber
2023-11-24 13:18 ` David Bremner
2023-11-24 13:39 ` David Bremner
2023-11-24 15:04 ` Florian Weimer
2023-11-24 13:57 ` David Bremner
2023-11-24 15:40 ` Michael J Gruber [this message]
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=CAA19uiQQ1Ui0gB3ocZqb_KRSZm-rh9Qe1wq3DJu+WYiRbuwJXw@mail.gmail.com \
--to=michaeljgruber+grubix+git@gmail.com \
--cc=david@tethera.net \
--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).