diff options
| author | Alan Somers <asomers@FreeBSD.org> | 2019-07-17 22:45:43 +0000 |
|---|---|---|
| committer | Alan Somers <asomers@FreeBSD.org> | 2019-07-17 22:45:43 +0000 |
| commit | d26d63a4af4f693b23f5ac389cc6e0d8938cd96b (patch) | |
| tree | a5eb2a4a6f55cf959fac803fcc72d990faabda8d /tests | |
| parent | 822f5b1dadf2b5b69f4a3314dfa0d6bd7e1f1126 (diff) | |
Notes
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/sys/fs/fusefs/interrupt.cc | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/tests/sys/fs/fusefs/interrupt.cc b/tests/sys/fs/fusefs/interrupt.cc index f27b02f921ef9..98841db778506 100644 --- a/tests/sys/fs/fusefs/interrupt.cc +++ b/tests/sys/fs/fusefs/interrupt.cc @@ -352,65 +352,6 @@ TEST_F(Interrupt, enosys) } /* - * Upon receipt of a fatal signal, fusefs should return ASAP after sending - * FUSE_INTERRUPT. - */ -TEST_F(Interrupt, fatal_signal) -{ - int status; - pthread_t self; - uint64_t mkdir_unique; - sem_t sem; - - ASSERT_EQ(0, sem_init(&sem, 0, 0)) << strerror(errno); - self = pthread_self(); - - EXPECT_LOOKUP(FUSE_ROOT_ID, RELDIRPATH0) - .WillOnce(Invoke(ReturnErrno(ENOENT))); - expect_mkdir(&mkdir_unique); - EXPECT_CALL(*m_mock, process( - ResultOf([&](auto in) { - return (in.header.opcode == FUSE_INTERRUPT && - in.body.interrupt.unique == mkdir_unique); - }, Eq(true)), - _) - ).WillOnce(Invoke([&](auto in __unused, auto &out __unused) { - sem_post(&sem); - /* Don't respond. The process should exit anyway */ - })); - - fork(false, &status, [&] { - }, [&]() { - struct sigaction sa; - int r; - pthread_t killer_th; - pthread_t self; - - /* SIGUSR2 terminates the process by default */ - bzero(&sa, sizeof(sa)); - sa.sa_handler = SIG_DFL; - r = sigaction(SIGUSR2, &sa, NULL); - if (r != 0) { - perror("sigaction"); - return 1; - } - self = pthread_self(); - r = pthread_create(&killer_th, NULL, killer, (void*)self); - if (r != 0) { - perror("pthread_create"); - return 1; - } - - mkdir(FULLDIRPATH0, MODE); - return 1; - }); - ASSERT_EQ(SIGUSR2, WTERMSIG(status)); - - EXPECT_EQ(0, sem_wait(&sem)) << strerror(errno); - sem_destroy(&sem); -} - -/* * A FUSE filesystem is legally allowed to ignore INTERRUPT operations, and * complete the original operation whenever it damn well pleases. */ |
