Skip to content

Commit

Permalink
autotest: Fix kernel module unit test teardown
Browse files Browse the repository at this point in the history
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: 69c2bdf ("autotest: add autotest framework for adding kernel module unit tests")
Signed-off-by: Christoph Jaeger <[email protected]>
Signed-off-by: Andy Zhou <[email protected]>

Author: add Christoph Jaeger
  • Loading branch information
christophjaeger authored and azhou-nicira committed Jan 29, 2015
1 parent d69d61c commit ebdabd0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Brian Kruger [email protected]
Bruce Davie [email protected]
Bryan Phillippe [email protected]
Casey Barker [email protected]
Christoph Jaeger [email protected]
Chris Wright [email protected]
Chuck Short [email protected]
Cong Wang [email protected]
Expand Down
2 changes: 1 addition & 1 deletion tests/kmod-macros.at
Original file line number Diff line number Diff line change
Expand Up @@ -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])
])

Expand Down

0 comments on commit ebdabd0

Please sign in to comment.