diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-08-28 11:11:41 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-28 11:11:41 -0400 |
commit | bd43f81c0fd9395a7e0e2c7a9204c213763a72e8 (patch) | |
tree | f0cae545f0dd583af09eb25613f9663bf7c2b8cf | |
parent | 0640cc79210419e8a72b6a07a7a3ffcae9e97367 (diff) | |
parent | 8a261349499a1f66aaea0576a2a84d0b104df3bb (diff) | |
download | podman-bd43f81c0fd9395a7e0e2c7a9204c213763a72e8.tar.gz podman-bd43f81c0fd9395a7e0e2c7a9204c213763a72e8.tar.bz2 podman-bd43f81c0fd9395a7e0e2c7a9204c213763a72e8.zip |
Merge pull request #7429 from lsm5/localunit-test-fix
delete prior /dev/shm/*
-rw-r--r-- | libpod/lock/shm/shm_lock_test.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/lock/shm/shm_lock_test.go b/libpod/lock/shm/shm_lock_test.go index 362821c62..cb83c7c2c 100644 --- a/libpod/lock/shm/shm_lock_test.go +++ b/libpod/lock/shm/shm_lock_test.go @@ -27,6 +27,8 @@ const lockPath = "/libpod_test" // We need a test main to ensure that the SHM is created before the tests run func TestMain(m *testing.M) { + // Remove prior /dev/shm/libpod_test + os.RemoveAll("/dev/shm" + lockPath) shmLock, err := CreateSHMLock(lockPath, numLocks) if err != nil { fmt.Fprintf(os.Stderr, "Error creating SHM for tests: %v\n", err) @@ -73,6 +75,8 @@ func runLockTest(t *testing.T, testFunc func(*testing.T, *SHMLocks)) { // Test that creating an SHM with a bad size rounds up to a good size func TestCreateNewSHMBadSizeRoundsUp(t *testing.T) { + // Remove prior /dev/shm/test1 + os.RemoveAll("/dev/shm/test1") // Odd number, not a power of 2, should never be a word size on a system lock, err := CreateSHMLock("/test1", 7) assert.NoError(t, err) |