[Xapian-tickets] [Xapian] #823: Unit test ioblock1 failure
Xapian
nobody at xapian.org
Sat Jan 13 18:04:05 GMT 2024
#823: Unit test ioblock1 failure
--------------------------+-------------------------------
Reporter: someplaceguy | Owner: Olly Betts
Type: defect | Status: assigned
Priority: normal | Milestone: 1.4.25
Component: Test Suite | Version: 1.4.24
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: Linux
--------------------------+-------------------------------
Comment (by someplaceguy):
Unfortunately, if I apply the latest patch, it results in the test being
skipped.
I enabled verbosity and added this debug patch:
{{{#!diff
diff --git a/tests/unittest.cc b/tests/unittest.cc
index 8d5e2bb..837ef7f 100644
--- a/tests/unittest.cc
+++ b/tests/unittest.cc
@@ -950,6 +951,7 @@ try {
SKIP_TEST("Skipping rest of testcase - SEEK_HOLE failed");
}
if (hole >= statbuf.st_size) {
+ printf("hole: %jd, st_size: %jd\n", (intmax_t) hole, (intmax_t)
statbuf.st_size);
close(fd);
io_unlink(tmp_file);
SKIP_TEST("Skipping rest of testcase - sparse files not
supported");
}}}
Here's the result:
{{{
Running test: ioblock1...hole: 13312, st_size: 13312
SKIPPED
}}}
Note that in ZFS, by default blocks are logically 128 KiB in size,
although they can be compressed down to the block device's sector size
(4096 bytes or 512 bytes, usually), or even 0 bytes if the block contains
only zeros.
So I believe what's happening is that the entire contents of the file are
being stored in a single block, and that's why no hole can be seen.
That said, note that users can configure ZFS filesystems to have a block
size of (up to) 16 MiB currently. Furthermore, it's even possible to
increase this limit by simply changing a kernel module parameter.
--
Ticket URL: <https://trac.xapian.org/ticket/823#comment:7>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list