Add regression test for bcc resolve symbol names
@@ -362,5 +362,11 @@ TEST_CASE("test probing running Ruby process in namespaces",
res = bpf.detach_usdt(u, ruby_pid);
REQUIRE(res.code() == 0);
+
+ struct bcc_symbol sym;
+ std::string pid_root= "/proc/" + std::to_string(ruby_pid) + "/root/";
+ std::string module = pid_root + "usr/local/bin/ruby";
+ REQUIRE(bcc_resolve_symname(module.c_str(), "rb_gc_mark", 0x0, ruby_pid, nullptr, &sym) == 0);
+ REQUIRE(std::string(sym.module).find(pid_root, 1) == std::string::npos);
}
}
