Skip to content

Commit

Permalink
system-tests: fix module removal during cleanup
Browse files Browse the repository at this point in the history
Currently, cleanup files for system tests will look like this:

modprobe -q -r vport_vxlan
modprobe -q -r vport_sttmodprobe
modprobe -q -r vport_lispmodprobe
modprobe -q -r vport_gremodprobe
modprobe -q -r vport_genevemodprobe
modprobe -r openvswitch

This is caused by a missing newline in m4_foreach EXPRESSION and the fact that
on_exit is a shell function. It was being expanded like this:

on_exit 'modprobe -q -r vport_genevemodprobe' -q vport_gre

Fixes: 53eb8cb ("tests: Replace ON_EXIT m4 macro by on_exit() shell function.")
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Joe Stringer <[email protected]>
  • Loading branch information
Thadeu Lima de Souza Cascardo authored and joestringer committed Jun 1, 2016
1 parent 79a0e4b commit a134d79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/system-kmod-macros.at
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ m4_define([OVS_TRAFFIC_VSWITCHD_START],
on_exit 'modprobe -r openvswitch'
m4_foreach([mod], [[vport_geneve], [vport_gre], [vport_lisp], [vport_stt], [vport_vxlan]],
[modprobe -q mod || echo "Module mod not loaded."
on_exit 'modprobe -q -r mod'])
on_exit 'modprobe -q -r mod'
])
on_exit 'ovs-dpctl del-dp ovs-system'
_OVS_VSWITCHD_START([])
dnl Add bridges, ports, etc.
Expand Down

0 comments on commit a134d79

Please sign in to comment.