mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
ZTS: Update zfs_share_concurrent_shares.ksh
Occasionally an out of memory error is hit by this test case when mounting the filesystems. Try and reduce the likelihood of this occurring by reducing the thread count from 100 to 50. It also has the advantage of slightly speeding up the test. cannot mount 'testpool/testfs3/79': Cannot allocate memory filesystem successfully created, but not mounted Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #11283
This commit is contained in:
parent
d1d47691c2
commit
81638c999d
@ -29,7 +29,7 @@
|
|||||||
#
|
#
|
||||||
# DESCRIPTION:
|
# DESCRIPTION:
|
||||||
# Verify that 'zfs set sharenfs=on', 'zfs share', and 'zfs unshare' can
|
# Verify that 'zfs set sharenfs=on', 'zfs share', and 'zfs unshare' can
|
||||||
# run concurrently. The test creates 300 filesystem and 300 threads.
|
# run concurrently. The test creates 50 filesystem and 50 threads.
|
||||||
# Each thread will run through the test strategy in parallel.
|
# Each thread will run through the test strategy in parallel.
|
||||||
#
|
#
|
||||||
# STRATEGY:
|
# STRATEGY:
|
||||||
@ -47,7 +47,7 @@ verify_runnable "global"
|
|||||||
function cleanup
|
function cleanup
|
||||||
{
|
{
|
||||||
wait
|
wait
|
||||||
for fs in $(seq 0 100)
|
for fs in $(seq 0 50)
|
||||||
do
|
do
|
||||||
log_must zfs set sharenfs=off $TESTPOOL/$TESTFS1/$fs
|
log_must zfs set sharenfs=off $TESTPOOL/$TESTFS1/$fs
|
||||||
log_must zfs set sharenfs=off $TESTPOOL/$TESTFS2/$fs
|
log_must zfs set sharenfs=off $TESTPOOL/$TESTFS2/$fs
|
||||||
@ -79,7 +79,7 @@ function cleanup
|
|||||||
|
|
||||||
function create_filesystems
|
function create_filesystems
|
||||||
{
|
{
|
||||||
for fs in $(seq 0 100)
|
for fs in $(seq 0 50)
|
||||||
do
|
do
|
||||||
log_must zfs create -p $TESTPOOL/$TESTFS1/$fs
|
log_must zfs create -p $TESTPOOL/$TESTFS1/$fs
|
||||||
log_must zfs create -p $TESTPOOL/$TESTFS2/$fs
|
log_must zfs create -p $TESTPOOL/$TESTFS2/$fs
|
||||||
@ -137,7 +137,7 @@ log_onexit cleanup
|
|||||||
create_filesystems
|
create_filesystems
|
||||||
|
|
||||||
child_pids=()
|
child_pids=()
|
||||||
for fs in $(seq 0 100)
|
for fs in $(seq 0 50)
|
||||||
do
|
do
|
||||||
test_share $TESTPOOL/$TESTFS1/$fs &
|
test_share $TESTPOOL/$TESTFS1/$fs &
|
||||||
child_pids+=($!)
|
child_pids+=($!)
|
||||||
@ -158,7 +158,7 @@ log_note "Verify 'zfs share -a' succeeds."
|
|||||||
# Unshare each of the file systems.
|
# Unshare each of the file systems.
|
||||||
#
|
#
|
||||||
child_pids=()
|
child_pids=()
|
||||||
for fs in $(seq 0 100)
|
for fs in $(seq 0 50)
|
||||||
do
|
do
|
||||||
unshare_fs $TESTPOOL/$TESTFS1/$fs &
|
unshare_fs $TESTPOOL/$TESTFS1/$fs &
|
||||||
child_pids+=($!)
|
child_pids+=($!)
|
||||||
@ -181,7 +181,7 @@ log_must zfs share -a
|
|||||||
#
|
#
|
||||||
unset __ZFS_POOL_EXCLUDE
|
unset __ZFS_POOL_EXCLUDE
|
||||||
|
|
||||||
for fs in $(seq 0 100)
|
for fs in $(seq 0 50)
|
||||||
do
|
do
|
||||||
is_shared $TESTPOOL/$TESTFS1/$fs || \
|
is_shared $TESTPOOL/$TESTFS1/$fs || \
|
||||||
log_fail "File system $TESTPOOL/$TESTFS1/$fs is not shared"
|
log_fail "File system $TESTPOOL/$TESTFS1/$fs is not shared"
|
||||||
|
Loading…
Reference in New Issue
Block a user