Commit d55b123473 for qemu.org
commit d55b1234739c64fc6b7e0634613faf141bf91731
Author: Christian Schoenebeck <qemu_oss@crudebyte.com>
Date: Fri Jul 3 17:26:08 2026 +0200
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.
Reported-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Fixes: 04a62cdfe8 ("tests/9p: add 3 xattr FID limit test cases (local fs driver)")
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Tested-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Link: https://lore.kernel.org/qemu-devel/E1wffqw-001Sc8-I9@kylie.crudebyte.com
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c
index 692a0e8e3f..22302bd2f8 100644
--- a/tests/qtest/virtio-9p-test.c
+++ b/tests/qtest/virtio-9p-test.c
@@ -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)
{