mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
size of shm needs to be only sometimes checked when opening shared memory (#443)
This commit is contained in:
@ -33,7 +33,7 @@ TEST_CASE("Is shm fixed pattern shm compatible") {
|
||||
// Set shm version to 0
|
||||
sls::SharedMemory<sls::sharedModule> shm(0, 0);
|
||||
REQUIRE(shm.exists() == true);
|
||||
shm.openSharedMemory();
|
||||
shm.openSharedMemory(true);
|
||||
shm()->shmversion = 0;
|
||||
|
||||
// Should fail since version is set to 0
|
||||
|
@ -47,7 +47,7 @@ TEST_CASE("Open existing SharedMemory and read", "[detector]") {
|
||||
}
|
||||
|
||||
SharedMemory<double> shm2(shm_id, -1);
|
||||
shm2.openSharedMemory();
|
||||
shm2.openSharedMemory(true);
|
||||
CHECK(*shm2() == 5.3);
|
||||
|
||||
shm2.removeSharedMemory();
|
||||
@ -74,7 +74,7 @@ TEST_CASE("Open two shared memories to the same place", "[detector]") {
|
||||
|
||||
// Open the second shared memory with the same name
|
||||
SharedMemory<Data> shm2(shm_id, -1);
|
||||
shm2.openSharedMemory();
|
||||
shm2.openSharedMemory(true);
|
||||
CHECK(shm2()->x == 5);
|
||||
CHECK(shm.getName() == shm2.getName());
|
||||
|
||||
@ -165,7 +165,7 @@ TEST_CASE("map int64 to int32 throws"){
|
||||
*shm() = 7;
|
||||
|
||||
SharedMemory<int64_t> shm2(shm_id, -1);
|
||||
REQUIRE_THROWS(shm2.openSharedMemory());
|
||||
REQUIRE_THROWS(shm2.openSharedMemory(true));
|
||||
|
||||
shm.removeSharedMemory();
|
||||
|
||||
|
Reference in New Issue
Block a user