Bug 196893

Summary: Some regression tests fail
Product: File System Reporter: Bruce Dubbs (bruce.dubbs)
Component: btrfsAssignee: Josef Bacik (josef)
Status: RESOLVED CODE_FIX    
Severity: normal CC: dsterba, lakshmipathi.g
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: btrfs-progs-v4.13 Subsystem:
Regression: No Bisected commit-id:

Description Bruce Dubbs 2017-09-10 20:05:25 UTC
[TEST/cli]   007-check-force
ASSERTION FAIL: 1st argument of run_mustfail must be a message
test failed for case 007-check-force

Additionally, when this test fails, it does not umount /tmp/btrfs/btrfs-progs-v4.13/tests/mnt
-------

failed: setfacl -m u:root:x /tmp/btrfs/btrfs-progs-v4.13/tests/mnt/acls/acls.1
test failed for case 010-reiserfs-basic

I *do* have CONFIG_BTRFS_FS_POSIX_ACL=y set in the kernel, but CONFIG_REISERFS_FS_XATTR is *not* set.  Perhaps this test could just send a message instead of having the entire test fail and stop.

Same failure for 011-reiserfs-delete-all-rollback.  

I suggest putting reiser tests in a separate test-reiser script.

-------

It is very difficult to get through all tests is they don't all pass.  
I suggest a way to skip the 'exit 1' tests/common file.  For our purposes, I have done:

sed -i '\texit/s/^/#/' tests/common file

-------

fuzz tests 003-multi-check-unmounted and 009-simple-zero-log tests still fail for me.   

For both checks, I get output like:

/tmp/btrfs/btrfs-progs-v4.13/tests/common: line 170: 26426 Aborted                 $INSTRUMENT "$@" >> "$RESULTS" 2>&1

Looking specifically at 003-multi-check-unmounted. The first entry is:

=== Entering /tmp/btrfs/btrfs-progs-v4.13/tests/fuzz-tests/003-multi-check-unmounted
############### /tmp/btrfs/btrfs-progs-v4.13/btrfs check -s 1 /tmp/btrfs/btrfs-progs-v4.13/tests/fuzz-tests/images/bad-superblock-1.raw.restored
ERROR: superblock checksum mismatch
ERROR: superblock bytenr 67108864 is larger than device size 413696
ERROR: cannot open file system
using SB copy 1, bytenr 67108864
failed (ignored, ret=1): /tmp/btrfs/btrfs-progs-v4.13/btrfs check -s 1 /tmp/btrfs/btrfs-progs-v4.13/tests/fuzz-tests/images/bad-superblock-1.raw.restored
Comment 1 David Sterba 2017-09-11 14:29:07 UTC
Hm, all the tests passed for me before the release.

* the run_mustfail fix should be straightforward
* yeah the reiser/xattr test should detect the support and skip the test -- this should be the default behaviour for missing builtin features
* the fuzz tests are known to be broken, a few more fixes land on each release but usually accompanied by wider cleanups as he fuzzing tends to hit some corner cases deep i the callchains

The overall test mode is "all must pass", so when a failure occurs, the tests stop and the developer is supposed to resolve the problem. The exact test environment is left intact, which also means the devices are left mounted, etc. 

There are no reliabe generic steps to clean up after the failed (any number of loop devices have been created, dmsetup has been called, etc), so the "first failure stops the testsuite" is the mode of operation.

We can extend the testing framework with the cleanup phase, I'll put that into todo.
Comment 2 David Sterba 2017-09-11 15:41:40 UTC
Does the reiserfs mount with these options "acl,user_xattr,attrs" ? I'd expect the mount fails and this should be sufficient to detect the xattr/acl support, but you report that it was the 'setfacl' that failed.
Comment 3 Bruce Dubbs 2017-09-11 21:24:06 UTC
(In reply to David Sterba from comment #2)
> Does the reiserfs mount with these options "acl,user_xattr,attrs" ? I'd
> expect the mount fails and this should be sufficient to detect the xattr/acl
> support, but you report that it was the 'setfacl' that failed.

The 'mount' works, but the user_xattr and acl options seem to be silently ignored.

$ sudo mount -o acl,user_xattr,attrs /dev/sdc2 /media
$ findmnt|grep media
/media     /dev/sdc2      reiserf rw,relatime,attrs

But setfacl fails.  I get the following:

$sudo setfacl -m u:bdubbs:r /media/abc
setfacl: /media/abc: Operation not supported

  -- Bruce