linux/tools/testing/selftests/rcutorture/bin/jitterstop.sh
Paul E. McKenney 040accb3cd torture: Abstract jitter.sh start/stop into scripts
This commit creates jitterstart.sh and jitterstop.sh scripts that handle
the starting and stopping of the jitter.sh scripts.  These must be sourced
using the bash "." command to allow the generated script to wait on the
backgrounded jitter.sh scripts.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
2021-03-22 08:28:34 -07:00

24 lines
520 B
Bash

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0+
#
# Remove the "jittering" file, signaling the jitter.sh scripts to stop,
# then wait for them to terminate.
#
# Usage: . jitterstop.sh jittering-dir
#
# jittering-dir: Directory containing "jittering" file.
#
# Copyright (C) 2021 Facebook, Inc.
#
# Authors: Paul E. McKenney <paulmck@kernel.org>
jittering_dir=$1
if test -z "$jittering_dir"
then
echo jitterstop.sh: Missing directory in which to place jittering file.
exit 34
fi
rm -f ${jittering_dir}/jittering
wait