File: 0012-oci-utils_unix_test.go-Cover-for-incus-lxd-test-fail.patch

package info (click to toggle)
containerd 1.7.24~ds1-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,164 kB
  • sloc: sh: 1,356; makefile: 582
file content (29 lines) | stat: -rw-r--r-- 816 bytes parent folder | download
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
26
27
28
29
From: Reinhard Tartler <siretart@tauware.de>
Date: Thu, 14 Aug 2025 21:50:33 -0400
Subject: oci/utils_unix_test.go: Cover for incus/lxd test failures

---
 oci/utils_unix_test.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/oci/utils_unix_test.go b/oci/utils_unix_test.go
index 9c19205..1e12ad8 100644
--- a/oci/utils_unix_test.go
+++ b/oci/utils_unix_test.go
@@ -23,6 +23,7 @@ import (
 	"fmt"
 	"os"
 	"runtime"
+	"strings"
 	"testing"
 
 	"github.com/moby/sys/userns"
@@ -106,7 +107,7 @@ func TestHostDevicesDeviceFromPathFailure(t *testing.T) {
 	defer cleanupTest()
 
 	d, err := HostDevices()
-	if !errors.Is(err, testError) {
+	if !errors.Is(err, testError) && !strings.Contains(err.Error(), "permission denied"){
 		t.Fatalf("Unexpected error %v, expected %v", err, testError)
 	}