[ovs-dev] [PATCH] autotest: Fix kernel module unit test teardown

Christoph Jaeger cj at linux.com
Wed Jan 28 19:02:42 UTC 2015


Due to a misnaming, the macro calls

  OVS_SWITCHD_STOP([$1])
  AT_CHECK([modprobe -r openvswitch])

in OVS_KMOD_VSWITCHD_STOP make up a syntactically correct function definition
(OVS_SWITCHD_STOP does not exist, and therefore the call does not expand):

  OVS_SWITCHD_STOP()
  { set +x
  $as_echo "$at_srcdir/kmod-traffic.at:15: modprobe -r openvswitch"
  ...
  $at_traceon; }

Consequently, neither of the calls has the intended effect, i.e., stopping
ovs-vswitchd and ovsdb-server, checking their log files, and unloading the
datapath kernel module. Fix the misnaming, so all calls expand properly.

Fixes: 69c2bdfef9 ("autotest: add autotest framework for adding kernel module unit tests")
Signed-off-by: Christoph Jaeger <cj at linux.com>
---

Pure evil!

 tests/kmod-macros.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kmod-macros.at b/tests/kmod-macros.at
index b792c0d..f3629bc 100644
--- a/tests/kmod-macros.at
+++ b/tests/kmod-macros.at
@@ -25,7 +25,7 @@ m4_define([OVS_KMOD_VSWITCHD_START],
 #   OVS_KMOD_VSWITCHD_STOP(["/expected error/d"])
 m4_define([OVS_KMOD_VSWITCHD_STOP],
   [AT_CHECK([ovs-vsctl del-br br0])
-   OVS_SWITCHD_STOP([$1])
+   OVS_VSWITCHD_STOP([$1])
    AT_CHECK([modprobe -r openvswitch])
   ])
 
-- 
2.1.0




More information about the dev mailing list