From 5c8a6bbfc0c4ea5b5f6f9d572be2cbbf9b206e2b Mon Sep 17 00:00:00 2001 From: Georgiy Lebedev Date: Fri, 8 Sep 2023 13:45:34 +0300 Subject: [PATCH] Temporarily disable UPF feature and tests UPF feature for vanilla firecracker requires a separate integration effort (#807), so temporarily disable this feature and all tests for it. Signed-off-by: Georgiy Lebedev --- .github/workflows/nightly_tests.yml | 4 +++- Makefile | 7 +++++-- ctriface/Makefile | 7 +++++-- ctriface/iface_test.go | 13 ++++++++++++- vhive.go | 5 +++++ vhive_test.go | 5 +++++ 6 files changed, 35 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nightly_tests.yml b/.github/workflows/nightly_tests.yml index 8020200ac..93a18729e 100644 --- a/.github/workflows/nightly_tests.yml +++ b/.github/workflows/nightly_tests.yml @@ -58,7 +58,9 @@ jobs: strategy: fail-fast: false matrix: - vhive_args: ["-dbg", "-dbg -snapshots", "-dbg -snapshots -upf"] + # User-level page faults are temporarily disabled (gh-807) + # vhive_args: ["-dbg", "-dbg -snapshots", "-dbg -snapshots -upf"] + vhive_args: [ "-dbg", "-dbg -snapshots" ] env: GITHUB_RUN_ID: ${{ github.run_id }} GITHUB_JOB: ${{ github.job }} diff --git a/Makefile b/Makefile index 442e4edba..c1837ca10 100644 --- a/Makefile +++ b/Makefile @@ -24,8 +24,11 @@ SUBDIRS:=ctriface taps misc profile EXTRAGOARGS:=-v -race -cover EXTRAGOARGS_NORACE:=-v EXTRATESTFILES:=vhive_test.go stats.go vhive.go functions.go -WITHUPF:=-upfTest -WITHLAZY:=-lazyTest +# User-level page faults are temporarily disabled (gh-807) +# WITHUPF:=-upfTest +# WITHLAZY:=-lazyTest +WITHUPF:= +WITHLAZY:= WITHSNAPSHOTS:=-snapshotsTest CTRDLOGDIR:=/tmp/ctrd-logs diff --git a/ctriface/Makefile b/ctriface/Makefile index d88495d57..a5f9db82c 100644 --- a/ctriface/Makefile +++ b/ctriface/Makefile @@ -23,8 +23,11 @@ EXTRAGOARGS:=-v -race -cover EXTRATESTFILES:=iface_test.go iface.go orch_options.go orch.go BENCHFILES:=bench_test.go iface.go orch_options.go orch.go -WITHUPF:=-upf -WITHLAZY:=-lazy +# User-level page faults are temporarily disabled (gh-807) +# WITHUPF:=-upf +# WITHLAZY:=-lazy +WITHUPF:= +WITHLAZY:= GOBENCH:=-v -timeout 1500s CTRDLOGDIR:=/tmp/ctrd-logs diff --git a/ctriface/iface_test.go b/ctriface/iface_test.go index 34d26feee..cd7373314 100644 --- a/ctriface/iface_test.go +++ b/ctriface/iface_test.go @@ -42,9 +42,20 @@ var ( isUPFEnabled = flag.Bool("upf", false, "Set UPF enabled") isLazyMode = flag.Bool("lazy", false, "Set lazy serving on or off") //nolint:deadcode,unused,varcheck - isWithCache = flag.Bool("withCache", false, "Do not drop the cache before measurements") + isWithCache = flag.Bool("withCache", false, "Do not drop the cache before measurements") ) +func TestMain(m *testing.M) { + flag.Parse() + + if *isUPFEnabled { + log.Error("User-level page faults are temporarily disabled (gh-807)") + os.Exit(-1) + } + + os.Exit(m.Run()) +} + func TestPauseSnapResume(t *testing.T) { log.SetFormatter(&log.TextFormatter{ TimestampFormat: ctrdlog.RFC3339NanoFixed, diff --git a/vhive.go b/vhive.go index 39b09630d..b9b2542a8 100644 --- a/vhive.go +++ b/vhive.go @@ -89,6 +89,11 @@ func main() { return } + if *isUPFEnabled { + log.Error("User-level page faults are temporarily disabled (gh-807)") + return + } + if *isUPFEnabled && !*isSnapshotsEnabled { log.Error("User-level page faults are not supported without snapshots") return diff --git a/vhive_test.go b/vhive_test.go index bd57750d4..a72daf408 100644 --- a/vhive_test.go +++ b/vhive_test.go @@ -65,6 +65,11 @@ func TestMain(m *testing.M) { flag.Parse() + if *isUPFEnabledTest { + log.Error("User-level page faults are temporarily disabled (gh-807)") + os.Exit(-1) + } + log.Infof("Orchestrator snapshots enabled: %t", *isSnapshotsEnabledTest) log.Infof("Orchestrator UPF enabled: %t", *isUPFEnabledTest) log.Infof("Orchestrator lazy serving mode enabled: %t", *isLazyModeTest)