Commit Diff


commit - e0220e748cf7158ec0ccebeb968ca59fe730c162
commit + 61d05f0f0e7e5f7fd5eb88e1e6f29f385d4fb798
blob - fa93789a82f9ac4e822dda641bca1e8841f33829
blob + abd876817c1ec5b91e6d494b70c900bb50413493
--- regress/cmdline/checkout.sh
+++ regress/cmdline/checkout.sh
@@ -900,10 +900,9 @@ test_checkout_ulimit_n() {
 	# This tests our down-scaling of caches which store open file handles.
 	# Checkout should still work; if it does not, then either there is
 	# a bug or the fixed limit used by this test case is no longer valid
-	# and must be raised.
-	ulimit -n 20
-
-	got checkout -q $testroot/repo $testroot/wt > $testroot/stdout
+	# and must be raised. Use a subshell to avoid changing global ulimit.
+	(ulimit -n 20; got checkout -q $testroot/repo $testroot/wt \
+		> $testroot/stdout)
 	ret=$?
 	if [ $ret -ne 0 ]; then
 		test_done "$testroot" "$ret"
@@ -933,7 +932,6 @@ test_checkout_ulimit_n() {
 	test_done "$testroot" "$ret"
 }
 
-
 test_parseargs "$@"
 run_test test_checkout_basic
 run_test test_checkout_dir_exists