diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-03-01 15:38:54 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-03-01 15:38:54 -0500 |
commit | 10a408c15a77dfad65eda026f230f7e571d8d617 (patch) | |
tree | bd11fff5a5ab1b91a46cd83156d552fb39e5e8e5 | |
parent | 1c184e718f5745cf3a53a3c389814a792e73aa51 (diff) | |
download | bfs-10a408c15a77dfad65eda026f230f7e571d8d617.tar.xz |
tests: Add a test for -printf %u/%g with a low ulimit
-rwxr-xr-x | tests.sh | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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" |