Skip to content

Commit

Permalink
system-traffic.at: Skip tests if namespaces or veths aren't supported.
Browse files Browse the repository at this point in the history
This prevents failure of test scenarios 'make check-kernel'
and 'make check-system-userspace' if creation of veth pairs or
network namespaces is not supported by kernel (or module isn't loaded).

Signed-off-by: Ilya Maximets <[email protected]>
Signed-off-by: Joe Stringer <[email protected]>
  • Loading branch information
igsilya authored and joestringer committed Mar 29, 2016
1 parent 3413ba6 commit 1e50983
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/system-common-macros.at
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ m4_define([DEL_NAMESPACES],
m4_define([ADD_NAMESPACES],
[m4_foreach([ns], [$@],
[DEL_NAMESPACES(ns)
AT_CHECK([ip netns add ns])
on_exit 'DEL_NAMESPACES(ns)'
AT_CHECK([ip netns add ns || return 77])
on_exit 'DEL_NAMESPACES(ns)'
])
]
)
Expand Down Expand Up @@ -66,7 +66,7 @@ m4_define([ADD_INT],
# The existing 'port' or 'ovs-port' will be removed before new ones are added.
#
m4_define([ADD_VETH],
[ AT_CHECK([ip link add $1 type veth peer name ovs-$1])
[ AT_CHECK([ip link add $1 type veth peer name ovs-$1 || return 77])
AT_CHECK([ip link set $1 netns $2])
AT_CHECK([ip link set dev ovs-$1 up])
AT_CHECK([ovs-vsctl add-port $3 ovs-$1])
Expand Down

0 comments on commit 1e50983

Please sign in to comment.