File: 0001-Set-default-test-cgroup-v2.patch

package info (click to toggle)
golang-github-kimmachinegun-automemlimit 0.7.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 232 kB
  • sloc: makefile: 3
file content (25 lines) | stat: -rw-r--r-- 952 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From: Daniel Swarbrick <dswarbrick@debian.org>
Date: Fri, 17 Jan 2025 11:28:29 +0100
Subject: Set default test cgroup v2

cgroups v1 is deprecated and systemd 256+ will refuse to boot with it
enabled unless explicitly forced with a kernel command line option.

Forwarded: not-needed
---
 memlimit/memlimit_linux_test.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/memlimit/memlimit_linux_test.go b/memlimit/memlimit_linux_test.go
index 8b989ab..4094561 100644
--- a/memlimit/memlimit_linux_test.go
+++ b/memlimit/memlimit_linux_test.go
@@ -20,7 +20,7 @@ var (
 func TestMain(m *testing.M) {
 	flag.Uint64Var(&expected, "expected", 0, "Expected cgroup's memory limit")
 	flag.Uint64Var(&expectedSystem, "expected-system", 0, "Expected system memory limit")
-	flag.Uint64Var(&cgVersion, "cgroup-version", 0, "Cgroup version")
+	flag.Uint64Var(&cgVersion, "cgroup-version", 2, "Cgroup version")
 	flag.Parse()
 
 	os.Exit(m.Run())