chore: add more tests (#3006)

This commit is contained in:
Kevin Wan
2023-03-10 17:36:39 +08:00
committed by GitHub
parent 7a0c04bc21
commit 3a493cd6a6
25 changed files with 66 additions and 28 deletions

View File

@@ -1,5 +1,4 @@
//go:build !linux
// +build !linux
package stat

View File

@@ -1,5 +1,4 @@
//go:build linux
// +build linux
package stat

View File

@@ -1,5 +1,4 @@
//go:build linux
// +build linux
package stat

View File

@@ -278,10 +278,8 @@ func runningInUserNS() bool {
var a, b, c int64
fmt.Sscanf(line, "%d %d %d", &a, &b, &c)
/*
* We assume we are in the initial user namespace if we have a full
* range - 4294967295 uids starting at uid 0.
*/
// We assume we are in the initial user namespace if we have a full
// range - 4294967295 uids starting at uid 0.
if a == 0 && b == 0 && c == 4294967295 {
return
}

View File

@@ -1,5 +1,4 @@
//go:build !linux
// +build !linux
package internal