tools/create_btrfs_image.sh: fix up and re-run

The previous commit did not get all intended changes.

Follow up to 2066
This commit is contained in:
Dmitry Vyukov 2020-09-14 11:03:13 +02:00
parent fcf44ed305
commit dfb4c36914
81 changed files with 232 additions and 54 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,10 +2,14 @@
# Copyright 2020 syzkaller project authors. All rights reserved. # Copyright 2020 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
# This script generates sys/linux/test/syz_mount_image_btrfs_* files.
set -eu
# Currently disabled # Currently disabled
# declare -a Op1=("-d raid0 " "-d raid1 " "-d raid5 " "-d raid6 " "-d raid10 " "-d single " "-d dup ") # declare -a Op1=("-d raid0 " "-d raid1 " "-d raid5 " "-d raid6 " "-d raid10 " "-d single " "-d dup ")
declare -a Op1=("-M " "") declare -a Op1=("-M " "")
declare -a Op2=("-O mixed-bg " "-O extref " "-O raid56 " "-O no-holes " "-O raid1c34 ") declare -a Op2=("-O mixed-bg --nodesize 4096 " "-O extref " "-O raid56 " "-O no-holes " "-O raid1c34 ")
declare -a Op3=("-K " "") declare -a Op3=("-K " "")
declare -a Op4=("--csum crc32c " "--csum xxhash " "--csum sha256 " "--csum blake2 ") declare -a Op4=("--csum crc32c " "--csum xxhash " "--csum sha256 " "--csum blake2 ")
declare -i dex=0 declare -i dex=0
@ -14,17 +18,31 @@ dir=`dirname $0`
echo $dir echo $dir
for op1 in "${Op1[@]}"; do for op1 in "${Op1[@]}"; do
for op2 in "${Op2[@]}"; do for op2 in "${Op2[@]}"; do
for op3 in "${Op3[@]}"; do for op3 in "${Op3[@]}"; do
for op4 in "${Op4[@]}"; do for op4 in "${Op4[@]}"; do
echo mkfs.btrfs ${op1}${op2}${op3}${op4} disk.raw for size in 16M 32M 64M 128M; do
fallocate -l 128M disk.raw echo mkfs.btrfs ${op1}${op2}${op3}${op4} disk.raw ${size}
mkfs.btrfs ${op1}${op2}${op3}${op4} disk.raw rm -f disk.raw
go run "$dir/syz-imagegen/imagegen.go" -image=./disk.raw -fs=btrfs > "$dir/../sys/linux/test/syz_image_mount_btrfs_$dex" fallocate -l ${size} disk.raw
rm disk.raw err=""
dex=dex+1 mkfs.btrfs ${op1}${op2}${op3}${op4} disk.raw >/dev/null || err="1"
done if [ "$err" != "" ]; then
done if [ "$size" == "128M" ]; then
done exit 1
fi
continue
fi
out="$dir/../sys/linux/test/syz_mount_image_btrfs_$dex"
echo "# Code generated by tools/create_f2fs_image.sh. DO NOT EDIT." > $out
echo "# requires: manual" >> $out
echo >> $out
go run "$dir/syz-imagegen/imagegen.go" -image=./disk.raw -fs=btrfs >> $out
dex=dex+1
break
done
done
done
done
done done
rm -f disk.raw