Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
bbe455e
misc: fix test that fail formatting with 64k blocksize
Feb 27, 2024
d63128b
generic: add fcntl lock corner cases tests
Sep 25, 2023
f6d807f
fstests: disable generic/260 for auto for now STAGING ONLY
josefbacik Nov 22, 2021
d830078
fstests: btrfs/249: take out of auto group STAGING ONLY
josefbacik Nov 23, 2021
96bd940
fstests: udev settle before _scratch_pool_mkfs
josefbacik Dec 1, 2021
3cdcaa7
fstests: limit od to 1gib for _ddt
josefbacik Jul 8, 2023
57235a5
fstests: verity: use the correct options for btrfs-corrupt-block
josefbacik Jul 9, 2023
069fa5a
check: print elapsed time even for failed tests
kdave Sep 3, 2020
7fe40aa
Dump kmemleak report to stdout
kdave May 4, 2020
4efa8bf
generic/475: loop on umount
josefbacik Aug 2, 2023
ff3d152
fstests: add a check for the block-group-tree feature in btrfs
josefbacik Jul 10, 2023
3155730
fstests: add an EXCLUDE for excluding tests for CI
josefbacik Jul 9, 2023
7e109cc
fstests: add btrfs/287 and btrfs/291 to the exclude list
josefbacik Jul 9, 2023
62fa287
add btrfs/302 and shared/298 to EXCLUDE
josefbacik Jul 10, 2023
6522d58
add btrfs/125 to EXCLUDE
josefbacik Jul 11, 2023
b5d865c
fstest: add an EXCLUDE.arm
josefbacik Jul 13, 2023
5e30766
fstests: add generic/251 to the excludes list
josefbacik Jul 13, 2023
2b16d43
Disable generic/260 for btrfs
kdave Jul 19, 2023
2fd9815
fstests: fix EXCLUDE to be in the proper format
josefbacik Jul 21, 2023
506641b
update EXCLUDE.arm with new tests
josefbacik Jul 24, 2023
78c72c2
Exclude generic/301
josefbacik Jul 25, 2023
a3a3f3b
exclude btrfs/028 from arm
josefbacik Jul 31, 2023
a6b372a
fstests: exclude zoned failures
josefbacik Aug 10, 2023
9498981
fstests: exclude btrfs/273 from zoned
josefbacik Aug 10, 2023
556c909
fstests: add test to validate ro/rw subvol mounting
josefbacik Nov 3, 2023
e55ffd3
fstests: require no compression for generic/352
josefbacik Nov 3, 2023
262d363
fstests: don't run generic/027 if we have compression enabled
josefbacik Nov 7, 2023
5e23066
fstests: require no compression for generic/269
josefbacik Jan 11, 2024
182bd10
Add temporary excludes for CI
kdave Jan 16, 2024
c2fd787
common/rc: use proper temporary file path in $tmp
kdave Jan 17, 2024
a8503ba
fstests: exclude RAID5/6 profiles for encryption
josefbacik Jan 19, 2024
6f91a27
fstests: btrfs/023 don't run with test_dummy_encryption
josefbacik Jan 19, 2024
74a236d
fstests: btrfs/011 mkfs the scratch dev before exiting
josefbacik Jan 22, 2024
a5bd5f9
fstests: btrfs/125 disable for test_dummy_encryption
josefbacik Jan 22, 2024
8f04a7d
fstests: btrfs/041 disable with test_dummy_encryption
josefbacik Jan 22, 2024
cee5453
fstests: make read-repair tests md5sum the data
josefbacik Jan 24, 2024
a898e36
Save all dmesg by default
kdave Feb 6, 2024
c8e2f21
fstests: add btrfs-ci.config
josefbacik Feb 6, 2024
f8478a9
CI: add result collection scripts
kdave Feb 15, 2024
18d9dca
generic/733: disable for btrfs
kdave Feb 22, 2024
da3875b
btrfs/510: test qgroup deletion
boryas Jan 23, 2024
11a215c
CI: dump dmesg and check log on error to the test output
kdave Feb 22, 2024
ba3bf8b
CI: update btrfs-ci.config for the extra disks
josefbacik Feb 28, 2024
743fb9d
CI: add a RST and squota variant for the CI
josefbacik Feb 28, 2024
78a538e
CI: add subpage options to btrfs-ci.config
josefbacik Feb 28, 2024
7e6d7d6
generic/808: add a regression test for fiemap into an mmap range
josefbacik Feb 12, 2024
126133b
btrfs/320: skip -O squota runs
boryas Mar 13, 2024
ae61f38
=== Local fixups ===
kdave Mar 1, 2024
c584c48
generic/571: require reachable localhost
kdave Sep 11, 2020
6cca30e
Disable generic/260 for btrfs
kdave Sep 3, 2020
94eef0a
Add support for external test scripts
kdave Aug 30, 2013
c5ecbfe
Disable generic/589
kdave Jul 23, 2021
134f48f
generic/260: fix unary operator error when run tests
Mar 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions EXCLUDE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
btrfs/125
btrfs/282
btrfs/287
btrfs/290
btrfs/291
generic/251
generic/260
# Sometimes the fragment count is too high? Usually with compression
generic/301
generic/302
shared/298
# Temporary for CI
# normal, block_group_tree, for-next, EUCLEAN
##check if still needed
##btrfs/330
# test-zoned, for-next, something found in dmesg
generic/476
# test-zoned, for-next, mount: /mnt/scratch: can't read superblock on /dev/mapper/flakey-test
# mtime not preserved, expected: 1705082371 got: 1704844056
# ctime not preserved, expected: 1705082371 got: 1704844056
btrfs/236
8 changes: 8 additions & 0 deletions EXCLUDE.arm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Sometimes qgroups fail with wrong accounting during check
btrfs/028
# Inconsistent timing
btrfs/049
# Numbers don't match up
generic/563
# Takes too long
generic/619
14 changes: 14 additions & 0 deletions EXCLUDE.zoned
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This fails because of discard=async, test needs to be updated
btrfs/220
# This seems like a real failure, needs to be looked into
btrfs/237
# This also seems like a real failure, needs to be looked into
btrfs/239
# This appears to be flakey
btrfs/273
# IDK, seems like erorr stuff doesn't work right with zoned?
btrfs/295
# Short reads? Seems like a real failure
generic/551
# Another one in the same vein
generic/574
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0+
# Copyright (C) 2000-2008, 2011 SGI All Rights Reserved.
#
##
ifeq ("$(origin V)", "command line")
BUILD_VERBOSE = $(V)
endif
Expand Down
82 changes: 82 additions & 0 deletions btrfs-ci.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[btrfs_normal]
TEST_DIR=/mnt/test
TEST_DEV=/dev/vdb
SCRATCH_DEV_POOL="/dev/vdc /dev/vdd /dev/vde /dev/vdg /dev/vdh /dev/vdi /dev/vdj /dev/vdk"
SCRATCH_MNT=/mnt/scratch
LOGWRITES_DEV=/dev/vdl
MKFS_OPTIONS="-K"

[btrfs_compress]
TEST_DIR=/mnt/test
TEST_DEV=/dev/vdb
SCRATCH_DEV_POOL="/dev/vdc /dev/vdd /dev/vde /dev/vdg /dev/vdh /dev/vdi /dev/vdj /dev/vdk"
SCRATCH_MNT=/mnt/scratch
LOGWRITES_DEV=/dev/vdl
MKFS_OPTIONS="-K"
MOUNT_OPTIONS="-o compress"
RECREATE_TEST_DEV=true

[btrfs_holes_spacecache]
TEST_DIR=/mnt/test
TEST_DEV=/dev/vdb
SCRATCH_DEV_POOL="/dev/vdc /dev/vdd /dev/vde /dev/vdg /dev/vdh /dev/vdi /dev/vdj /dev/vdk"
SCRATCH_MNT=/mnt/scratch
LOGWRITES_DEV=/dev/vdl
MKFS_OPTIONS="-K -O ^no-holes,^free-space-tree"
RECREATE_TEST_DEV=true

[btrfs_holes_spacecache_compress]
TEST_DIR=/mnt/test
TEST_DEV=/dev/vdb
SCRATCH_DEV_POOL="/dev/vdc /dev/vdd /dev/vde /dev/vdg /dev/vdh /dev/vdi /dev/vdj /dev/vdk"
SCRATCH_MNT=/mnt/scratch
LOGWRITES_DEV=/dev/vdl
MKFS_OPTIONS="-K -O ^no-holes,^free-space-tree"
MOUNT_OPTIONS="-o compress"
RECREATE_TEST_DEV=true

[btrfs_block_group_tree]
TEST_DIR=/mnt/test
TEST_DEV=/dev/vdb
SCRATCH_DEV_POOL="/dev/vdc /dev/vdd /dev/vde /dev/vdg /dev/vdh /dev/vdi /dev/vdj /dev/vdk"
SCRATCH_MNT=/mnt/scratch
LOGWRITES_DEV=/dev/vdl
MKFS_OPTIONS="-K -O block-group-tree"
RECREATE_TEST_DEV=true

[btrfs_raid_stripe_tree]
TEST_DIR=/mnt/test
TEST_DEV=/dev/vdb
SCRATCH_DEV_POOL="/dev/vdc /dev/vdd /dev/vde /dev/vdg /dev/vdh /dev/vdi /dev/vdj /dev/vdk"
SCRATCH_MNT=/mnt/scratch
LOGWRITES_DEV=/dev/vdl
MKFS_OPTIONS="-K -O raid-stripe-tree"
RECREATE_TEST_DEV=true

[btrfs_squota]
TEST_DIR=/mnt/test
TEST_DEV=/dev/vdb
SCRATCH_DEV_POOL="/dev/vdc /dev/vdd /dev/vde /dev/vdg /dev/vdh /dev/vdi /dev/vdj /dev/vdk"
SCRATCH_MNT=/mnt/scratch
LOGWRITES_DEV=/dev/vdl
MKFS_OPTIONS="-K -O squota"
RECREATE_TEST_DEV=true

[btrfs_subpage_normal]
TEST_DIR=/mnt/test
TEST_DEV=/dev/vdb
SCRATCH_DEV_POOL="/dev/vdc /dev/vdd /dev/vde /dev/vdg /dev/vdh /dev/vdi /dev/vdj /dev/vdk"
SCRATCH_MNT=/mnt/scratch
LOGWRITES_DEV=/dev/vdl
MKFS_OPTIONS="-K -n 4k -s 4k"
RECREATE_TEST_DEV=true

[btrfs_subpage_compress]
TEST_DIR=/mnt/test
TEST_DEV=/dev/vdb
SCRATCH_DEV_POOL="/dev/vdc /dev/vdd /dev/vde /dev/vdg /dev/vdh /dev/vdi /dev/vdj /dev/vdk"
SCRATCH_MNT=/mnt/scratch
LOGWRITES_DEV=/dev/vdl
MKFS_OPTIONS="-K -n 4k -s 4k"
MOUNT_OPTIONS="-o compress"
RECREATE_TEST_DEV=true
18 changes: 17 additions & 1 deletion check
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ iterations=1
istop=false
loop_on_fail=0
exclude_tests=()
EXTERNAL_SCRIPTS=()

# This is a global variable used to pass test failure text to reporting gunk
_err_msg=""
Expand Down Expand Up @@ -83,6 +84,7 @@ check options
-s section run only specified section from config file
-S section exclude the specified section from the config file
-L <n> loop tests <n> times following a failure, measuring aggregate pass/fail metrics
--external FILE use external testscript FILE, can be specified multiple times

testlist options
-g group[,group...] include tests from these groups
Expand Down Expand Up @@ -342,6 +344,16 @@ while [ $# -gt 0 ]; do
loop_on_fail=$2; shift
;;

--external)
xfile="$2"; shift;
if ! [ -f "$xfile" ]; then
echo "External script $xfile is not a file"
exit 1
fi
echo "Adding external script $xfile"
EXTERNAL_SCRIPTS+=("$xfile")
;;

-*) usage ;;
*) # not an argument, we've got tests now.
have_test_arg=true ;;
Expand Down Expand Up @@ -385,6 +397,10 @@ if [ -n "$subdir_xfile" ]; then
done
fi

for ext in ${EXTERNAL_SCRIPTS[*]}; do
echo "$ext" >> $tmp.list
done

# Process tests from command line now.
if $have_test_arg; then
while [ $# -gt 0 ]; do
Expand Down Expand Up @@ -1055,7 +1071,7 @@ function run_section()
fi
echo ""
else
_dump_err "- output mismatch (see $seqres.out.bad)"
_dump_err "`expr $stop - $start`s - output mismatch (see $seqres.out.bad)"
mv $tmp.out $seqres.out.bad
$diff $seq.out $seqres.out.bad | {
if test "$DIFF_LENGTH" -le 0; then
Expand Down
35 changes: 35 additions & 0 deletions collect-notrun-to-summary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh

if [ -z "$1" ]; then
echo "ERROR: $0 path-to-fstests [config_name]"
exit 1
fi

here="$1"
tdir="$here/tests"
rdir="$here/results"
config=

if [ -n "$2" ]; then
config="$2"
fi

cdir="$rdir/$config"

if ! [ -d "$cdir" ]; then
echo "ERROR: config dir $cdir doe not exist"
exit 1
fi

echo "<details><summary>Tests not run</summary>"
echo
echo '```'

find "$cdir" -type f -name '*.notrun' -exec cat '{}' \; |
sort |
uniq -c |
sort -rn

echo '```'
echo
echo "</details>"
66 changes: 66 additions & 0 deletions collect-results-to-summary.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/sh -x

if [ -z "$1" ]; then
echo "ERROR: $0 path-to-fstests [config_name]"
exit 1
fi

here="$1"
tdir="$here/tests"
rdir="$here/results"

config=

if [ -n "$2" ]; then
config="$2"
fi

cdir="$rdir/$config"

if ! [ -d "$cdir" ]; then
echo "ERROR: config dir $cdir doe not exist"
exit 1
fi

for bad in $(find "results/$config" -type f -name '*.bad'); do
echo "::notice::$bad"
pbad=${bad#results/$config/}
pbase=${pbad%.bad}
pname=${pbase%.out}
echo "<details><summary>Test: $pname DIFF</summary>"
echo

dmesg="$cdir/${pname}.dmesg"
if [ -f "$dmesg" ]; then
echo "<details><summary>Test: $pname DMESG</summary>"
echo
echo '```'
cat "$dmesg"
echo '```'
echo
echo "</details>"
echo
fi

full="$cdir/${pname}.full"
if [ -f "$full" ]; then
echo "<details><summary>Test: $pname FULL</summary>"
echo
echo '```'
cat "$full"
echo '```'
echo
echo "</details>"
echo
fi

# Diff
echo '```'
tst="$tdir/$pbase"
diff -u "$tst" "$bad"
echo '```'
echo

echo "</details>"
exit
done
28 changes: 28 additions & 0 deletions common/btrfs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ _require_btrfs_free_space_tree()
fi
}

_require_btrfs_no_block_group_tree()
{
_scratch_mkfs > /dev/null 2>&1
if $BTRFS_UTIL_PROG inspect-internal dump-super $SCRATCH_DEV | \
grep -q "BLOCK_GROUP_TREE"
then
_notrun "This test requires no block-group-tree"
fi
}

_check_btrfs_filesystem()
{
device=$1
Expand All @@ -168,6 +178,11 @@ _check_btrfs_filesystem()
echo "*** qgroup_report.$FSTYP output ***" >>$seqres.full
cat $tmp.qgroup_report >>$seqres.full
echo "*** qgroup_report.$FSTYP output ***" >>$seqres.full

_ci_warning "filesystem on $device has wrong qgroup numbers"
_ci_group "qgroup report"
_in_ci && cat $tmp.qgroup_report
_ci_group
fi
rm -f $tmp.qgroup_report
fi
Expand All @@ -179,6 +194,11 @@ _check_btrfs_filesystem()
cat $tmp.fsck >>$seqres.full
echo "*** end fsck.$FSTYP output" >>$seqres.full

_ci_warning "filesystem on $device is inconsistent"
_ci_group "fsck output"
_in_ci && cat $tmp.fsck
_ci_group

ok=0
fi
rm -f $tmp.fsck
Expand Down Expand Up @@ -248,6 +268,14 @@ _btrfs_get_profile_configs()
)
fi

if _normalize_mount_options "$MOUNT_OPTIONS" | grep -q "test_dummy_encryption"; then
# Encryption and RAID56 is unsupported currently
unsupported+=(
"raid5"
"raid6"
)
fi

if _scratch_btrfs_is_zoned; then
# Zoned btrfs only supports SINGLE profile
unsupported+=(
Expand Down
3 changes: 3 additions & 0 deletions common/config
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ export LOAD_FACTOR=${LOAD_FACTOR:=1}
export SOAK_DURATION=${SOAK_DURATION:=}
export DEBUGFS_MNT=${DEBUGFS_MNT:="/sys/kernel/debug"}

# We want to keep all messages
export KEEP_DMESG=${KEEP_DMESG:-yes}

# some constants for overlayfs setup
export OVL_UPPER="ovl-upper"
export OVL_LOWER="ovl-lower"
Expand Down
Loading