harness: added nfscat tests that use e10k and solarflare NICs
authorRoni Häcki <roni.haecki@inf.ethz.ch>
Wed, 20 Sep 2017 07:17:17 +0000 (09:17 +0200)
committerRoni Häcki <roni.haecki@inf.ethz.ch>
Wed, 20 Sep 2017 07:17:17 +0000 (09:17 +0200)
Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

tools/harness/tests/nfscat.py

index 81ebdd4..f266c71 100644 (file)
@@ -46,3 +46,39 @@ class NFSTest(TestCommon):
             lastline = line
         passed = lastline.startswith(self.get_finish_string())
         return PassFailResult(passed)
+
+@tests.add_test
+class NFSTestE10k(NFSTest):
+    '''NFS benchmark'''
+    name = "nfscat_e10k"
+
+    def get_modules(self, build, machine):
+        modules = super(NFSTest, self).get_modules(build, machine)
+        modules.add_module("e10k", ["auto"])
+        modules.add_module("net_sockets_server", ["nospawn"])
+        nfsip = socket.gethostbyname(siteconfig.get('WEBSERVER_NFS_HOST'))
+        nfspath = siteconfig.get('WEBSERVER_1G_PATH')
+        nfsfile = siteconfig.get('WEBSERVER_1G_FILE')
+
+        modules.add_module("netthroughput",
+                ["core=%d" % machine.get_coreids()[2], "nfs://" + nfsip +
+                          nfspath , "/nfs/" + nfsfile])
+        return modules
+
+@tests.add_test
+class NFSTestSf(NFSTest):
+    '''NFS benchmark'''
+    name = "nfscat_sf"
+
+    def get_modules(self, build, machine):
+        modules = super(NFSTest, self).get_modules(build, machine)
+        modules.add_module("sfn5122f", ["auto"])
+        modules.add_module("net_sockets_server", ["nospawn"])
+        nfsip = socket.gethostbyname(siteconfig.get('WEBSERVER_NFS_HOST'))
+        nfspath = siteconfig.get('WEBSERVER_1G_PATH')
+        nfsfile = siteconfig.get('WEBSERVER_1G_FILE')
+
+        modules.add_module("netthroughput",
+                ["core=%d" % machine.get_coreids()[2], "nfs://" + nfsip +
+                          nfspath , "/nfs/" + nfsfile])
+        return modules