diff mbox series

[mickledore,05/15] glib-networking: Correct glib error handling in test patch

Message ID 66dc4b94e9fad8d209f12fa64bd0673a42c28ac9.1684081748.git.steve@sakoman.com
State Accepted, archived
Commit 4ba74f61f38827d82586cf9c993a4b27065f5c6f
Headers show
Series [mickledore,01/15] waffle: upgrade 1.7.0 -> 1.7.2 | expand

Commit Message

Steve Sakoman May 14, 2023, 4:31 p.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 4ba74f61f38827d82586cf9c993a4b27065f5c6f)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/recipes-core/glib-networking/glib-networking/eagain.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Purdie May 14, 2023, 9:49 p.m. UTC | #1
On Sun, 2023-05-14 at 06:31 -1000, Steve Sakoman wrote:
> From: Richard Purdie <richard.purdie@linuxfoundation.org>
> 
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> (cherry picked from commit 4ba74f61f38827d82586cf9c993a4b27065f5c6f)
> Signed-off-by: Steve Sakoman <steve@sakoman.com>
> ---
>  meta/recipes-core/glib-networking/glib-networking/eagain.patch | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/glib-networking/glib-networking/eagain.patch b/meta/recipes-core/glib-networking/glib-networking/eagain.patch
> index 6dfbb2736c..ac6592ffef 100644
> --- a/meta/recipes-core/glib-networking/glib-networking/eagain.patch
> +++ b/meta/recipes-core/glib-networking/glib-networking/eagain.patch
> @@ -21,7 +21,7 @@ Index: glib-networking-2.74.0/tls/tests/connection.c
>                                      MIN (TEST_DATA_LENGTH / 2, TEST_DATA_LENGTH - test->nread),
>                                      NULL, &error);
>  +
> -+      if (error == G_IO_STATUS_AGAIN)
> ++      if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_BUSY))
>  +          continue;
>  +
>         g_assert_no_error (error);

I'm not sure this is working yet, I suspect we've seen the error in
builds with the patch applied :(

Cheers,

Richard
Steve Sakoman May 14, 2023, 9:54 p.m. UTC | #2
On Sun, May 14, 2023 at 11:49 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Sun, 2023-05-14 at 06:31 -1000, Steve Sakoman wrote:
> > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> >
> > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > (cherry picked from commit 4ba74f61f38827d82586cf9c993a4b27065f5c6f)
> > Signed-off-by: Steve Sakoman <steve@sakoman.com>
> > ---
> >  meta/recipes-core/glib-networking/glib-networking/eagain.patch | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-core/glib-networking/glib-networking/eagain.patch b/meta/recipes-core/glib-networking/glib-networking/eagain.patch
> > index 6dfbb2736c..ac6592ffef 100644
> > --- a/meta/recipes-core/glib-networking/glib-networking/eagain.patch
> > +++ b/meta/recipes-core/glib-networking/glib-networking/eagain.patch
> > @@ -21,7 +21,7 @@ Index: glib-networking-2.74.0/tls/tests/connection.c
> >                                      MIN (TEST_DATA_LENGTH / 2, TEST_DATA_LENGTH - test->nread),
> >                                      NULL, &error);
> >  +
> > -+      if (error == G_IO_STATUS_AGAIN)
> > ++      if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_BUSY))
> >  +          continue;
> >  +
> >         g_assert_no_error (error);
>
> I'm not sure this is working yet, I suspect we've seen the error in
> builds with the patch applied :(

FWIW, I used to get the error often without the patch.  I haven't had
the error since taking this patch.  Certainly not proof it is working
100% of the time, but certainly much improved.

Steve
Richard Purdie May 17, 2023, 8:11 a.m. UTC | #3
On Sun, 2023-05-14 at 11:54 -1000, Steve Sakoman wrote:
> On Sun, May 14, 2023 at 11:49 AM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> > 
> > On Sun, 2023-05-14 at 06:31 -1000, Steve Sakoman wrote:
> > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > 
> > > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > (cherry picked from commit 4ba74f61f38827d82586cf9c993a4b27065f5c6f)
> > > Signed-off-by: Steve Sakoman <steve@sakoman.com>
> > > ---
> > >  meta/recipes-core/glib-networking/glib-networking/eagain.patch | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/meta/recipes-core/glib-networking/glib-networking/eagain.patch b/meta/recipes-core/glib-networking/glib-networking/eagain.patch
> > > index 6dfbb2736c..ac6592ffef 100644
> > > --- a/meta/recipes-core/glib-networking/glib-networking/eagain.patch
> > > +++ b/meta/recipes-core/glib-networking/glib-networking/eagain.patch
> > > @@ -21,7 +21,7 @@ Index: glib-networking-2.74.0/tls/tests/connection.c
> > >                                      MIN (TEST_DATA_LENGTH / 2, TEST_DATA_LENGTH - test->nread),
> > >                                      NULL, &error);
> > >  +
> > > -+      if (error == G_IO_STATUS_AGAIN)
> > > ++      if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_BUSY))
> > >  +          continue;
> > >  +
> > >         g_assert_no_error (error);
> > 
> > I'm not sure this is working yet, I suspect we've seen the error in
> > builds with the patch applied :(
> 
> FWIW, I used to get the error often without the patch.  I haven't had
> the error since taking this patch.  Certainly not proof it is working
> 100% of the time, but certainly much improved.

Failure on master:

https://autobuilder.yoctoproject.org/typhoon/#/builders/85/builds/2134

https://autobuilder.yocto.io/pub/non-release/20230517-2/testresults/qemuarm64-ptest-fast/glib-networking.log

so not fixed :(

Cheers,

Richard
Steve Sakoman May 17, 2023, 1:51 p.m. UTC | #4
On Tue, May 16, 2023 at 10:11 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Sun, 2023-05-14 at 11:54 -1000, Steve Sakoman wrote:
> > On Sun, May 14, 2023 at 11:49 AM Richard Purdie
> > <richard.purdie@linuxfoundation.org> wrote:
> > >
> > > On Sun, 2023-05-14 at 06:31 -1000, Steve Sakoman wrote:
> > > > From: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > >
> > > > Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> > > > (cherry picked from commit 4ba74f61f38827d82586cf9c993a4b27065f5c6f)
> > > > Signed-off-by: Steve Sakoman <steve@sakoman.com>
> > > > ---
> > > >  meta/recipes-core/glib-networking/glib-networking/eagain.patch | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/meta/recipes-core/glib-networking/glib-networking/eagain.patch b/meta/recipes-core/glib-networking/glib-networking/eagain.patch
> > > > index 6dfbb2736c..ac6592ffef 100644
> > > > --- a/meta/recipes-core/glib-networking/glib-networking/eagain.patch
> > > > +++ b/meta/recipes-core/glib-networking/glib-networking/eagain.patch
> > > > @@ -21,7 +21,7 @@ Index: glib-networking-2.74.0/tls/tests/connection.c
> > > >                                      MIN (TEST_DATA_LENGTH / 2, TEST_DATA_LENGTH - test->nread),
> > > >                                      NULL, &error);
> > > >  +
> > > > -+      if (error == G_IO_STATUS_AGAIN)
> > > > ++      if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_BUSY))
> > > >  +          continue;
> > > >  +
> > > >         g_assert_no_error (error);
> > >
> > > I'm not sure this is working yet, I suspect we've seen the error in
> > > builds with the patch applied :(
> >
> > FWIW, I used to get the error often without the patch.  I haven't had
> > the error since taking this patch.  Certainly not proof it is working
> > 100% of the time, but certainly much improved.
>
> Failure on master:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/85/builds/2134
>
> https://autobuilder.yocto.io/pub/non-release/20230517-2/testresults/qemuarm64-ptest-fast/glib-networking.log
>
> so not fixed :(

Sigh, I had one on mickledore yesterday too :-(

Steve
diff mbox series

Patch

diff --git a/meta/recipes-core/glib-networking/glib-networking/eagain.patch b/meta/recipes-core/glib-networking/glib-networking/eagain.patch
index 6dfbb2736c..ac6592ffef 100644
--- a/meta/recipes-core/glib-networking/glib-networking/eagain.patch
+++ b/meta/recipes-core/glib-networking/glib-networking/eagain.patch
@@ -21,7 +21,7 @@  Index: glib-networking-2.74.0/tls/tests/connection.c
                                     MIN (TEST_DATA_LENGTH / 2, TEST_DATA_LENGTH - test->nread),
                                     NULL, &error);
 +
-+      if (error == G_IO_STATUS_AGAIN)
++      if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_BUSY))
 +          continue;
 +
        g_assert_no_error (error);