38 { (void) fd; (void) request; (void) data;
return g_read_ioctl; }
41 { (void) fd; (void) request; (void) data;
return g_write_ioctl; }
43 static auto operator"" _die(
const char *
str, std::size_t len)
44 { (void)str; (void)len;
return std::make_shared<bfn::driver_inaccessible_error>(); }
46 static auto operator"" _ife(
const char *
str, std::size_t len)
47 { (void)str; (void)len;
return std::make_shared<bfn::ioctl_failed_error>(
""); }
50 bfm_ut::test_ioctl_driver_inaccessible()
61 bfm_ut::test_ioctl_add_module_with_invalid_length()
68 bfm_ut::test_ioctl_add_module_failed()
70 auto &&
data = {
'h',
'e',
'l',
'l',
'o'};
80 bfm_ut::test_ioctl_load_vmm_failed()
91 bfm_ut::test_ioctl_unload_vmm_failed()
102 bfm_ut::test_ioctl_start_vmm_failed()
104 auto &&ctl =
ioctl{};
113 bfm_ut::test_ioctl_stop_vmm_failed()
115 auto &&ctl =
ioctl{};
124 bfm_ut::test_ioctl_dump_vmm_with_invalid_drr()
127 auto &&ctl =
ioctl{};
133 bfm_ut::test_ioctl_dump_vmm_failed()
136 auto &&ctl =
ioctl{};
145 bfm_ut::test_ioctl_vmm_status_with_invalid_status()
148 auto &&ctl =
ioctl{};
154 bfm_ut::test_ioctl_vmm_status_failed()
157 auto &&ctl =
ioctl{};
166 bfm_ut::test_ioctl_vmm_vmcall_with_invalid_registers()
169 auto &&ctl =
ioctl{};
171 this->
expect_exception([&] { ctl.call_ioctl_vmcall(reigsters, 0); },
""_ut_ffe);
175 bfm_ut::test_ioctl_vmm_vmcall_failed()
178 auto &&ctl =
ioctl{};
183 this->
expect_exception([&] { ctl.call_ioctl_vmcall(®isters, 0); },
""_ife);
#define expect_exception(f, e)
int64_t unsigned long request
int64_t bf_write_ioctl(int fd, unsigned long request, const void *data)
int64_t unsigned long void * data
status_type * status_pointer
debug_ring_resources_t * drr
int64_t bf_read_ioctl(int fd, unsigned long request, void *data)
int64_t bf_send_ioctl(int fd, unsigned long request)