Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / tools / testing / selftests / rcutorture / bin / kvm-remote-noreap.sh
blob014ce68260d7844b26543e5536e2f875427c561a
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0+
4 # Periodically scan a directory tree to prevent files from being reaped
5 # by systemd and friends on long runs.
7 # Usage: kvm-remote-noreap.sh pathname
9 # Copyright (C) 2021 Facebook, Inc.
11 # Authors: Paul E. McKenney <paulmck@kernel.org>
13 pathname="$1"
14 if test "$pathname" = ""
15 then
16 echo Usage: kvm-remote-noreap.sh pathname
17 exit 1
19 if ! test -d "$pathname"
20 then
21 echo Usage: kvm-remote-noreap.sh pathname
22 echo " pathname must be a directory."
23 exit 2
26 while test -d "$pathname"
28 find "$pathname" -type f -exec touch -c {} \; > /dev/null 2>&1
29 sleep 30
30 done