Skip to content

Commit 4f2f516

Browse files
authored
Merge pull request kubernetes#90081 from gaurav1086/linux_nil_ptr_check
[LINUX] call T.Fatalf() for nil ptr
2 parents 4bb5211 + fe8d468 commit 4f2f516

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/volume/local/local_linux_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func TestFSGroupMount(t *testing.T) {
3737
}
3838
s := info.Sys().(*syscall.Stat_t)
3939
if s == nil {
40-
t.Errorf("Error getting stats for %s (%v)", tmpDir, err)
40+
t.Fatalf("Error getting stats for %s (%v)", tmpDir, err)
4141
}
4242
fsGroup1 := int64(s.Gid)
4343
fsGroup2 := fsGroup1 + 1
@@ -60,7 +60,7 @@ func TestFSGroupMount(t *testing.T) {
6060
//Checking if GID of tmpDir has not been changed by mounting it by second pod
6161
s = info.Sys().(*syscall.Stat_t)
6262
if s == nil {
63-
t.Errorf("Error getting stats for %s (%v)", tmpDir, err)
63+
t.Fatalf("Error getting stats for %s (%v)", tmpDir, err)
6464
}
6565
if fsGroup1 != int64(s.Gid) {
6666
t.Errorf("Old Gid %d for volume %s got overwritten by new Gid %d", fsGroup1, tmpDir, int64(s.Gid))

0 commit comments

Comments
 (0)