forked from travelping/upg-vpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new UPG E2E tests (travelping#23)
* e2e: quick and dirty prototype of 'captive VPP' * e2e: use http.Client for downloading * e2e: add framework package * e2e: copy netns stuff from CNI plugins * e2e: refactor netns usage a bit * e2e: add hs_proxy based test and remove main.go for now * e2e: make VPP config more flexible * e2e: add basic PFCP Association test * e2e: store PCAPs * e2e: establish PFCP session * e2e: update base image name * e2e: add names for namespaces * e2e: add routes * e2e: add ping to the image * e2e: download some data through UPG * e2e: disable offload for veths This gives a substantial speed boost so we also increase download size * e2e: disable http_static use for now as it breaks on Mac Docker * e2e: use gopacket instead of tcpdump to capture the packets * e2e: use patched go-pfcp from github * e2e: fix method name * e2e: improve docker env Specify base image as a build arg. Also, use dumb-init to avoid having zombies. * e2e: add README.md * e2e: reduce noise from NetNS.disableOffloading() * e2e: improve TrafficGen config and skip VPP WS test on Mac Docker * e2e: issue SessionModificationRequests with QueryURR and handle responses * e2e: refactor PFCPConnection * e2e: reproduce the crash on bad pdr_idx in the frame * e2e: fail when VPP dies * e2e: add a separate test case for PDR replacement crash * e2e: use saner PFCPConnection interface that suports multiple sessions * e2e: add PDR replacement test Crashes UPG if `idBase ^= 9` is uncommented * e2e: fix stopping upon VPP crash * e2e: fix traffic volume checks * e2e: make VPP binary and plugin paths configurable This helps with running the tests against VPP built using its 'make' * e2e: add UDP test cases * e2e: do actually change PDR Ids in TestPDRReplacement * e2e: remove obsolete comments * e2e: test app detection * e2e: test switching proxy on/off * e2e: refactor and add UPG_TEST_QUICK env var * e2e: add redirect test * e2e: switch to Ginkgo/Gomega * e2e: switch to govpp master to avoid panics upon VPP crash * e2e: update README.md after switching to Ginkgo/Gomega * e2e: add PGW mode * e2e: make PGW tests pass and enable PDR replacement for PGW * e2e: port newer uplane changes from sgwsimulator This fixes some of the unneeded error logging (that wasn't causing any test failures, though). * e2e: fix handling GTPU issues * e2e: fix silly sleep * e2e: fix kernel GTPU and re-do GTPU close fix Some of the things need to be done inside the respective network namespaces. Previous "GTPU issues" fix was a red herring, what we really have here is net conn's File() method breaking things after Fd() is retrieved from it. Ref: golang/go#29277 https://github.com/golang/go/blob/2291cae2af659876e93a3e1f95c708abb1475d02/src/os/file_unix.go#L76-L80 * e2e: add IPv6 tests * e2e: fix logging * e2e: fix SEID logging * e2e: add extra checks to ensure proper netns for Dial/Listen * e2e: support running tests in parallel * e2e: split framework package * e2e: add conn flood (+netem) tests * e2e: relax UDP content checks when retries are enabled * e2e: add icmp ping test * e2e: add session deletion loop and fix conn flood test * e2e: add MTU test * e2e: add artifacts dir * e2e: add junit reporting * Integrate new e2e tests with the rest of UPG * e2e: fix ICMP test name * e2e: make tests lighter (especially http) * e2e: use Ginkgo --flakeAttempts (mis)feature to cope with flakes Apparently, CI environment is not powerful enough to handle the tests atm. * e2e: fix http trafficgen flakes in persist mode * e2e: fix excessive resource consumption Had to tune down 'excessive' tests for now. Eventually, need to update trafficgen routines so that they don't allocate a new buffer for each goroutine. * e2e: fix compat with earlier UPF builds * e2e: try using 8 parallel nodes for e2e * e2e: add minimal docs * e2e: use Tomb for easier goroutine lifecycle control
- Loading branch information
Showing
60 changed files
with
8,289 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/bin/bash | ||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
set -o errtrace | ||
|
||
cd "$(dirname "${BASH_SOURCE}")/.." | ||
|
||
: "${E2E_RETEST:=}" | ||
: "${E2E_PARALLEL:=}" | ||
: "${E2E_PARALLEL_NODES:=10}" | ||
: "${E2E_FOCUS:=}" | ||
: "${E2E_TARGET:=debug}" | ||
: "${E2E_ARTIFACTS_DIR:=}" | ||
: "${E2E_JUNIT_DIR:=}" | ||
: "${E2E_QUICK:=}" | ||
: "${E2E_FLAKE_ATTEMPTS:=}" | ||
|
||
if grep -q '^gtp ' /proc/modules; then | ||
echo >&2 "* Using kernel GTP-U support for IPv4 PGW tests" | ||
export UPG_TEST_GTPU_KERNEL=1 | ||
else | ||
echo >&2 "* Kernel GTP-U support not available, using userspace GTP-U only" | ||
fi | ||
|
||
export UPG_TEST_QUICK="${E2E_QUICK}" | ||
|
||
case ${E2E_TARGET} in | ||
debug) | ||
if [[ ! ${E2E_RETEST} ]]; then | ||
make -C vpp build | ||
fi | ||
export VPP_PATH="${PWD}/vpp/build-root/install-vpp_debug-native/vpp/bin/vpp" | ||
export VPP_PLUGIN_PATH="${PWD}/vpp/build-root/install-vpp_debug-native/vpp/lib/vpp_plugins" | ||
export LD_LIBRARY_PATH="${PWD}/vpp/build-root/install-vpp_debug-native/vpp/lib" | ||
;; | ||
release) | ||
if [[ ! ${E2E_RETEST} ]]; then | ||
make -C vpp build-release | ||
fi | ||
export VPP_PATH="${PWD}/vpp/build-root/install-vpp-native/vpp/bin/vpp" | ||
export VPP_PLUGIN_PATH="${PWD}/vpp/build-root/install-vpp-native/vpp/lib/vpp_plugins" | ||
export LD_LIBRARY_PATH="${PWD}/vpp/build-root/install-vpp-native/vpp/lib" | ||
;; | ||
*) | ||
echo >&2 "E2E_TARGET must be either debug or release" | ||
;; | ||
esac | ||
|
||
cd test/e2e | ||
|
||
ginkgo_args=(-trace -progress -reportPassed) | ||
|
||
if [[ ${E2E_PARALLEL} ]]; then | ||
ginkgo_args+=(-nodes "${E2E_PARALLEL_NODES}") | ||
fi | ||
|
||
if [[ ${E2E_FOCUS} ]]; then | ||
ginkgo_args+=(-focus "${E2E_FOCUS}") | ||
fi | ||
|
||
if [[ ${E2E_FLAKE_ATTEMPTS} ]]; then | ||
ginkgo_args+=(--flakeAttempts ${E2E_FLAKE_ATTEMPTS}) | ||
fi | ||
|
||
ginkgo_args+=(--) | ||
|
||
if [[ ${E2E_ARTIFACTS_DIR} ]]; then | ||
ginkgo_args+=(-artifacts-dir "${E2E_ARTIFACTS_DIR}") | ||
fi | ||
|
||
if [[ ${E2E_JUNIT_DIR} ]]; then | ||
ginkgo_args+=(-junit-output "${E2E_JUNIT_DIR}") | ||
fi | ||
|
||
ginkgo "${ginkgo_args[@]}" |
Oops, something went wrong.