Re: Test suite is now FS-dependent (Re: cryptsetup 2.0.4)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/08/18 22:40, Guilhem Moulin wrote:
> Hi,
> 
> FWIW, ‘tests/blockwise-compat’ doesn't work consistently on all file
> systems.  With
> 
>     BSIZE=$(stat -c "%o" $LOCAL_FILE)  ## 4096
> 
> `./unit-utils-io $LOCAL_FILE read_buffer $((BSIZE-1))` fails with ext4
> (on read()) and tmpfs (on open(O_DIRECT)), but succeeds with btrfs (and
> possibly other file systems).  The test-suite doesn't pass if that test
> succeeds.
> 
>     ## ext4
>     $ strace -e trace=openat,read ./unit-utils-io $LOCAL_FILE read_buffer $((BSIZE-1))
>     […]
>     openat(AT_FDCWD, "./blocwise_localfile", O_RDONLY|O_DIRECT) = 3
>     read(3, 0x55914c895000, 4095)           = -1 EINVAL (Invalid argument)
>     +++ exited with 1 +++
> 
>     ## tmpfs
>     $ strace -e trace=openat,read ./unit-utils-io $LOCAL_FILE read_buffer $((BSIZE-1))
>     […]
>     openat(AT_FDCWD, "./blocwise_localfile", O_RDONLY|O_DIRECT) = -1 EINVAL (Invalid argument)
>     Failed to open ./blocwise_localfile.
>     +++ exited with 1 +++
> 
>     ## btrfs
>     $ strace -e trace=openat,read ./unit-utils-io $LOCAL_FILE read_buffer $((BSIZE-1))
>     […]
>     openat(AT_FDCWD, "./blocwise_localfile", O_RDONLY|O_DIRECT) = 3
>     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4095) = 4095
>     +++ exited with 0 +++

Ah, btrfs. Until now it was nfs nuances that breaks everything :-)

(Direct-io should not be able to read buffer not aligned to block/page boundary,
but btrfs has apparently disagrees.)

Thanks for the report, we will fix it. Can you please send us (or create issue) report
including kernel version? (Just any cryptsetup command with --debug on the same system is ok.)

This is a new unit test, most of corner case scenarios are not used internally.
I guess it is just another special case we did not know about.

Milan
_______________________________________________
dm-crypt mailing list
dm-crypt@xxxxxxxx
https://www.saout.de/mailman/listinfo/dm-crypt




[Index of Archives]     [Device Mapper Devel]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux