Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmilk committed Dec 14, 2024
1 parent 18a7686 commit 3a07c76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ log_must test $new_size -gt $(( floor(LARGESIZE_KB * 0.70) ))

# Expand the pool to create new unallocated metaslabs.
log_must zpool export $TESTPOOL
log_must dd if=/dev/urandom of=$LARGEFILE conv=notrunc,nocreat \
log_must dd if=/dev/urandom of=$LARGEFILE conv=notrunc \
seek=$((LARGESIZE / (1024 * 1024))) bs=$((1024 * 1024)) \
count=$((3 * LARGESIZE / (1024 * 1024)))
log_must zpool import -d $TESTDIR $TESTPOOL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function cleanup
log_onexit cleanup

LARGESIZE=$((MINVDEVSIZE * 4))
LARGESIZE_KB=$((LARGESIZE/1024))
LARGEFILE="$TESTDIR/largefile"

# Reduce trim size to allow for tighter tolerance below when checking.
Expand All @@ -67,7 +68,7 @@ while [[ "$(initialize_progress $TESTPOOL $LARGEFILE)" -lt "100" ]]; do
done

new_size=$(du -k "$LARGEFILE" | cut -f1)
log_must within_tolerance $new_size $LARGESIZE $((128 * 1024))
log_must within_tolerance $new_size $LARGESIZE_KB $((128 * 1024))

log_must zpool trim $TESTPOOL

Expand Down

0 comments on commit 3a07c76

Please sign in to comment.