tests/9p: reduce xattr size to 1k
PATCH 1/1 tests/9p: reduce xattr size to 1k
On host systems with ext4 and ea_inode capability not enabled, the max. size for xattr values is slightly below 4k, which caused the new xattr tests to fail on such host systems.
Reduce the xattr size for our tests to 1k to prevent them to fail on such host systems.
--- tests/qtest/virtio-9p-test.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
tests/qtest/virtio-9p-test.c +10 -4
@@ -38,11 +38,17 @@/* * xattr size to be used for xattr tests * -* 64k is the max. xattr size supported by the Linux kernel, However btrfs -* for instance supports only 16219 bytes. So let's be conservative and -* just use 8k for the xattr tests. +* 64k is the max. xattr size supported by the Linux kernel on high-level VFS +* layer. However filesystems impose their own limits: +* +* - btrfs: 16219 bytes +* +* - ext4: blocksize - 56 bytes (~4KB) if no ea_inode capability enabled, +* 64k if ea_inode enabled +* +* So let's be conservative and just use 1k for the xattr tests. */ -#define TEST_XATTR_SIZE (8 * 1024) +#define TEST_XATTR_SIZE (1 * 1024)static void pci_config (void *obj,void *data,QGuestAllocator *t_alloc) {
Signature · 1 line
2.47.3
Quoted 7 lines · Christian Schoenebeck
On host systems with ext4 and
ea_inodecapability not enabled, the max. size for xattr values is slightly below 4k, which caused the new xattr tests to fail on such host systems.Reduce the xattr size for our tests to 1k to prevent them to fail on such host systems.
Quoted 7 lines
Reported-by Pierrick Bouvier <[email protected]>Fixes 04a62cdfe8 ("tests/9p: add 3 xattr FID limit test cases (local fs driver)")Signed-off-by Christian Schoenebeck <[email protected]>--- tests/qtest/virtio-9p-test.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
Looks good for me, and fix the failure observed.
In case you want the test to be more complete, you may try to detect ea_node presence, and adapt the size to it.
Regards,
Pierrick
Quoted 13 lines · On Monday, 6 July 2026 23:15:38 CEST Pierrick Bouvier wrote:
Quoted 12 lines · Christian Schoenebeck
On host systems with ext4 and
ea_inodecapability not enabled, the max. size for xattr values is slightly below 4k, which caused the new xattr tests to fail on such host systems.Reduce the xattr size for our tests to 1k to prevent them to fail on such host systems.
Reported-by Pierrick Bouvier <[email protected]>Fixes 04a62cdfe8 ("tests/9p: add 3 xattr FID limit test cases (local fsdriver)") Signed-off-by: Christian Schoenebeck <[email protected]>
---
Quoted 7 lines
Quoted 2 lines
tests/qtest/virtio-9p-test.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)Reviewed-by Pierrick Bouvier <[email protected]>Tested-by Pierrick Bouvier <[email protected]>Looks good for me, and fix the failure observed.
Good, thanks!
Quoted 2 lines
In case you want the test to be more complete, you may try to detect
ea_nodepresence, and adapt the size to it.
No need ATM. These tests actually don't require large xattr values right now.
/Christian
Quoted 7 lines · On Friday, 3 July 2026 17:26:08 CEST Christian Schoenebeck wrote:
On host systems with ext4 and
ea_inodecapability not enabled, the max. size for xattr values is slightly below 4k, which caused the new xattr tests to fail on such host systems.Reduce the xattr size for our tests to 1k to prevent them to fail on such host systems.
Quoted 6 lines
Reported-by Pierrick Bouvier <[email protected]>Fixes 04a62cdfe8 ("tests/9p: add 3 xattr FID limit test cases (local fsdriver)") Signed-off-by: Christian Schoenebeck <[email protected]>
--- tests/qtest/virtio-9p-test.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
Queued on 9p.next:
https://github.com/cschoenebeck/qemu/commits/9p.next
Thanks!
/Christian