diff mbox

[ovs-dev] system-tests: fix module removal during cleanup

Message ID 1464051472-10509-1-git-send-email-cascardo@redhat.com
State Accepted
Headers show

Commit Message

Thadeu Lima de Souza Cascardo May 24, 2016, 12:57 a.m. UTC
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: 53eb8cb83013 ("tests: Replace ON_EXIT m4 macro by on_exit() shell function.")
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
---
 tests/system-kmod-macros.at | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Joe Stringer June 1, 2016, 5:38 p.m. UTC | #1
On 23 May 2016 at 17:57, Thadeu Lima de Souza Cascardo
<cascardo@redhat.com> wrote:
> 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: 53eb8cb83013 ("tests: Replace ON_EXIT m4 macro by on_exit() shell function.")
> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>

Thanks, applied.
diff mbox

Patch

diff --git a/tests/system-kmod-macros.at b/tests/system-kmod-macros.at
index 8e60929..cee0510 100644
--- a/tests/system-kmod-macros.at
+++ b/tests/system-kmod-macros.at
@@ -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.