On Fri, 30 Oct 2026 10:01:19 +0900
"Masami Hiramatsu (Google)" <[email protected]> wrote:
> > instance_slam() {
> > - while :; do
> > - mkdir foo 2> /dev/null
> > - rmdir foo 2> /dev/null
> > - done
> > + mkdir foo 2> /dev/null
> > + while ! rmdir foo; do
> > + echo could not rmdir foo
>
> nit: If we retry this, do we need to warn it?
> (maybe we can add a limitation of continuous failure and make the
> test fail if the failure exceeds it.)
Retrying is actually quite normal. The rmdir *should* fail if one of
the instance files is open.
Now perhaps we can add a counter to make it fail if it exceeds a large
threshold?
let x=0
while ! rmdir foo; do
let x=$x+1
if [ $x -gt 10000 ]; then
exit_fail
fi
done
?
-- Steve