diff options
Diffstat (limited to 'meta/recipes-devtools/strace/strace/f31c2f4494779e5c5f170ad10539bfc2dfafe967.patch')
-rw-r--r-- | meta/recipes-devtools/strace/strace/f31c2f4494779e5c5f170ad10539bfc2dfafe967.patch | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/meta/recipes-devtools/strace/strace/f31c2f4494779e5c5f170ad10539bfc2dfafe967.patch b/meta/recipes-devtools/strace/strace/f31c2f4494779e5c5f170ad10539bfc2dfafe967.patch new file mode 100644 index 0000000000..a0843836c2 --- /dev/null +++ b/meta/recipes-devtools/strace/strace/f31c2f4494779e5c5f170ad10539bfc2dfafe967.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From f31c2f4494779e5c5f170ad10539bfc2dfafe967 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Dmitry V. Levin" <ldv@strace.io> | ||
3 | Date: Sat, 24 Jun 2023 08:00:00 +0000 | ||
4 | Subject: [PATCH] tests: update sockopt-sol_netlink test | ||
5 | |||
6 | Update sockopt-sol_netlink test that started to fail, likely | ||
7 | due to recent linux kernel commit f4e4534850a9 ("net/netlink: fix | ||
8 | NETLINK_LIST_MEMBERSHIPS length report"). | ||
9 | |||
10 | * tests/sockopt-sol_netlink.c (main): Always print changing optlen value | ||
11 | on exiting syscall. | ||
12 | |||
13 | Reported-by: Alexander Gordeev <agordeev@linux.ibm.com> | ||
14 | --- | ||
15 | tests/sockopt-sol_netlink.c | 13 ++++++++++--- | ||
16 | 1 file changed, 10 insertions(+), 3 deletions(-) | ||
17 | |||
18 | Upstream-Status: Backport | ||
19 | |||
20 | diff --git a/tests/sockopt-sol_netlink.c b/tests/sockopt-sol_netlink.c | ||
21 | index 82b98adc23..1c33219ac5 100644 | ||
22 | --- a/tests/sockopt-sol_netlink.c | ||
23 | +++ b/tests/sockopt-sol_netlink.c | ||
24 | @@ -94,7 +94,10 @@ main(void) | ||
25 | printf("%p", val); | ||
26 | else | ||
27 | printf("[%d]", *val); | ||
28 | - printf(", [%d]) = %s\n", *len, errstr); | ||
29 | + printf(", [%d", (int) sizeof(*val)); | ||
30 | + if ((int) sizeof(*val) != *len) | ||
31 | + printf(" => %d", *len); | ||
32 | + printf("]) = %s\n", errstr); | ||
33 | |||
34 | /* optlen larger than necessary - shortened */ | ||
35 | *len = sizeof(*val) + 1; | ||
36 | @@ -150,8 +153,12 @@ main(void) | ||
37 | /* optval EFAULT - print address */ | ||
38 | *len = sizeof(*val); | ||
39 | get_sockopt(fd, names[i].val, efault, len); | ||
40 | - printf("getsockopt(%d, SOL_NETLINK, %s, %p, [%d]) = %s\n", | ||
41 | - fd, names[i].str, efault, *len, errstr); | ||
42 | + printf("getsockopt(%d, SOL_NETLINK, %s, %p", | ||
43 | + fd, names[i].str, efault); | ||
44 | + printf(", [%d", (int) sizeof(*val)); | ||
45 | + if ((int) sizeof(*val) != *len) | ||
46 | + printf(" => %d", *len); | ||
47 | + printf("]) = %s\n", errstr); | ||
48 | |||
49 | /* optlen EFAULT - print address */ | ||
50 | get_sockopt(fd, names[i].val, val, len + 1); | ||