Skip to contentSkip to conversation

selftests: correct define in msg_zerocopy.c

PATCH Applied Willem de Bruijn 3 participants 3 messages Sep 1, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selftests: correct define in msg_zerocopy.c

From: Willem de Bruijn <[email protected]>

The msg_zerocopy test defines SO_ZEROCOPY if necessary, but its value is inconsistent with the one in asm-generic.h. Correct that.

Also convert one error to a warning. When the test is complete, report throughput and close cleanly even if the process did not wait for all completions.

---
 tools/testing/selftests/net/msg_zerocopy.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/net/msg_zerocopy.c +3 -3
index 448c69a8af74..40232af5b023 100644
@@ -59,7 +59,7 @@
 #endif
 
 #ifndef SO_ZEROCOPY
-#define SO_ZEROCOPY	59
+#define SO_ZEROCOPY	60
 #endif
 
 #ifndef SO_EE_CODE_ZEROCOPY_COPIED
@@ -382,8 +382,8 @@ static void do_recv_remaining_completions(int fd)
 	}
 
 	if (completions < expected_completions)
-		error(1, 0, "missing notifications: %lu < %lu\n",
-		      completions, expected_completions);
+		fprintf(stderr, "missing notifications: %lu < %lu\n",
+			completions, expected_completions);
 }
 
 static void do_tx(int domain, int type, int protocol)
Signature · 1 line
2.14.1.581.gf28d330327-goog
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Willem de Bruijn

From: Willem de Bruijn <[email protected]>

The msg_zerocopy test defines SO_ZEROCOPY if necessary, but its value is inconsistent with the one in asm-generic.h. Correct that.

Also convert one error to a warning. When the test is complete, report throughput and close cleanly even if the process did not wait for all completions.

Thanks for quick fixes!

maintainer Applied
#2 lore raw
In reply to Willem de Bruijn

From: Willem de Bruijn <[email protected]>
Date: Fri, 1 Sep 2017 12:31:51 -0400

Quoted 11 lines

From: Willem de Bruijn <[email protected]>

The msg_zerocopy test defines SO_ZEROCOPY if necessary, but its value is inconsistent with the one in asm-generic.h. Correct that.

Also convert one error to a warning. When the test is complete, report throughput and close cleanly even if the process did not wait for all completions.

Applied.