diff options
| author | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2017-11-02 12:15:39 +0000 |
|---|---|---|
| committer | Edward Tomasz Napierala <trasz@FreeBSD.org> | 2017-11-02 12:15:39 +0000 |
| commit | e2828958cb00b154b4fdf54906dc5cf0b3c0bb53 (patch) | |
| tree | fbedfe034ae3329d6c1627ef847c4ca74d0015a4 | |
| parent | cf8ca06ad8b6f9d36d6e677a7ba112f9a93127c7 (diff) | |
Notes
| -rw-r--r-- | tools/tools/syscall_timing/syscall_timing.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/tools/syscall_timing/syscall_timing.c b/tools/tools/syscall_timing/syscall_timing.c index 80a635599894..3a0594ea59ef 100644 --- a/tools/tools/syscall_timing/syscall_timing.c +++ b/tools/tools/syscall_timing/syscall_timing.c @@ -392,6 +392,21 @@ test_open_close(uintmax_t num, uintmax_t int_arg, const char *path) } uintmax_t +test_bad_open(uintmax_t num, uintmax_t int_arg, const char *path) +{ + uintmax_t i; + + benchmark_start(); + for (i = 0; i < num; i++) { + if (alarm_fired) + break; + open("", O_RDONLY); + } + benchmark_stop(); + return (i); +} + +uintmax_t test_read(uintmax_t num, uintmax_t int_arg, const char *path) { char buf[int_arg]; @@ -702,6 +717,7 @@ static const struct test tests[] = { { "socket_tcp", test_socket_stream, .t_int = PF_INET }, { "socket_udp", test_socket_dgram, .t_int = PF_INET }, { "create_unlink", test_create_unlink, .t_flags = FLAG_PATH }, + { "bad_open", test_bad_open }, { "open_close", test_open_close, .t_flags = FLAG_PATH }, { "open_read_close_1", test_open_read_close, .t_flags = FLAG_PATH, .t_int = 1 }, |
