diff --git a/attach/frida_uprobe_attach_impl/CMakeLists.txt b/attach/frida_uprobe_attach_impl/CMakeLists.txt index 258c0893..a69128e7 100644 --- a/attach/frida_uprobe_attach_impl/CMakeLists.txt +++ b/attach/frida_uprobe_attach_impl/CMakeLists.txt @@ -22,6 +22,7 @@ set(TEST_SOURCES test/test_filter_attach_with_override.cpp test/test_replace_attach_with_override.cpp test/test_attach_with_unified_interface.cpp + test/test_attach_private_data_parsing.cpp ) add_executable(bpftime_frida_uprobe_attach_tests ${TEST_SOURCES}) diff --git a/attach/frida_uprobe_attach_impl/test/test_attach_private_data_parsing.cpp b/attach/frida_uprobe_attach_impl/test/test_attach_private_data_parsing.cpp new file mode 100644 index 00000000..f53f5ccc --- /dev/null +++ b/attach/frida_uprobe_attach_impl/test/test_attach_private_data_parsing.cpp @@ -0,0 +1,15 @@ +#include +#include +#include +#include +using namespace bpftime; + +TEST_CASE("Test illegal parsing") +{ + SECTION("Test bad strings") + { + auto priv = std::make_unique< + bpftime::attach::frida_attach_private_data>(); + REQUIRE(priv->initialize_from_string("aaa:") == -EINVAL); + } +}