Skip to content

Commit 0cb61aa

Browse files
committed
add launch-by-daemon test
1 parent c086060 commit 0cb61aa

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

regtest.sh

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,6 @@ echo "running YAML parser unit test"
178178
$PYTHON yaml_parser.py
179179
assertok $?
180180

181-
# now remove unittest python module, smallfile_cli.py should still run
182-
183-
sudo yum remove -y python-unittest2 || sudo yum remove -y python-unittest
184-
assertok $?
185-
186-
# test simplest smallfile_cli commands, using non-default dirs
187-
188181
echo "simplest smallfile_cli.py commands"
189182

190183
scmd="$PYTHON smallfile_cli.py "
@@ -448,6 +441,33 @@ for op in `supported_ops $xattrs ''` ; do
448441
run_one_cmd "$common_params --operation $op"
449442
done
450443

444+
echo "******** simulating distributed operations with launch-by-daemon" | tee -a $f
445+
446+
cleanup
447+
rm -fv $testdir/shutdown_launchers.tmp
448+
python launch_smf_host.py --top $testdir --as-host foo &
449+
worker_pids="$!"
450+
python launch_smf_host.py --top $testdir --as-host bar &
451+
worker_pids="$worker_pids $!"
452+
sleep 2
453+
daemon_params=\
454+
"$PYTHON smallfile_cli.py --launch-by-daemon Y --host-set foo,bar --top $testdir \
455+
--verify-read Y --response-times N --remote-pgm-dir `pwd` \
456+
--files 1000 --files-per-dir 5 --dirs-per-dir 2 --threads 4 --file-size 4"
457+
458+
for op in `supported_ops $xattrs ''` ; do
459+
echo
460+
echo "testing local op $op"
461+
run_one_cmd "$daemon_params --operation $op"
462+
done
463+
touch $testdir/network_shared/shutdown_launchers.tmp
464+
echo "waiting for launcher daemons to shut down..."
465+
for p in $worker_pids ; do
466+
wait $p || exit $NOTOK
467+
done
468+
echo "launchers shut down"
469+
rm -fv $testdir/network_shared/shutdown_launchers.tmp
470+
451471
# we do these kinds of tests to support non-distributed filesystems and NFS exports of them
452472

453473
echo "******** testing non-distributed ops with multiple top-level directories" | tee -a $f

0 commit comments

Comments
 (0)