forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a test for the dirty dnode SEEK_HOLE/SEEK_DATA bug described in openzfs#15526 The bug was fixed in openzfs#15571 and was backported to 2.2.2 and 2.1.14. This test case is just to make sure it does not come back. seekflood.c originally written by Rob Norris. Signed-off-by: Tony Hutter <hutter2@llnl.gov>
- Loading branch information
1 parent
6b65af1
commit d8973c3
Showing
4 changed files
with
87 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#! /bin/ksh -p | ||
# | ||
# CDDL HEADER START | ||
# | ||
# The contents of this file are subject to the terms of the | ||
# Common Development and Distribution License (the "License"). | ||
# You may not use this file except in compliance with the License. | ||
# | ||
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | ||
# or https://opensource.org/licenses/CDDL-1.0. | ||
# See the License for the specific language governing permissions | ||
# and limitations under the License. | ||
# | ||
# When distributing Covered Code, include this CDDL HEADER in each | ||
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. | ||
# If applicable, add the following below this CDDL HEADER, with the | ||
# fields enclosed by brackets "[]" replaced with your own identifying | ||
# information: Portions Copyright [yyyy] [name of copyright owner] | ||
# | ||
# CDDL HEADER END | ||
|
||
# | ||
# Copyright (c) 2023 by Lawrence Livermore National Security, LLC. | ||
# | ||
|
||
. $STF_SUITE/include/libtest.shlib | ||
|
||
# | ||
# DESCRIPTION: | ||
# This test is for the dirty dnode SEEK_HOLE/SEEK_DATA bug described in | ||
# https://github.com/openzfs/zfs/issues/15526 | ||
# | ||
# The bug was fixed in https://github.com/openzfs/zfs/pull/15571 and | ||
# was backported to 2.2.2 and 2.1.14. This test case is just to | ||
# make sure it does not come back. | ||
# | ||
# STRATEGY: | ||
# | ||
# 1. Run the 'seekflood' binary to create files with specific timing | ||
# characteristics to trigger #15526. | ||
# 2. Run seekflood multiple times as seekflood doesn't always trigger it. | ||
|
||
verify_runnable "global" | ||
|
||
function cleanup | ||
{ | ||
rm -rf /$TESTDIR/cp_stress | ||
} | ||
|
||
log_assert "Run 'seekflood' binary multiple times to try to trigger #15526" | ||
|
||
log_onexit cleanup | ||
|
||
log_must mkdir /$TESTPOOL/cp_stress | ||
|
||
MYPWD="$PWD" | ||
cd /$TESTPOOL/cp_stress | ||
CPUS=$(get_num_cpus) | ||
for i in $(seq 1 10) ; do | ||
log_must $STF_SUITE/tests/functional/cp_files/seekflood 2000 $CPUS | ||
done | ||
cd "$MYPWD" | ||
|
||
log_pass "No corruption detected" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters