Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion msgq/event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
void event_state_shm_mmap(std::string endpoint, std::string identifier, char **shm_mem, std::string *shm_path) {
const char* op_prefix = std::getenv("OPENPILOT_PREFIX");

std::string full_path = "/dev/shm/";
std::string full_path = "/dev/shm/msgq_";
if (op_prefix) {
full_path += std::string(op_prefix) + "/";
}
Expand Down
2 changes: 1 addition & 1 deletion msgq/msgq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ int msgq_new_queue(msgq_queue_t * q, const char * path, size_t size){
assert(size < 0xFFFFFFFF); // Buffer must be smaller than 2^32 bytes
std::signal(SIGUSR2, sigusr2_handler);

std::string full_path = "/dev/shm/";
std::string full_path = "/dev/shm/msgq_";
const char* prefix = std::getenv("OPENPILOT_PREFIX");
if (prefix) {
full_path += std::string(prefix) + "/";
Expand Down
22 changes: 11 additions & 11 deletions msgq/msgq_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ TEST_CASE("msgq_msg_init_data")

TEST_CASE("msgq_init_subscriber")
{
remove("/dev/shm/test_queue");
remove("/dev/shm/msgq_test_queue");
msgq_queue_t q;
msgq_new_queue(&q, "test_queue", 1024);
REQUIRE(*q.num_readers == 0);
Expand All @@ -63,7 +63,7 @@ TEST_CASE("msgq_init_subscriber")

TEST_CASE("msgq_msg_send first message")
{
remove("/dev/shm/test_queue");
remove("/dev/shm/msgq_test_queue");
msgq_queue_t q;
msgq_new_queue(&q, "test_queue", 1024);
msgq_init_publisher(&q);
Expand Down Expand Up @@ -100,7 +100,7 @@ TEST_CASE("msgq_msg_send first message")

TEST_CASE("msgq_msg_send test wraparound")
{
remove("/dev/shm/test_queue");
remove("/dev/shm/msgq_test_queue");
msgq_queue_t q;
msgq_new_queue(&q, "test_queue", 1024);
msgq_init_publisher(&q);
Expand Down Expand Up @@ -132,7 +132,7 @@ TEST_CASE("msgq_msg_send test wraparound")

TEST_CASE("msgq_msg_recv test wraparound")
{
remove("/dev/shm/test_queue");
remove("/dev/shm/msgq_test_queue");
msgq_queue_t q_pub, q_sub;
msgq_new_queue(&q_pub, "test_queue", 1024);
msgq_new_queue(&q_sub, "test_queue", 1024);
Expand Down Expand Up @@ -178,7 +178,7 @@ TEST_CASE("msgq_msg_recv test wraparound")

TEST_CASE("msgq_msg_send test invalidation")
{
remove("/dev/shm/test_queue");
remove("/dev/shm/msgq_test_queue");
msgq_queue_t q_pub, q_sub;
msgq_new_queue(&q_pub, "test_queue", 1024);
msgq_new_queue(&q_sub, "test_queue", 1024);
Expand Down Expand Up @@ -214,7 +214,7 @@ TEST_CASE("msgq_msg_send test invalidation")

TEST_CASE("msgq_init_subscriber init 2 subscribers")
{
remove("/dev/shm/test_queue");
remove("/dev/shm/msgq_test_queue");
msgq_queue_t q1, q2;
msgq_new_queue(&q1, "test_queue", 1024);
msgq_new_queue(&q2, "test_queue", 1024);
Expand All @@ -237,7 +237,7 @@ TEST_CASE("msgq_init_subscriber init 2 subscribers")

TEST_CASE("Write 1 msg, read 1 msg", "[integration]")
{
remove("/dev/shm/test_queue");
remove("/dev/shm/msgq_test_queue");
const size_t msg_size = 128;
msgq_queue_t writer, reader;

Expand Down Expand Up @@ -273,7 +273,7 @@ TEST_CASE("Write 1 msg, read 1 msg", "[integration]")

TEST_CASE("Write 2 msg, read 2 msg - conflate = false", "[integration]")
{
remove("/dev/shm/test_queue");
remove("/dev/shm/msgq_test_queue");
const size_t msg_size = 128;
msgq_queue_t writer, reader;

Expand Down Expand Up @@ -310,7 +310,7 @@ TEST_CASE("Write 2 msg, read 2 msg - conflate = false", "[integration]")

TEST_CASE("Write 2 msg, read 2 msg - conflate = true", "[integration]")
{
remove("/dev/shm/test_queue");
remove("/dev/shm/msgq_test_queue");
const size_t msg_size = 128;
msgq_queue_t writer, reader;

Expand Down Expand Up @@ -348,7 +348,7 @@ TEST_CASE("Write 2 msg, read 2 msg - conflate = true", "[integration]")

TEST_CASE("1 publisher, 1 slow subscriber", "[integration]")
{
remove("/dev/shm/test_queue");
remove("/dev/shm/msgq_test_queue");
msgq_queue_t writer, reader;

msgq_new_queue(&writer, "test_queue", 1024);
Expand Down Expand Up @@ -391,7 +391,7 @@ TEST_CASE("1 publisher, 1 slow subscriber", "[integration]")

TEST_CASE("1 publisher, 2 subscribers", "[integration]")
{
remove("/dev/shm/test_queue");
remove("/dev/shm/msgq_test_queue");
msgq_queue_t writer, reader1, reader2;

msgq_new_queue(&writer, "test_queue", 1024);
Expand Down
2 changes: 1 addition & 1 deletion msgq/visionipc/visionbuf_cl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ static void *malloc_with_fd(size_t len, int *fd) {
#ifdef __APPLE__
snprintf(full_path, sizeof(full_path)-1, "/tmp/visionbuf_%d_%d", getpid(), offset++);
#else
snprintf(full_path, sizeof(full_path)-1, "/dev/shm/visionbuf_%d_%d", getpid(), offset++);
snprintf(full_path, sizeof(full_path)-1, "/dev/shm/msgq_visionbuf_%d_%d", getpid(), offset++);
#endif

*fd = open(full_path, O_RDWR | O_CREAT, 0664);
Expand Down
Loading