| 47 | } |
| 48 | |
| 49 | std::string libpath(uint64_t pid) { |
| 50 | auto path = |
| 51 | popen_read("cat /proc/" + std::to_string(pid) + |
| 52 | "/maps | grep libphoton | tr -s ' ' | cut -f 6 -d ' '" |
| 53 | " | head -n 1"); |
| 54 | EXPECT_FALSE(path.empty()); |
| 55 | char* tp = strdup(path.c_str()); |
| 56 | path = dirname(tp); |
| 57 | puts(path.c_str()); |
| 58 | free(tp); |
| 59 | return path; |
| 60 | } |
| 61 | |
| 62 | TEST(static_lib, photon_thread_alloc) { |
| 63 | #ifdef __linux__ |
no test coverage detected