tests: don't read /proc, the number of entries changes too quickly
This could lead to test failures like this: --- FAIL: TestGetdents (0.02s) getdents_test.go:57: len(getdentsEntries)=362, len(readdirEntries)=360 FAIL
This commit is contained in:
parent
e9f6c7ad67
commit
34547a6c39
@ -25,9 +25,10 @@ func TestGetdents(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
// "/", "/dev" and "/proc" are good test cases because they contain many
|
||||
// different file types (block and char devices, symlinks, mountpoints)
|
||||
dirs := []string{testDir, "/", "/dev", "/proc"}
|
||||
// "/", "/dev" and "/proc/self" are good test cases because they contain
|
||||
// many different file types (block and char devices, symlinks,
|
||||
// mountpoints).
|
||||
dirs := []string{testDir, "/", "/dev", "/proc/self"}
|
||||
for _, dir := range dirs {
|
||||
// Read directory using stdlib Readdir()
|
||||
fd, err := os.Open(dir)
|
||||
|
Loading…
Reference in New Issue
Block a user