Merge pull request #6169 from vrothberg/fix-6164

shm_lock_test: add nil check
This commit is contained in:
OpenShift Merge Robot 2020-05-11 15:34:44 +02:00 committed by GitHub
commit d8c6cc1684
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -76,6 +76,7 @@ func TestCreateNewSHMBadSizeRoundsUp(t *testing.T) {
// Odd number, not a power of 2, should never be a word size on a system // Odd number, not a power of 2, should never be a word size on a system
lock, err := CreateSHMLock("/test1", 7) lock, err := CreateSHMLock("/test1", 7)
assert.NoError(t, err) assert.NoError(t, err)
assert.NotNil(t, lock)
assert.Equal(t, lock.GetMaxLocks(), BitmapSize) assert.Equal(t, lock.GetMaxLocks(), BitmapSize)