lrpc_fpu,harness: adding a test
authorAdam Turowski <adam.turowski@inf.ethz.ch>
Mon, 16 Jan 2017 10:08:49 +0000 (11:08 +0100)
committerAdam Turowski <adam.turowski@inf.ethz.ch>
Mon, 16 Jan 2017 10:08:49 +0000 (11:08 +0100)
Signed-off-by: Adam Turowski <adam.turowski@inf.ethz.ch>

tools/harness/tests/rpctests.py
usr/tests/lrpc_fpu/Hakefile
usr/tests/lrpc_fpu/lrpc_fpu.c

index af65bc3..a32cd26 100644 (file)
@@ -343,3 +343,31 @@ class LrpcTest(RpcTestCommon):
                 index = int(m.group(1))
         results.add_group(iteration, data)
         return results
+
+@tests.add_test
+class LrpcFPUTest(RpcTestCommon):
+    ''' LRPC FPU microbenchmark '''
+    name = "lrpc_fpu"
+
+    def get_module_name(self):
+        return "lrpc_fpu"
+
+    def get_modules(self, build, machine):
+        modules = super(RpcTestCommon, self).get_modules(build, machine)
+        modules.add_module("lrpc_fpu", ["server"])
+        modules.add_module("lrpc_fpu", ["client"])
+        return modules
+
+    def get_finish_string(self):
+        return "End of LRPC-FPU test:"
+
+    def run(self, *args):
+        # XXX: want to use the base single-boot implementation
+        return TestCommon.run(self, *args)
+
+    def process_data(self, testdir, raw_iter):
+        passed = False
+        for line in raw_iter:
+            if "Everything OK" in line:
+                passed = True
+        return PassFailResult(passed)
index 81256a8..c4b759b 100644 (file)
@@ -13,5 +13,6 @@
 [ build application { target = "lrpc_fpu",
                       cFiles = [ "lrpc_fpu.c" ],
                       flounderBindings = [ "bench" ],
-                      addLibraries = ["bench"] }
+                      addLibraries = ["bench"],
+                      architectures = [ "x86_64", "k1om" ] }
 ]
index 249a3c8..b6045c3 100644 (file)
@@ -63,7 +63,7 @@ static void lrpc_bench_handler(void *arg)
         printf("SERVER: %lf != %lf\n", SERVER_VAL, d_val);
         abort();
     }
-    
+
     // try to pull a message out of the channel
     struct lmp_recv_msg msg = LMP_RECV_MSG_INIT;
     err = lmp_chan_recv(chan, &msg, NULL);