Skip to content

Commit

Permalink
btrfs-fuse: tests: do not test raid10 with two missing/corrupted devices
Browse files Browse the repository at this point in the history
Although 4 devices RAID10 can support two missing/corrupted devices, it
requires all the missing/corrupted devices to be inside different mirror
groups, which is mkfs and runtime dependent.

Just change it to test one missing/corrupted device.

Signed-off-by: Qu Wenruo <[email protected]>
  • Loading branch information
adam900710 committed Nov 4, 2024
1 parent 1a6fe30 commit dd2a008
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ test_raid10()
"$fssum" -r "$tmp.fssum_kernel" "$mnt" >> "$log" || fail "fssum verification failed"
fusermount -u "$mnt" || fail "fuse unmount failed"

# The missing/corrupted devices can not be in the same group
echo "=== test raid10 with two missing devs ===" | tee -a "$log"
"$fuse" "${devs[0]}" "${devs[2]}" "$mnt" >> "$log" || fail "fuse mount failed"
# In theory we can handle two missing devices in different sub groups,
# but that requires very strict device rotation during mkfs.
echo "=== test raid10 with one missing devs ===" | tee -a "$log"
"$fuse" "${devs[0]}" "${devs[1]}" "${devs[3]}" "$mnt" >> "$log" || fail "fuse mount failed"
"$fssum" -r "$tmp.fssum_kernel" "$mnt" >> "$log" || fail "fssum verification failed"
fusermount -u "$mnt" || fail "fuse unmount failed"

echo "=== test raid10 with two corrupted dev ===" | tee -a "$log"
echo "=== test raid10 with one corrupted dev ===" | tee -a "$log"
"$corrupt" "${devs[0]}" >> "$log" || fail "file corruption failed"
"$corrupt" "${devs[2]}" >> "$log" || fail "file corruption failed"
"$fuse" "${devs[0]}" "${devs[1]}" "${devs[2]}" "${devs[3]}" "$mnt" ||\
fail "fuse mount failed"
"$fssum" -r "$tmp.fssum_kernel" "$mnt" >> "$log" || fail "fssum verification failed"
Expand Down

0 comments on commit dd2a008

Please sign in to comment.