Skip to content

Commit

Permalink
Merge pull request kubernetes#90081 from gaurav1086/linux_nil_ptr_check
Browse files Browse the repository at this point in the history
[LINUX] call T.Fatalf() for nil ptr
  • Loading branch information
k8s-ci-robot authored Apr 16, 2020
2 parents 4bb5211 + fe8d468 commit 4f2f516
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/volume/local/local_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestFSGroupMount(t *testing.T) {
}
s := info.Sys().(*syscall.Stat_t)
if s == nil {
t.Errorf("Error getting stats for %s (%v)", tmpDir, err)
t.Fatalf("Error getting stats for %s (%v)", tmpDir, err)
}
fsGroup1 := int64(s.Gid)
fsGroup2 := fsGroup1 + 1
Expand All @@ -60,7 +60,7 @@ func TestFSGroupMount(t *testing.T) {
//Checking if GID of tmpDir has not been changed by mounting it by second pod
s = info.Sys().(*syscall.Stat_t)
if s == nil {
t.Errorf("Error getting stats for %s (%v)", tmpDir, err)
t.Fatalf("Error getting stats for %s (%v)", tmpDir, err)
}
if fsGroup1 != int64(s.Gid) {
t.Errorf("Old Gid %d for volume %s got overwritten by new Gid %d", fsGroup1, tmpDir, int64(s.Gid))
Expand Down

0 comments on commit 4f2f516

Please sign in to comment.