diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-05-25 16:07:10 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-05-26 17:22:57 +0200 |
| commit | 220dc49106d66ff912db835004c88f8c9e2d1707 (patch) | |
| tree | f271acbb95f7b96d1da3d6fb6af80d2e95f9d727 /executor/executor.cc | |
| parent | 8f58526cb8e159721342f3880658a1a2547adab8 (diff) | |
csource: reproduce crashes with fault injection
Diffstat (limited to 'executor/executor.cc')
| -rw-r--r-- | executor/executor.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/executor/executor.cc b/executor/executor.cc index bdda612ca..cb31e0697 100644 --- a/executor/executor.cc +++ b/executor/executor.cc @@ -668,14 +668,7 @@ void execute_call(thread_t* th) if (collide) fail("both collide and fault injection are enabled"); debug("injecting fault into %d-th operation\n", flag_fault_nth); - char buf[128]; - sprintf(buf, "/proc/self/task/%d/fail-nth", (int)syscall(SYS_gettid)); - fail_fd = open(buf, O_RDWR); - if (fail_fd == -1) - fail("failed to open /proc/self/task/tid/fail-nth"); - sprintf(buf, "%d", flag_fault_nth + 1); - if (write(fail_fd, buf, strlen(buf)) != (ssize_t)strlen(buf)) - fail("failed to write /proc/self/task/tid/fail-nth"); + fail_fd = inject_fault(flag_fault_nth); } cover_reset(th); |
