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 <[email protected]> Fixes: 04a62cdfe8 ("tests/9p: add 3 xattr FID limit test cases (local fs driver)") Reviewed-by: Pierrick Bouvier <[email protected]> Tested-by: Pierrick Bouvier <[email protected]> Link: https://lore.kernel.org/qemu-devel/[email protected] Signed-off-by: Christian Schoenebeck <[email protected]> --- tests/qtest/virtio-9p-test.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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) { -- 2.47.3
