MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / TEST

Function TEST

test/plugins/wasm_bpf/wasm_bpf.cpp:73–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71} // namespace
72
73TEST(WasmBpfTest, Module) {
74 auto module = createModule();
75 ASSERT_TRUE(module);
76 // Test whether functions are exported
77 EXPECT_EQ(module->getFuncExportNum(), 6U);
78 EXPECT_NE(module->findFuncExports("wasm_load_bpf_object"), nullptr);
79 EXPECT_NE(module->findFuncExports("wasm_close_bpf_object"), nullptr);
80 EXPECT_NE(module->findFuncExports("wasm_attach_bpf_program"), nullptr);
81 EXPECT_NE(module->findFuncExports("wasm_bpf_buffer_poll"), nullptr);
82 EXPECT_NE(module->findFuncExports("wasm_bpf_map_fd_by_name"), nullptr);
83 EXPECT_NE(module->findFuncExports("wasm_bpf_map_operate"), nullptr);
84}
85
86static const size_t TASK_COMM_LEN = 16;
87static const size_t MAX_FILENAME_LEN = 127;

Callers

nothing calls this directly

Calls 15

MemoryTypeClass · 0.85
ConfigureClass · 0.85
TableTypeClass · 0.85
printFunction · 0.85
getFuncExportNumMethod · 0.80
findFuncExportsMethod · 0.80
addHostMemoryMethod · 0.80
findMemoryExportsMethod · 0.80
is_openMethod · 0.80
goodMethod · 0.80
isHostFunctionMethod · 0.80
addHostFuncMethod · 0.80

Tested by

no test coverage detected