diff options
Diffstat (limited to 'recipes-containers/netavark/files')
3 files changed, 116 insertions, 5 deletions
diff --git a/recipes-containers/netavark/files/0001-test-skip-firewalld-and-sit-module-related-cases.patch b/recipes-containers/netavark/files/0001-test-skip-firewalld-and-sit-module-related-cases.patch new file mode 100644 index 00000000..7fb58a63 --- /dev/null +++ b/recipes-containers/netavark/files/0001-test-skip-firewalld-and-sit-module-related-cases.patch | |||
@@ -0,0 +1,105 @@ | |||
1 | From d527af68458f071215e70d6e5f952017f882a626 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <mingli.yu@windriver.com> | ||
3 | Date: Mon, 24 Jun 2024 15:40:57 +0800 | ||
4 | Subject: [PATCH] test: skip firewalld and sit module related cases | ||
5 | |||
6 | * Skip firewalld related cases as don't enable firewalld by default. | ||
7 | |||
8 | * Skip some other cases as the sit0 device is automatically added to all | ||
9 | network namespaces then this will break many test assumptions [1]. | ||
10 | |||
11 | [1] https://github.com/containers/netavark/issues/984 | ||
12 | |||
13 | Upstream-Status: Pending | ||
14 | |||
15 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
16 | --- | ||
17 | test/100-bridge-iptables.bats | 4 ++++ | ||
18 | test/250-bridge-nftables.bats | 2 ++ | ||
19 | test/300-macvlan.bats | 1 + | ||
20 | test/600-bridge-vrf.bats | 1 + | ||
21 | 4 files changed, 8 insertions(+) | ||
22 | |||
23 | diff --git a/test/100-bridge-iptables.bats b/test/100-bridge-iptables.bats | ||
24 | index 420547b..3ff5d04 100644 | ||
25 | --- a/test/100-bridge-iptables.bats | ||
26 | +++ b/test/100-bridge-iptables.bats | ||
27 | @@ -496,6 +496,7 @@ fw_driver=iptables | ||
28 | } | ||
29 | |||
30 | @test "$fw_driver - port range forwarding dual - udp" { | ||
31 | + skip | ||
32 | test_port_fw ip=dual proto=udp range=3 | ||
33 | } | ||
34 | |||
35 | @@ -858,6 +859,7 @@ EOF | ||
36 | |||
37 | |||
38 | @test "$fw_driver - bridge teardown" { | ||
39 | + skip | ||
40 | create_container_ns | ||
41 | configs=() | ||
42 | for i in 1 2; do | ||
43 | @@ -991,6 +993,7 @@ EOF | ||
44 | } | ||
45 | |||
46 | @test "$fw_driver - test firewalld reload" { | ||
47 | + skip | ||
48 | setup_firewalld | ||
49 | |||
50 | run_netavark --file ${TESTSDIR}/testfiles/simplebridge.json setup $(get_container_netns_path) | ||
51 | @@ -1024,6 +1027,7 @@ EOF | ||
52 | } | ||
53 | |||
54 | @test "$fw_driver - port forwarding ipv4 - tcp with firewalld reload" { | ||
55 | + skip | ||
56 | test_port_fw firewalld_reload=true | ||
57 | } | ||
58 | |||
59 | diff --git a/test/250-bridge-nftables.bats b/test/250-bridge-nftables.bats | ||
60 | index 77bc12c..7876f53 100644 | ||
61 | --- a/test/250-bridge-nftables.bats | ||
62 | +++ b/test/250-bridge-nftables.bats | ||
63 | @@ -913,6 +913,7 @@ EOF | ||
64 | } | ||
65 | |||
66 | @test "$fw_driver - test firewalld reload" { | ||
67 | + skip | ||
68 | setup_firewalld | ||
69 | |||
70 | run_netavark --file ${TESTSDIR}/testfiles/simplebridge.json setup $(get_container_netns_path) | ||
71 | @@ -944,6 +945,7 @@ EOF | ||
72 | } | ||
73 | |||
74 | @test "$fw_driver - port forwarding ipv4 - tcp with firewalld reload" { | ||
75 | + skip | ||
76 | test_port_fw firewalld_reload=true | ||
77 | } | ||
78 | |||
79 | diff --git a/test/300-macvlan.bats b/test/300-macvlan.bats | ||
80 | index c062a7f..e646faf 100644 | ||
81 | --- a/test/300-macvlan.bats | ||
82 | +++ b/test/300-macvlan.bats | ||
83 | @@ -329,6 +329,7 @@ EOF | ||
84 | |||
85 | @test "macvlan same interface name on container" { | ||
86 | |||
87 | + skip | ||
88 | read -r -d '\0' config <<EOF | ||
89 | { | ||
90 | "container_id": "someID", | ||
91 | diff --git a/test/600-bridge-vrf.bats b/test/600-bridge-vrf.bats | ||
92 | index 4b95f93..dc90e92 100644 | ||
93 | --- a/test/600-bridge-vrf.bats | ||
94 | +++ b/test/600-bridge-vrf.bats | ||
95 | @@ -6,6 +6,7 @@ | ||
96 | load helpers | ||
97 | |||
98 | @test vrf - bridge with vrf { | ||
99 | + skip | ||
100 | run_in_host_netns ip link add test-vrf type vrf table 10 | ||
101 | run_in_host_netns ip link set dev test-vrf up | ||
102 | |||
103 | -- | ||
104 | 2.34.1 | ||
105 | |||
diff --git a/recipes-containers/netavark/files/run-ptest b/recipes-containers/netavark/files/run-ptest index 7e017ae2..59238d37 100644 --- a/recipes-containers/netavark/files/run-ptest +++ b/recipes-containers/netavark/files/run-ptest | |||
@@ -5,4 +5,10 @@ shopt -s extglob | |||
5 | # Skip the plugin tests because those example plugins are built only while | 5 | # Skip the plugin tests because those example plugins are built only while |
6 | # running cargo test and for this to work as a ptest they would need to be cross | 6 | # running cargo test and for this to work as a ptest they would need to be cross |
7 | # compiled and installed as part of the ptest. | 7 | # compiled and installed as part of the ptest. |
8 | NETAVARK=/usr/libexec/podman/netavark bats test/!(*-plugin.bats) | 8 | for i in `ls test`; do |
9 | if [ $i == "200-bridge-firewalld.bats" ] || [ $i == "500-plugin.bats" ] ; then | ||
10 | continue | ||
11 | fi | ||
12 | [ ${i: -4 -1} == ".bats" ] && NETAVARK=/usr/libexec/podman/netavark bats -t test/$i | sed -e '/^ok/ s/^ok/PASS: /g' | sed -e '/^not ok/ s/^not ok/FAIL: /g' | ||
13 | done | ||
14 | |||
diff --git a/recipes-containers/netavark/files/tests.patch b/recipes-containers/netavark/files/tests.patch index 3e1e9ed9..e4ca24b5 100644 --- a/recipes-containers/netavark/files/tests.patch +++ b/recipes-containers/netavark/files/tests.patch | |||
@@ -4,16 +4,16 @@ Index: git/test/helpers.bash | |||
4 | =================================================================== | 4 | =================================================================== |
5 | --- git.orig/test/helpers.bash | 5 | --- git.orig/test/helpers.bash |
6 | +++ git/test/helpers.bash | 6 | +++ git/test/helpers.bash |
7 | @@ -575,7 +575,7 @@ | 7 | @@ -645,7 +645,7 @@ |
8 | fi | 8 | fi |
9 | 9 | ||
10 | nsenter -n -t "${CONTAINER_NS_PIDS[$container_ns]}" timeout --foreground -v --kill=10 5 \ | 10 | nsenter -n -t "${CONTAINER_NS_PIDS[$container_ns]}" timeout --foreground -v --kill=10 5 \ |
11 | - nc $nc_common_args -l -p $container_port &>"$NETAVARK_TMPDIR/nc-out" <$stdin & | 11 | - nc $nc_common_args -l -p $container_port &>"$NETAVARK_TMPDIR/nc-out" <&$stdin & |
12 | + ncat $nc_common_args -l -p $container_port &>"$NETAVARK_TMPDIR/nc-out" <$stdin & | 12 | + ncat $nc_common_args -l -p $container_port &>"$NETAVARK_TMPDIR/nc-out" <&$stdin & |
13 | 13 | ||
14 | # make sure to wait until port is bound otherwise test can flake | 14 | # make sure to wait until port is bound otherwise test can flake |
15 | # https://github.com/containers/netavark/issues/433 | 15 | # https://github.com/containers/netavark/issues/433 |
16 | @@ -588,7 +588,7 @@ | 16 | @@ -658,7 +658,7 @@ |
17 | fi | 17 | fi |
18 | 18 | ||
19 | data=$(random_string) | 19 | data=$(random_string) |