Skip to content

Commit

Permalink
ci, tests: Use parallelization permutations for few jobs
Browse files Browse the repository at this point in the history
Single test needs to run 4 times to check all
the permutations, this is taking a lot of CI time
and job space.

Remove the parallel permutation and leave parallelization
enabled for all tests, as this use case is more complex.
Only exception are 10 tests in ovn-northd.at that still run
parallelization permutations. This should be enough to cover
the code with parallelization disabled.

This allows us to greatly reduce the number of test cases
(almost by half) and we can also remove 6 jobs from the CI
pipeline. The time reduction is very noticeable going down
from ~30 min to ~20 min.

Signed-off-by: Ales Musil <amusil@redhat.com>
Acked-by: Han Zhou <hzhou@ovn.org>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
  • Loading branch information
almusil authored and dceara committed Sep 11, 2023
1 parent b6939c1 commit 937a9b5
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 31 deletions.
28 changes: 11 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,29 +102,23 @@ jobs:
cfg:
- { compiler: gcc, opts: --disable-ssl }
- { compiler: clang, opts: --disable-ssl }
- { compiler: gcc, testsuite: test, test_range: "-500" }
- { compiler: gcc, testsuite: test, test_range: "501-1000" }
- { compiler: gcc, testsuite: test, test_range: "1001-" }
- { compiler: gcc, testsuite: test, test_range: "-300" }
- { compiler: gcc, testsuite: test, test_range: "301-600" }
- { compiler: gcc, testsuite: test, test_range: "601-" }
- { compiler: clang, testsuite: test, sanitizers: sanitizers, test_range: "-300" }
- { compiler: clang, testsuite: test, sanitizers: sanitizers, test_range: "301-600" }
- { compiler: clang, testsuite: test, sanitizers: sanitizers, test_range: "601-900" }
- { compiler: clang, testsuite: test, sanitizers: sanitizers, test_range: "901-1200" }
- { compiler: clang, testsuite: test, sanitizers: sanitizers, test_range: "1201-" }
- { compiler: gcc, testsuite: test, libs: -ljemalloc, test_range: "-500" }
- { compiler: gcc, testsuite: test, libs: -ljemalloc, test_range: "501-1000" }
- { compiler: gcc, testsuite: test, libs: -ljemalloc, test_range: "1001-" }
- { compiler: clang, testsuite: test, sanitizers: sanitizers, test_range: "601-" }
- { compiler: gcc, testsuite: test, libs: -ljemalloc, test_range: "-300" }
- { compiler: gcc, testsuite: test, libs: -ljemalloc, test_range: "301-600" }
- { compiler: gcc, testsuite: test, libs: -ljemalloc, test_range: "601-" }
- { compiler: gcc, testsuite: system-test-dpdk, dpdk: dpdk, test_range: "-100" }
- { compiler: gcc, testsuite: system-test-dpdk, dpdk: dpdk, test_range: "101-200" }
- { compiler: gcc, testsuite: system-test-dpdk, dpdk: dpdk, test_range: "201-" }
- { compiler: gcc, testsuite: system-test-dpdk, dpdk: dpdk, test_range: "101-" }
- { compiler: gcc, testsuite: system-test-userspace, test_range: "-100" }
- { compiler: gcc, testsuite: system-test-userspace, test_range: "101-200" }
- { compiler: gcc, testsuite: system-test-userspace, test_range: "201-" }
- { compiler: gcc, testsuite: system-test-userspace, test_range: "101-" }
- { compiler: gcc, testsuite: system-test, test_range: "-100" }
- { compiler: gcc, testsuite: system-test, test_range: "101-200" }
- { compiler: gcc, testsuite: system-test, test_range: "201-" }
- { compiler: gcc, testsuite: system-test, test_range: "101-" }
- { compiler: clang, testsuite: system-test, sanitizers: sanitizers, test_range: "-100" }
- { compiler: clang, testsuite: system-test, sanitizers: sanitizers, test_range: "101-200" }
- { compiler: clang, testsuite: system-test, sanitizers: sanitizers, test_range: "201-" }
- { compiler: clang, testsuite: system-test, sanitizers: sanitizers, test_range: "101-" }
- { arch: x86, compiler: gcc, opts: --disable-ssl }

steps:
Expand Down
15 changes: 11 additions & 4 deletions tests/ovn-macros.at
Original file line number Diff line number Diff line change
Expand Up @@ -887,21 +887,28 @@ OVS_END_SHELL_HELPERS
m4_define([OVN_POPULATE_ARP], [AT_CHECK(ovn_populate_arp__, [0], [ignore])])

# Defines versions of the test with all combinations of northd,
# parallelization on/off and conditional monitoring on/off.
# parallelization enabled and conditional monitoring on/off.
m4_define([OVN_FOR_EACH_NORTHD],
[m4_foreach([NORTHD_TYPE], [ovn-northd],
[m4_foreach([NORTHD_USE_PARALLELIZATION], [yes, no],
[m4_foreach([NORTHD_USE_PARALLELIZATION], [yes],
[m4_foreach([OVN_MONITOR_ALL], [yes, no], [$1
])])])])

# Defines versions of the test with all combinations of northd and
# parallelization on/off. To be used when the ovn-controller configuration
# parallelization enabled. To be used when the ovn-controller configuration
# is not relevant.
m4_define([OVN_FOR_EACH_NORTHD_NO_HV],
[m4_foreach([NORTHD_TYPE], [ovn-northd],
[m4_foreach([NORTHD_USE_PARALLELIZATION], [yes, no], [$1
[m4_foreach([NORTHD_USE_PARALLELIZATION], [yes], [$1
])])])

# Defines versions of the test with all combinations of northd and
# parallelization on/off. To be used when the ovn-controller configuration
# is not relevant and we want to test parallelization permutations.
m4_define([OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION],
[m4_foreach([NORTHD_TYPE], [ovn-northd],
[m4_foreach([NORTHD_USE_PARALLELIZATION], [yes, no], [$1
])])])

# OVN_NBCTL(NBCTL_COMMAND) adds NBCTL_COMMAND to list of commands to be run by RUN_OVN_NBCTL().
m4_define([OVN_NBCTL], [
Expand Down
20 changes: 10 additions & 10 deletions tests/ovn-northd.at
Original file line number Diff line number Diff line change
Expand Up @@ -3870,7 +3870,7 @@ wait_row_count nb:Logical_Switch_Port 1 up=false name=lsp1
AT_CLEANUP
])

OVN_FOR_EACH_NORTHD_NO_HV([
OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
AT_SETUP([Load Balancers and lb_force_snat_ip for Gateway Routers])
ovn_start

Expand Down Expand Up @@ -4409,7 +4409,7 @@ AT_CHECK([ovn-sbctl dump-flows sw0 | grep "ls_in_lb " | sed 's/table=../table=??
AT_CLEANUP
])

OVN_FOR_EACH_NORTHD_NO_HV([
OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
AT_SETUP([ovn -- ACL label usage])
ovn_start

Expand Down Expand Up @@ -4502,7 +4502,7 @@ AT_CHECK([grep "ls_out_stateful" sw0flows | sed 's/table=../table=??/' | sort],
AT_CLEANUP
])

OVN_FOR_EACH_NORTHD_NO_HV([
OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
AT_SETUP([ovn -- ct.inv usage])
ovn_start

Expand Down Expand Up @@ -5001,7 +5001,7 @@ check_lflows 0
AT_CLEANUP
])

OVN_FOR_EACH_NORTHD_NO_HV([
OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
AT_SETUP([ovn -- ARP flows for unreachable addresses - NAT and LB])
ovn_start

Expand Down Expand Up @@ -5207,7 +5207,7 @@ AT_CHECK([grep "ls_in_l2_lkup" ls1_lflows | grep "192.168.4.100" | grep -v clone
AT_CLEANUP
])

OVN_FOR_EACH_NORTHD_NO_HV([
OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
AT_SETUP([ovn -- LR NAT flows])
ovn_start

Expand Down Expand Up @@ -6001,7 +6001,7 @@ AT_CHECK([ovn-sbctl dump-flows lr0 | grep "lr_in_dnat" | sort], [0], [dnl
AT_CLEANUP
])

OVN_FOR_EACH_NORTHD_NO_HV([
OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
AT_SETUP([Load Balancer SB duplicates])
ovn_start

Expand Down Expand Up @@ -6652,7 +6652,7 @@ ct_dnat /* assuming no un-dnat entry, so no change */ /* default (use --ct to cu
AT_CLEANUP
])

OVN_FOR_EACH_NORTHD_NO_HV([
OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
AT_SETUP([route tables -- flows])
AT_KEYWORDS([route-tables-flows])
ovn_start
Expand Down Expand Up @@ -7079,7 +7079,7 @@ AT_CHECK([grep -e 'lr_in_ip_routing ' lrflows | grep -e 'igmp' -e 'mld' | sed
AT_CLEANUP
])

OVN_FOR_EACH_NORTHD_NO_HV([
OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
AT_SETUP([ACLs after lb])
AT_KEYWORDS([acl])
ovn_start
Expand Down Expand Up @@ -7256,7 +7256,7 @@ AT_CHECK([grep -e "ls_in_stateful" lsflows | sed 's/table=../table=??/' | sort],
AT_CLEANUP
])

OVN_FOR_EACH_NORTHD_NO_HV([
OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
AT_SETUP([ovn-northd -- lr multiple gw ports NAT])
AT_KEYWORDS([multiple-l3dgw-ports])
ovn_start
Expand Down Expand Up @@ -7495,7 +7495,7 @@ AT_CHECK([cat lrflows | grep -e lr_in_lookup_neighbor -e lr_in_learn_neighbor |
AT_CLEANUP
])

OVN_FOR_EACH_NORTHD_NO_HV([
OVN_FOR_EACH_NORTHD_NO_HV_PARALLELIZATION([
AT_SETUP([LS default ACL drop])
AT_KEYWORDS([acl])

Expand Down

0 comments on commit 937a9b5

Please sign in to comment.