Skip to contentSkip to conversation

netstress: load dccp module manually

PATCH New Alexey Kodanev 2 participants 3 messages Feb 26, 2018 – Mar 1, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netstress: load dccp module manually

RHEL7.5 distro blacklisted dccp module by default, so for DCCP tests we should enable it manually.

---
 testcases/network/netstress/netstress.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
testcases/network/netstress/netstress.c +8 -2
index 9751cf6..d8354b8 100644
@@ -941,13 +941,19 @@ static void setup(void)
 		sock_type = SOCK_DGRAM;
 		protocol = IPPROTO_UDPLITE;
 	break;
-	case TYPE_DCCP:
+	case TYPE_DCCP: {
+		/* dccp module can be blacklisted, load it manually */
+		static const char * const argv[] = {"modprobe", "dccp", NULL};
+
+		if (tst_run_cmd(argv, NULL, NULL, 1))
+			tst_res(TWARN, "Failed to load DCCP module");
+
 		tst_res(TINFO, "DCCP %s", (client_mode) ? "client" : "server");
 		fastopen_api = fastopen_sapi = NULL;
 		sock_type = SOCK_DCCP;
 		protocol = IPPROTO_DCCP;
 		service_code = htonl(service_code);
-	break;
+	} break;
 	case TYPE_SCTP:
 		tst_res(TINFO, "SCTP %s", (client_mode) ? "client" : "server");
 		fastopen_api = fastopen_sapi = NULL;
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 netstress: load dccp module manually

Quoted 25 lines

RHEL7.5 distro blacklisted dccp module by default, so for DCCP tests we should enable it manually.

---
 testcases/network/netstress/netstress.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
testcases/network/netstress/netstress.c +7 -1
index 9751cf6..d8354b8 100644
@@ -941,13 +941,19 @@ static void setup(void)
 		sock_type = SOCK_DGRAM;
 		protocol = IPPROTO_UDPLITE;
 	break;
-	case TYPE_DCCP:
+	case TYPE_DCCP: {
+		/* dccp module can be blacklisted, load it manually */
+		static const char * const argv[] = {"modprobe", "dccp", NULL};
+
+		if (tst_run_cmd(argv, NULL, NULL, 1))
+			tst_res(TWARN, "Failed to load DCCP module");
+

testcases/network/netstress/netstress.c static void setup(void) · line 959

Quoted 10 lines
testcases/network/netstress/netstress.c +1 -1
 		tst_res(TINFO, "DCCP %s", (client_mode) ? "client" : "server");
 		fastopen_api = fastopen_sapi = NULL;
 		sock_type = SOCK_DCCP;
 		protocol = IPPROTO_DCCP;
 		service_code = htonl(service_code);
-	break;
+	} break;
 	case TYPE_SCTP:
 		tst_res(TINFO, "SCTP %s", (client_mode) ? "client" : "server");
 		fastopen_api = fastopen_sapi = NULL;
author Applied
#2 lore raw

PATCH 1/1 netstress: load dccp module manually

Quoted 2 lines · Petr Vorel
Quoted 2 lines

RHEL7.5 distro blacklisted dccp module by default, so for DCCP tests we should enable it manually.

...

Quoted 1 line

Applied.