Re-enable shared memory test prog
This commit is contained in:
parent
c6f6a63ed7
commit
3d4f1914c6
|
|
@ -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)
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue