| 37 | static std::string g_test_root; |
| 38 | |
| 39 | static std::string make_test_root() { |
| 40 | char buf[256]; |
| 41 | int pid = (int)getpid(); |
| 42 | snprintf(buf, sizeof(buf), "/tmp/rns_prov_test_%d_%d", pid, ++g_test_counter); |
| 43 | mkdir(buf, 0755); |
| 44 | return std::string(buf); |
| 45 | } |
| 46 | |
| 47 | static void rm_rf(const std::string& path) { |
| 48 | std::string cmd = "rm -rf '" + path + "'"; |