diff --git a/layer_tests/tracing/src/test_ltracing_ipc_event_helper.cpp b/layer_tests/tracing/src/test_ltracing_ipc_event_helper.cpp index bb91580a..0da1688a 100644 --- a/layer_tests/tracing/src/test_ltracing_ipc_event_helper.cpp +++ b/layer_tests/tracing/src/test_ltracing_ipc_event_helper.cpp @@ -43,8 +43,13 @@ int main(int argc, char **argv) { lzt::shared_ipc_event_data_t shared_data; bipc::shared_memory_object shm; - shm = bipc::shared_memory_object(bipc::open_only, "ipc_ltracing_event_test", - bipc::read_write); + try { + shm = bipc::shared_memory_object(bipc::open_only, "ipc_ltracing_event_test", + bipc::read_write); + } catch (bipc::interprocess_exception &ex) { + LOG_DEBUG << "Child exit due to shared memory object open failure"; + exit(EXIT_FAILURE); + } shm.truncate(sizeof(lzt::shared_ipc_event_data_t)); bipc::mapped_region region(shm, bipc::read_only); std::memcpy(&shared_data, region.get_address(), diff --git a/utils/logging/src/logging.cpp b/utils/logging/src/logging.cpp index 3bbfabb9..8860e760 100644 --- a/utils/logging/src/logging.cpp +++ b/utils/logging/src/logging.cpp @@ -63,7 +63,11 @@ void init_logging(const LoggingSettings settings) { } void init_logging(std::vector &command_line) { + try { init_logging(parse_command_line(command_line)); + } catch (const po::error &e) { + std::cerr << "Error initializing logging parsing command line: " << e.what() << std::endl; + } } void stop_logging() {