Skip to contentSkip to conversation

runtest/syscalls: add sendmsg03

PATCH New Yang Xu 2 participants 2 messages Mar 26, 2020

lore
Share & tools
lore

Yang Xu

author
#0 lore raw

PATCH 1/1 runtest/syscalls: add sendmsg03

Also, fix a possible warning in cleanup when SAFE_UNSHARE(CLONE_NEWUSER) failed on 3.10.0-1049.el7.x86_64. as below:

sendmsg03.c:43: CONF: unshare(268435456) unsupported: EINVAL (22) safe_macros.c:67: WARN: sendmsg03.c:65: close(-1) failed: EBADF (9)

---
 runtest/syscalls                              | 1 +
 testcases/kernel/syscalls/sendmsg/sendmsg03.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
runtest/syscalls +1 -0
index b797fb828..0ad66ca5e 100644
@@ -1176,6 +1176,7 @@ sendfile09_64 sendfile09_64
 
 sendmsg01 sendmsg01
 sendmsg02 sendmsg02
+sendmsg03 sendmsg03
 
 sendmmsg01 sendmmsg01
 
testcases/kernel/syscalls/sendmsg/sendmsg03.c +2 -1
index dcabfbb00..7dc491f75 100644
@@ -62,7 +62,8 @@ static void setup(void)
 
 static void cleanup(void)
 {
-	SAFE_CLOSE(sockfd);
+	if (sockfd > 0)
+		SAFE_CLOSE(sockfd);
 	tst_fzsync_pair_cleanup(&fzsync_pair);
 }
 
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/1 runtest/syscalls: add sendmsg03

Quoted 7 lines · Yang Xu

Also, fix a possible warning in cleanup when SAFE_UNSHARE(CLONE_NEWUSER) failed on 3.10.0-1049.el7.x86_64. as below:

sendmsg03.c:43: CONF: unshare(268435456) unsupported: EINVAL (22) safe_macros.c:67: WARN: sendmsg03.c:65: close(-1) failed: EBADF (9)

Pushed.