]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
support: Handle FUSE_GETXATTR during FUSE FS mount
authorArjun Shankar <arjun@redhat.com>
Mon, 18 Aug 2025 13:33:13 +0000 (15:33 +0200)
committerArjun Shankar <arjun@redhat.com>
Tue, 19 Aug 2025 07:54:38 +0000 (09:54 +0200)
When testing with some kernel versions, support FUSE infrastructure
encounters a FUSE_GETXATTR request, leading to FUSE tests hanging until
timed out.  Therefore, pass FUSE_GETXATTR requests from
support_fuse_handle_mountpoint to support_fuse_handle_directory, and
adjust support_fuse_handle_directory to return ENOSYS so that tests can
proceed.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
support/support_fuse.c

index a70a74c8e813a83c991f478062232780542848c6..a90882e3aaf80eea0e2fe98eebc2a1de0e3bdaaf 100644 (file)
@@ -212,6 +212,9 @@ support_fuse_handle_directory (struct support_fuse *f)
         support_fuse_reply_prepared (f);
       }
       return true;
+    case FUSE_GETXATTR:
+      support_fuse_reply_error (f, ENOSYS);
+      return true;
     default:
       return false;
     }
@@ -222,7 +225,8 @@ support_fuse_handle_mountpoint (struct support_fuse *f)
 {
   TEST_VERIFY (f->inh != NULL);
   /* 1 is the root node.  */
-  if (f->inh->opcode == FUSE_GETATTR && f->inh->nodeid == 1)
+  if ((f->inh->opcode == FUSE_GETATTR || f->inh->opcode == FUSE_GETXATTR)
+      && f->inh->nodeid == 1)
     return support_fuse_handle_directory (f);
   return false;
 }