aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Somers <asomers@FreeBSD.org>2024-01-08 01:03:40 +0000
committerAlan Somers <asomers@FreeBSD.org>2024-01-19 20:27:09 +0000
commitd89317a66ff7874c9c04461739d7546e3042c0ad (patch)
treed6624fd600cf1685aad07c91f90e05947f61232d
parent1726e4ced9009b516bdb276234718489c1a0e05f (diff)
downloadsrc-d89317a66ff7874c9c04461739d7546e3042c0ad.tar.gz
src-d89317a66ff7874c9c04461739d7546e3042c0ad.zip
Add a regression test for PR 276191.
The bug isn't fusefs-specific, but this is the easiest way to reproduce it. PR: 276191 MFC with: bdb46c21a3e68d4395d6e0b6a205187e655532b0 Differential Revision: https://reviews.freebsd.org/D43446 Reviewed by: kib (cherry picked from commit 6b1c534927ad47e9b0dd8be1a39f56c3ea813d44)
-rw-r--r--tests/sys/fs/fusefs/io.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/sys/fs/fusefs/io.cc b/tests/sys/fs/fusefs/io.cc
index 340c54f0c949..3c14621f0b66 100644
--- a/tests/sys/fs/fusefs/io.cc
+++ b/tests/sys/fs/fusefs/io.cc
@@ -507,6 +507,16 @@ TEST_P(Io, resize_a_valid_buffer_while_extending)
close(m_test_fd);
}
+/*
+ * mmap of a suitable region could trigger a panic. I'm not sure what
+ * combination of size and offset counts as "suitable". Regression test for
+ * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276191
+ */
+TEST_P(IoCacheable, vnode_pager_generic_putpage_clean_block_at_eof)
+{
+ do_mapwrite(0x1bbc3, 0x3b4e0);
+}
+
INSTANTIATE_TEST_CASE_P(Io, Io,
Combine(Bool(), /* async read */
Values(0x1000, 0x10000, 0x20000), /* m_maxwrite */