summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-networking/glib-networking/eagain.patch
blob: 6c2e3c634b7a0d21608bb592e5359f315dce5f77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From 5604707bed4b4a4bc4658c7158a18c1774775775 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Sat, 6 May 2023 12:18:50 +0100
Subject: [PATCH] In autobuilder testing we regularly see glib-networking ptest
 fail with:

GLib-Net:ERROR:/usr/src/debug/glib-networking/2.74.0-r0/tls/tests/connection.c:1944:simul_read_thread: assertion failed (error == NULL): Resource temporarily unavailable (g-io-error-quark, 27)
Bail out! GLib-Net:ERROR:/usr/src/debug/glib-networking/2.74.0-r0/tls/tests/connection.c:1944:simul_read_thread: assertion failed (error == NULL): Resource temporarily unavailable (g-io-error-quark, 27)
FAIL: glib-networking/connection-openssl.test (Child process killed by signal 6)
SUMMARY: total=4; passed=3; skipped=0; failed=1; user=0.9s; system=0.4s; maxrss=10708
FAIL: glib-networking/connection-openssl.test (Child process killed by signal 6)

The test should probably retry in this situation so test a patch which does this.

Upstream-Status: Pending [testing to see if patch resolves the issue]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 tls/tests/connection.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tls/tests/connection.c b/tls/tests/connection.c
index 62a7fbb..3447c80 100644
--- a/tls/tests/connection.c
+++ b/tls/tests/connection.c
@@ -2210,6 +2210,10 @@ simul_read_thread (gpointer user_data)
                                    test->buf + test->nread,
                                    MIN (TEST_DATA_LENGTH / 2, TEST_DATA_LENGTH - test->nread),
                                    NULL, &error);
+
+      if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK))
+          continue;
+
       g_assert_no_error (error);
 
       test->nread += nread;