File: 0001-Relax-TestVerifyProcRoot_ProcNonRoot.patch

package info (click to toggle)
golang-github-cyphar-filepath-securejoin 0.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 372 kB
  • sloc: makefile: 8
file content (51 lines) | stat: -rw-r--r-- 3,832 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
From: Reinhard Tartler <siretart@tauware.de>
Date: Sat, 19 Oct 2024 16:59:22 -0400
Subject: Relax TestVerifyProcRoot_ProcNonRoot

Fails on debci in LXC with:

290s === RUN   TestVerifyProcRoot_ProcNonRoot/thread-self="thread-self"
290s     procfs_linux_test.go:396:
290s         	Error Trace:	/tmp/autopkgtest-lxc.mg9dhiho/downtmp/autopkgtest_tmp/obj-x86_64-linux-gnu/src/github.com/cyphar/filepath-securejoin/procfs_linux_test.go:396
290s         	            				/tmp/autopkgtest-lxc.mg9dhiho/downtmp/autopkgtest_tmp/obj-x86_64-linux-gnu/src/github.com/cyphar/filepath-securejoin/procfs_linux_test.go:410
290s         	            				/tmp/autopkgtest-lxc.mg9dhiho/downtmp/autopkgtest_tmp/obj-x86_64-linux-gnu/src/github.com/cyphar/filepath-securejoin/util_linux_test.go:83
290s         	Error:      	Error "unsafe procfs detected: incorrect procfs root filesystem type 0x65735546" does not contain "incorrect procfs root inode number"
290s         	Test:       	TestVerifyProcRoot_ProcNonRoot/thread-self="thread-self"
290s         	Messages:   	verifyProcRoot(/proc/stat)
290s === RUN   TestVerifyProcRoot_ProcNonRoot/thread-self="self/task"
290s     procfs_linux_test.go:396:
290s         	Error Trace:	/tmp/autopkgtest-lxc.mg9dhiho/downtmp/autopkgtest_tmp/obj-x86_64-linux-gnu/src/github.com/cyphar/filepath-securejoin/procfs_linux_test.go:396
290s         	            				/tmp/autopkgtest-lxc.mg9dhiho/downtmp/autopkgtest_tmp/obj-x86_64-linux-gnu/src/github.com/cyphar/filepath-securejoin/procfs_linux_test.go:410
290s         	            				/tmp/autopkgtest-lxc.mg9dhiho/downtmp/autopkgtest_tmp/obj-x86_64-linux-gnu/src/github.com/cyphar/filepath-securejoin/util_linux_test.go:83
290s         	Error:      	Error "unsafe procfs detected: incorrect procfs root filesystem type 0x65735546" does not contain "incorrect procfs root inode number"
290s         	Test:       	TestVerifyProcRoot_ProcNonRoot/thread-self="self/task"
290s         	Messages:   	verifyProcRoot(/proc/stat)
290s === RUN   TestVerifyProcRoot_ProcNonRoot/thread-self="self"
290s     procfs_linux_test.go:396:
290s         	Error Trace:	/tmp/autopkgtest-lxc.mg9dhiho/downtmp/autopkgtest_tmp/obj-x86_64-linux-gnu/src/github.com/cyphar/filepath-securejoin/procfs_linux_test.go:396
290s         	            				/tmp/autopkgtest-lxc.mg9dhiho/downtmp/autopkgtest_tmp/obj-x86_64-linux-gnu/src/github.com/cyphar/filepath-securejoin/procfs_linux_test.go:410
290s         	            				/tmp/autopkgtest-lxc.mg9dhiho/downtmp/autopkgtest_tmp/obj-x86_64-linux-gnu/src/github.com/cyphar/filepath-securejoin/util_linux_test.go:83
290s         	Error:      	Error "unsafe procfs detected: incorrect procfs root filesystem type 0x65735546" does not contain "incorrect procfs root inode number"
290s         	Test:       	TestVerifyProcRoot_ProcNonRoot/thread-self="self"
290s         	Messages:   	verifyProcRoot(/proc/stat)
---
 procfs_linux_test.go | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/procfs_linux_test.go b/procfs_linux_test.go
index 61bfed6..25fafd3 100644
--- a/procfs_linux_test.go
+++ b/procfs_linux_test.go
@@ -405,9 +405,9 @@ func TestVerifyProcRoot_Regular(t *testing.T) {
 
 func TestVerifyProcRoot_ProcNonRoot(t *testing.T) {
 	testForceProcThreadSelf(t, func(t *testing.T) {
-		testVerifyProcRoot(t, "/proc/self", errUnsafeProcfs, "incorrect procfs root inode number")
-		testVerifyProcRoot(t, "/proc/mounts", errUnsafeProcfs, "incorrect procfs root inode number")
-		testVerifyProcRoot(t, "/proc/stat", errUnsafeProcfs, "incorrect procfs root inode number")
+		testVerifyProcRoot(t, "/proc/self", errUnsafeProcfs, "incorrect procfs root")
+		testVerifyProcRoot(t, "/proc/mounts", errUnsafeProcfs, "incorrect procfs root")
+		testVerifyProcRoot(t, "/proc/stat", errUnsafeProcfs, "incorrect procfs root")
 	})
 }