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>
Christian Schoenebeck committed
Jul 3, 2026 at 17:26 UTC
d55b1234739c64fc6b7e0634613faf141bf91731
1 file changed
+10
-4
tests/qtest/virtio-9p-test.c
+10
-4
@@ -38,11 +38,17 @@
38
/*
39
* xattr size to be used for xattr tests
40
*
41
- * 64k is the max. xattr size supported by the Linux kernel, However btrfs
42
- * for instance supports only 16219 bytes. So let's be conservative and
43
- * just use 8k for the xattr tests.
41
+ * 64k is the max. xattr size supported by the Linux kernel on high-level VFS
42
+ * layer. However filesystems impose their own limits:
43
+ *
44
+ * - btrfs: 16219 bytes
45
+ *
46
+ * - ext4: blocksize - 56 bytes (~4KB) if no ea_inode capability enabled,
47
+ * 64k if ea_inode enabled
48
+ *
49
+ * So let's be conservative and just use 1k for the xattr tests.
50
*/
45
-#define TEST_XATTR_SIZE (8 * 1024)
51
+#define TEST_XATTR_SIZE (1 * 1024)
52
53
static void pci_config(void *obj, void *data, QGuestAllocator *t_alloc)
54
{