diff --git a/ebpf_vm_test/CMakeLists.txt b/ebpf_vm_test/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..81fc74758f7f639fa2aa60870730e111ea28117b --- /dev/null +++ b/ebpf_vm_test/CMakeLists.txt @@ -0,0 +1,6 @@ +#packet vm makefile + +add_executable(vm_test mp_vm_test.c test_monitor_address.c) + +include_directories(${CMAKE_SOURCE_DIR}/ebpf_vm_executor) +target_link_libraries(vm_test LINK_PUBLIC ebpf_vm_executor) \ No newline at end of file diff --git a/ebpf_vm_test/mp_vm_test.h b/ebpf_vm_test/mp_vm_test.h new file mode 100644 index 0000000000000000000000000000000000000000..00617ab4c501bba4a030bd8bf37b3f10addb854e --- /dev/null +++ b/ebpf_vm_test/mp_vm_test.h @@ -0,0 +1,20 @@ +#ifndef _MP_VM_TEST_H_ +#define _MP_VM_TEST_H_ + +#include "ebpf_vm_simulator.h" + +enum { + MP_VM_TEST_GENERAL, + MP_VM_TEST_MONITOR_ADDR, + MP_VM_TEST_NUM +}; + +struct vm_test_case { + int index; + void *(*setup)(struct ebpf_vm_executor *executor, struct ebpf_vm *vm, int argc, char **argv); + void (*teardown)(void *ctx); +}; + +int register_test_case(struct vm_test_case *test); + +#endif \ No newline at end of file