From 10a408c15a77dfad65eda026f230f7e571d8d617 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sun, 1 Mar 2020 15:38:54 -0500 Subject: tests: Add a test for -printf %u/%g with a low ulimit --- tests.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests.sh b/tests.sh index 2a52049..6ebdc50 100755 --- a/tests.sh +++ b/tests.sh @@ -529,6 +529,7 @@ gnu_tests=( test_printf_nul test_printf_Y_error test_printf_H + test_printf_u_g_ulimit test_quit test_quit_child @@ -1941,6 +1942,12 @@ function test_printf_H() { bfs_diff basic links -printf '%%p(%p) %%d(%d) %%f(%f) %%h(%h) %%H(%H) %%P(%P) %%y(%y)\n' } +function test_printf_u_g_ulimit() { + closefrom 4 + ulimit -n 16 + [ "$(invoke_bfs deep -printf '%u %g\n' | uniq)" = "$(id -un) $(id -gn)" ] +} + function test_fstype() { fstype="$(invoke_bfs basic -maxdepth 0 -printf '%F\n')" bfs_diff basic -fstype "$fstype" -- cgit v1.2.3