git: 8d680381c89d - main - jail: tests: cosmetic-ish improvements
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 23 Apr 2026 03:02:49 UTC
The branch main has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=8d680381c89d8a8d1c0519a7eaa14ba41724b930
commit 8d680381c89d8a8d1c0519a7eaa14ba41724b930
Author: Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2026-04-23 02:59:21 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2026-04-23 03:02:38 +0000
jail: tests: cosmetic-ish improvements
The new version of incrementing `jid` is a little cleaner and harder to
mess up, and also fix a nwlin omission while we're here.
These comments were dropped on D51502; ngie takes a co-author credit
so that they're not blamed for the commit message, but I can't claim
that I tweaked their suggestions.
Co-authored-by: ngie
---
usr.sbin/jail/tests/jail_basic_test.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/usr.sbin/jail/tests/jail_basic_test.sh b/usr.sbin/jail/tests/jail_basic_test.sh
index c781eed78756..cb50a94a45e8 100755
--- a/usr.sbin/jail/tests/jail_basic_test.sh
+++ b/usr.sbin/jail/tests/jail_basic_test.sh
@@ -186,11 +186,12 @@ find_unused_jid()
atf_skip "System has too many jail, cannot find free slot"
fi
- jid=$((jid + 1))
+ : $(( jid += 1 ))
done
echo "$jid" | tee -a jails.lst
}
+
clean_jails()
{
if [ ! -s jails.lst ]; then