[Xapian-tickets] [Xapian] #823: Unit test ioblock1 failure

Xapian nobody at xapian.org
Tue Dec 19 21:11:06 GMT 2023


#823: Unit test ioblock1 failure
---------------------------------+------------------------
        Reporter:  someplaceguy  |      Owner:  Olly Betts
            Type:  defect        |     Status:  new
        Priority:  normal        |  Milestone:
       Component:  Test Suite    |    Version:  1.4.24
        Severity:  normal        |   Keywords:
      Blocked By:                |   Blocking:
Operating System:  Linux         |
---------------------------------+------------------------
 The ioblock1 unit test is failing for me on Xapian 1.4.24:

 {{{
 $ ./runtest ./unittest -v ioblock1
 Running test: ioblock1... FAILED
 unittest.cc:945: (statbuf.st_blocks) >= (BLOCK_SIZE / 512 * 2)
 Evaluates to: 1 >= 4
 }}}

 The issue seems to be that the unit test expects the filesystem to
 allocate at least 2048 bytes (i.e. 4 * 512B) for this file.

 However, I'm running ZFS with compression enabled (which is a very common
 configuration for ZFS), but for this file, ZFS only allocates 512 bytes
 worth of data:

 {{{
 $ hexdump -C .unittest_ioutils1
 00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 |................|
 *
 00000400  78 78 78 78 78 78 78 78  78 78 78 78 78 78 78 78
 |xxxxxxxxxxxxxxxx|
 *
 00000800  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
 |................|
 *
 00003000  78 78 78 78 78 78 78 78  78 78 78 78 78 78 78 78
 |xxxxxxxxxxxxxxxx|
 *
 00003400

 $ stat .unittest_ioutils1
   File: .unittest_ioutils1
   Size: 13312           Blocks: 1          IO Block: 13312  regular file
 Device: 0,30    Inode: 4497130     Links: 1
 Access: (0644/-rw-r--r--)  Uid: (30001/ nixbld1)   Gid: (30000/  nixbld)
 Access: 2023-12-19 20:37:53.120683138 +0000
 Modify: 2023-12-19 20:44:54.815831585 +0000
 Change: 2023-12-19 20:44:54.815831585 +0000
  Birth: 2023-12-19 20:37:53.120683138 +0000
 }}}
-- 
Ticket URL: <https://trac.xapian.org/ticket/823>
Xapian <https://xapian.org/>
Xapian


More information about the Xapian-tickets mailing list