Re-enable shared memory test prog

This commit is contained in:
Paul Dino Jones 2025-04-28 20:38:34 -04:00
parent c6f6a63ed7
commit 3d4f1914c6
3 changed files with 12 additions and 12 deletions

View File

@ -79,15 +79,15 @@ add_subdirectory(src/monocoque/slog)
#target_link_libraries(parserevburnerxml portaudio xml2) #target_link_libraries(parserevburnerxml portaudio xml2)
#add_test(parserevburnerxml parserevburnerxml) #add_test(parserevburnerxml parserevburnerxml)
# #
#add_executable(setmem tests/setmem.c) add_executable(setmem tests/setmem.c)
#target_include_directories(setmem PUBLIC) target_include_directories(setmem PUBLIC)
#target_link_libraries(setmem) target_link_libraries(setmem)
#add_test(setmem setmem) add_test(setmem setmem)
#
#add_executable(getmem tests/getmem.c) add_executable(getmem tests/getmem.c)
#target_include_directories(getmem PUBLIC) target_include_directories(getmem PUBLIC)
#target_link_libraries(getmem) target_link_libraries(getmem)
#add_test(getmem getmem) add_test(getmem getmem)
# #
#add_executable(setsimdata tests/setsimdata.c) #add_executable(setsimdata tests/setsimdata.c)
#target_include_directories(setsimdata PUBLIC) #target_include_directories(setsimdata PUBLIC)

View File

@ -19,7 +19,7 @@ int main(int argc, char* argv[])
pid = getpid(); pid = getpid();
// get shared memory file descriptor (NOT a file) // get shared memory file descriptor (NOT a file)
fd = shm_open(TEST_MEM_FILE_LOCATION, O_RDONLY, S_IRUSR | S_IWUSR); fd = shm_open(SIMAPI_MEM_FILE, O_RDONLY, S_IRUSR | S_IWUSR);
if (fd == -1) if (fd == -1)
{ {
return 10; return 10;

View File

@ -21,7 +21,7 @@ int main(int argc, char* argv[])
pid = getpid(); pid = getpid();
fd = shm_open(TEST_MEM_FILE_LOCATION, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); fd = shm_open(SIMAPI_MEM_FILE, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
if (fd == -1) if (fd == -1)
{ {
perror("open"); perror("open");
@ -99,7 +99,7 @@ int main(int argc, char* argv[])
} }
tcsetattr(0, TCSANOW, &canonicalmode); tcsetattr(0, TCSANOW, &canonicalmode);
fd = shm_unlink(TEST_MEM_FILE_LOCATION); fd = shm_unlink(SIMAPI_MEM_FILE);
if (fd == -1) if (fd == -1)
{ {
perror("unlink"); perror("unlink");