Skip to content

Commit b004ae8

Browse files
committed
test: don't fail in ioctl mock for unknown ioctl
It's not possible to run the test under gdb because in this configuration mock calls fail for all unknown IOCTLs. As it turns, just returning a not supported let's the test case still run under gdb. Signed-off-by: Daniel Wagner <[email protected]>
1 parent f0dd975 commit b004ae8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

libnvme/test/ioctl/mock.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ int ioctl(int fd, int request, ...)
157157
if (!real_ioctl)
158158
fail("Error: dlsym failed to find original ioctl\n");
159159
#else
160-
fail("Error: unhandled ioctl\n");
160+
fprintf(stderr, "Warning: unhandled ioctl %lx\n", request);
161+
return -ENOTTY;
161162
#endif
162163
}
163164

0 commit comments

Comments
 (0)