[PATCH] Linux: Add test case for bug 33245

Florian Weimer fweimer@redhat.com
Mon Aug 4 08:27:01 GMT 2025


* Collin Funk:

> Florian Weimer <fweimer@redhat.com> writes:
>
>> +  ssize_t copied = copy_file_range (source_fd, NULL, dest_fd, NULL, size, 0);
>> +  /* Avoid FAIL_UNSUPPORTED if it is likely bogus due to previous
>> +     copy_file_range successes.  */
>> +  if (copied == -1 && errno == ENOSYS)
>> +    {
>> +      /* Unmounting avoids a test hang on exit.  */
>> +      xclose (dest_fd);
>> +      xclose (source_fd);
>> +      support_fuse_unmount (f);
>> +      FAIL_UNSUPPORTED ("copy_file_range not supported");
>> +    }
>
> Thanks for the fix and for remembering about the Hurd stub. :)

This test is specific to Linux, though.  But copy_file_range is
relatively recent, so we can't assume support (in general, and in FUSE).

Thanks,
Florian



More information about the Libc-alpha mailing list