btrfs-progs/tests/misc-tests
David Sterba dca6b12f0a btrfs-progs: fix read-write subvol and received_uuid flags check
There's a report that a read-only subvolume with a received_uuid set
emits the warning in command 'btrfs subvolume show', which is obviously
wrong.

The reason is that there are different types of root item flags,
depending on how we read them. The check in cmd_subvol_show uses the
ioctl GET_SUBVOL_INFO and the appropriate flag is raw
BTRFS_ROOT_SUBVOL_RDONLY (0x1), while there's another SUBVOL_GETFLAGS that
maps the flags and the raw value is different (BTRFS_SUBVOL_RDONLY, 0x2).

Due to this the warning was issued. Fix that by using the right flag
constant. The test has been extended to check for all combinations of
read-write and received_uuid.

Issue: #419
Signed-off-by: David Sterba <dsterba@suse.com>
2021-11-04 20:56:42 +01:00
..
001-btrfstune-features btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
002-uuid-rewrite btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
003-zero-log btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
004-shrink-fs btrfs-progs: tests: filter output for run_check_stdout 2020-05-04 20:48:42 +02:00
005-convert-progress-thread-crash btrfs-progs: tests: switch messages to _log 2019-07-26 17:46:42 +02:00
006-image-on-missing-device btrfs-progs: tests: fix typos in test comments 2018-11-26 17:53:43 +01:00
007-subvolume-sync btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
008-leaf-crossing-stripes btrfs-progs: tests: add shell quotes to misc test scripts 2018-03-30 22:15:55 +02:00
009-subvolume-sync-must-wait btrfs-progs: tests: filter output for run_check_stdout 2020-05-04 20:48:42 +02:00
010-convert-delete-ext2-subvol btrfs-progs: tests: add shell quotes to misc test scripts 2018-03-30 22:15:55 +02:00
011-delete-missing-device btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
012-find-root-no-result btrfs-progs: tests: misc: find-root and select-super are internal commands 2020-03-03 19:58:55 +01:00
013-subvolume-sync-crash btrfs-progs: tests: filter output for run_check_stdout 2020-05-04 20:48:42 +02:00
014-filesystem-label btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
015-dump-super-garbage btrfs-progs: tests: add shell quotes to misc test scripts 2018-03-30 22:15:55 +02:00
016-send-clone-src btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
017-recv-stream-malformatted btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
018-recv-end-of-stream btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
019-receive-clones-on-mounted-subvol btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
020-fix-superblock-corruption btrfs-progs: tests: misc: find-root and select-super are internal commands 2020-03-03 19:58:55 +01:00
021-image-multi-devices btrfs-progs: tests: fix misc/021 when restoring overlapping stale data 2019-10-14 17:28:02 +02:00
022-filesystem-du-on-empty-subvol btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
023-device-usage-with-missing-device btrfs-progs: tests: add shell quotes to misc test scripts 2018-03-30 22:15:55 +02:00
024-inspect-internal-rootid btrfs-progs: tests: filter output for run_check_stdout 2020-05-04 20:48:42 +02:00
025-zstd-compression btrfs-progs: tests: switch mktemp to local helpers 2021-10-20 18:59:24 +02:00
026-image-non-printable-chars btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
027-subvol-list-deleted-toplevel btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
028-superblock-recover btrfs-progs: tests: drop keyword function 2019-07-04 15:36:01 +02:00
029-send-p-different-mountpoints btrfs-progs: misc-tests/029: exit manually after run_mayfail() 2019-07-03 20:49:04 +02:00
030-missing-device-image btrfs-progs: tests: Test if btrfs-image can handle RAID1 missing device 2018-03-30 22:15:55 +02:00
031-qgroup-parent-child-relation btrfs-progs: tests: filter output for run_check_stdout 2020-05-04 20:48:42 +02:00
032-bad-item-ptr btrfs-progs: tests: Add test case for dump-tree on heavily corrupted leaf 2018-06-07 16:37:32 +02:00
033-filename-length-limit btrfs-progs: switch to mkfs helper 2019-06-05 20:27:32 +02:00
034-metadata-uuid btrfs-progs: lots of typo fixes (codespell) 2020-03-31 18:37:38 +02:00
035-receive-common-mount-point-prefix btrfs-progs: tests: disable misc-tests/035-receive-common-mount-point-prefix 2019-05-17 13:02:22 +02:00
036-receive-dump-invalid-stream btrfs-progs: tests: stream dump and max_error counts 2019-05-17 12:32:38 +02:00
037-fi-show-on-new-file btrfs-progs: tests: unify mktemp file name pattern 2021-10-20 18:59:24 +02:00
038-backup-root-corruption btrfs-progs: tests: make misc/038 more robust when searching backup slots 2021-10-20 18:59:24 +02:00
039-receive-clone-from-current-subvolume btrfs-progs: misc-tests/039: cleanup test 2020-03-31 18:37:36 +02:00
040-subvolume-delete-default btrfs-progs: tests: add case for deleting default subvolume 2020-10-02 20:12:08 +02:00
041-subvolume-delete-during-send btrfs-progs: tests: add case for send vs subvolume deletion 2020-10-02 20:12:08 +02:00
042-inspect-internal-logical-resolve btrfs-progs: tests: test logical-resolve in various scenarios 2021-01-18 17:49:22 +01:00
043-subvolume-set-default-toplevel btrfs-progs: tests: set toplevel subvolume as default when specified as 0 2021-01-18 17:49:23 +01:00
045-receive-check-mount-type btrfs-progs: receive: fix btrfs_mount_root substring bug 2021-02-19 16:29:40 +01:00
046-seed-multi-mount btrfs-progs: tests: fix quoting of sudo helper in misc/046-seed-multi-mount 2021-03-15 15:40:54 +01:00
047-raid5-convert btrfs-progs: balance: fix raid56 warning for other profiles 2021-03-23 17:04:22 +01:00
048-image-restore-mount btrfs-progs: tests: switch mktemp to local helpers 2021-10-20 18:59:24 +02:00
049-btrfstune-transid-mismatch btrfs-progs: tests: test case to make sure btrfstune rejects corrupted fs 2021-09-20 12:26:20 +02:00
050-receive-prop-ro-to-rw btrfs-progs: tests: subvolume ro->rw switch and received_uuid 2021-10-07 18:40:29 +02:00
051-warning-rw-subvol-received-uuid btrfs-progs: fix read-write subvol and received_uuid flags check 2021-11-04 20:56:42 +01:00