Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions devices/devices_emulator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,6 @@ func testDeviceEmulatorApply(t *testing.T, baseDefaultAllow bool) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
err := test.base.Apply(test.rule)
if err != nil && test.expected != nil {
Expand Down Expand Up @@ -1058,7 +1057,6 @@ func testDeviceEmulatorTransition(t *testing.T, sourceDefaultAllow bool) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
// If we are in black-list mode, we need to prepend the relevant
// clear-all rule (the expected rule lists are written with
Expand Down
1 change: 0 additions & 1 deletion fs2/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func CreateCgroupPath(path string, c *cgroups.Cgroup) (Err error) {
}
} else {
// If the directory was created, be sure it is not left around on errors.
current := current
defer func() {
if Err != nil {
os.Remove(current)
Expand Down
1 change: 0 additions & 1 deletion systemd/freeze_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ func TestFreezeBeforeSet(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.desc, func(t *testing.T) {
m, err := NewLegacyManager(tc.cg, nil)
if err != nil {
Expand Down
1 change: 0 additions & 1 deletion systemd/systemd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ func TestUnifiedResToSystemdProps(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
if tc.minVer != 0 && systemdVersion(cm) < tc.minVer {
t.Skipf("requires systemd >= %d", tc.minVer)
Expand Down
2 changes: 0 additions & 2 deletions utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ func TestGetHugePageSizeImpl(t *testing.T) {
}

for _, c := range testCases {
c := c
t.Run(c.doc, func(t *testing.T) {
output, err := getHugePageSizeFromFilenames(c.input)
t.Log("input:", c.input, "; output:", output, "; err:", err)
Expand Down Expand Up @@ -639,7 +638,6 @@ func TestConvertMemorySwapToCgroupV2Value(t *testing.T) {
}

for _, c := range cases {
c := c
t.Run(c.descr, func(t *testing.T) {
swap, err := ConvertMemorySwapToCgroupV2Value(c.memswap, c.memory)
if c.expErr {
Expand Down