Skip to contentSkip to conversation

syscalls/recvmmsg01.c: Fix a compiler error

PATCH New Xiao Yang 5 participants 7 messages Sep 23, 2020 – Sep 25, 2020

lore
Share & tools
lore

Xiao Yang

author
#0 lore raw

PATCH 1/1 syscalls/recvmmsg01.c: Fix a compiler error

Use correct ts.type to fix the following compiler error:
--------------------------------------------
recvmmsg01.c:86:9: error: request for member ?type? in something not a structure or union
timeout.type = tv->ts_type;
--------------------------------------------

Fixes 135af8ededd4 ("syscalls/{send|recv}mmsg: add a test case for timeout and errno test")
---
 testcases/kernel/syscalls/recvmmsg/recvmmsg01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/recvmmsg/recvmmsg01.c +1 -1
index fe637430b..d3f2df6d9 100644
@@ -83,7 +83,7 @@ static void do_test(unsigned int i)
 	memset(rcv1->iov_base, 0, rcv1->iov_len);
 	memset(rcv2->iov_base, 0, rcv2->iov_len);
 
-	timeout.type = tv->ts_type;
+	ts.type = tv->ts_type;
 	tst_ts_set_sec(&ts, tc->tv_sec);
 	tst_ts_set_nsec(&ts, tc->tv_nsec);
 
Signature · 1 line
2.25.1
#1 lore raw

PATCH 1/1 syscalls/recvmmsg01.c: Fix a compiler error

Quoted 8 lines

Use correct ts.type to fix the following compiler error:
--------------------------------------------
recvmmsg01.c:86:9: error: request for member ?type? in something not a structure or union
timeout.type = tv->ts_type;
--------------------------------------------

Fixes 135af8ededd4 ("syscalls/{send|recv}mmsg: add a test case for timeout and errno test")

PS: my solution was wrong.

Kind regards,
Petr

Quoted 16 lines
---
 testcases/kernel/syscalls/recvmmsg/recvmmsg01.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
testcases/kernel/syscalls/recvmmsg/recvmmsg01.c +1 -1
index fe637430b..d3f2df6d9 100644
@@ -83,7 +83,7 @@ static void do_test(unsigned int i)
 	memset(rcv1->iov_base, 0, rcv1->iov_len);
 	memset(rcv2->iov_base, 0, rcv2->iov_len);
 
-	timeout.type = tv->ts_type;
+	ts.type = tv->ts_type;
 	tst_ts_set_sec(&ts, tc->tv_sec);
 	tst_ts_set_nsec(&ts, tc->tv_nsec);
#3 lore raw

PATCH 1/1 syscalls/recvmmsg01.c: Fix a compiler error

Quoted 4 lines · Petr Vorel

BTW: reported by Li Wang

and also by P.-H. Lin:
https://github.com/linux-test-project/ltp/issues/727

Hi Petr and Jan,

Sure, I will add Reported-by and the number of issue.

Also thanks for your review. :-)

Thanks,

Xiao Yang

Quoted 4 lines

Kind regards,
Petr

#4 lore raw

PATCH 1/1 syscalls/recvmmsg01.c: Fix a compiler error

In reply to Xiao Yang

----- Original Message -----

Quoted 10 lines

Use correct ts.type to fix the following compiler error:
--------------------------------------------
recvmmsg01.c:86:9: error: request for member ?type? in something not a structure or union
timeout.type = tv->ts_type;
--------------------------------------------

Fixes 135af8ededd4 ("syscalls/{send|recv}mmsg: add a test case for timeout

and errno test")

#5 lore raw

PATCH 1/1 syscalls/recvmmsg01.c: Fix a compiler error

In reply to Xiao Yang

Hi!
Actually I've messed up here, I pushed the patch by an accident, the code is not ready to be included. Let me just revert it.

Signature · 2 lines
Cyril Hrubis
[email protected]
author
#6 lore raw

PATCH 1/1 syscalls/recvmmsg01.c: Fix a compiler error

Quoted 3 lines · Cyril Hrubis

Hi!
Actually I've messed up here, I pushed the patch by an accident, the code is not ready to be included. Let me just revert it.

Hi Cyril,

Thanks for your explanation. :-)
It is fine for me to revert it.

Best Regards,
Xiao Yang