From: Pat Riehecky Date: Fri, 13 Mar 2026 21:04:46 +0000 (-0500) Subject: test/libsubid: update 01_list_ranges X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=b93e08f9649b96f650d79339952c9829ea8ac9f2;p=thirdparty%2Fshadow.git test/libsubid: update 01_list_ranges Now that user resolution is required, ensure a resolvable user is used. Signed-off-by: Pat Riehecky --- diff --git a/tests/libsubid/01_list_ranges/config/etc/subgid b/tests/libsubid/01_list_ranges/config/etc/subgid index b9495cfc2..b2edf8aa9 100644 --- a/tests/libsubid/01_list_ranges/config/etc/subgid +++ b/tests/libsubid/01_list_ranges/config/etc/subgid @@ -1,2 +1,5 @@ -foo:200000:10000 +bin:190000:10000 +nobody:200000:10000 +65534:210000:10000 root:500000:1000 +0:510000:1000 diff --git a/tests/libsubid/01_list_ranges/config/etc/subuid b/tests/libsubid/01_list_ranges/config/etc/subuid index e5c537be5..86e6b72f2 100644 --- a/tests/libsubid/01_list_ranges/config/etc/subuid +++ b/tests/libsubid/01_list_ranges/config/etc/subuid @@ -1,3 +1,7 @@ -foo:300000:10000 -foo:400000:10000 +1000:100000:10000 +bin:190000:10000 +65534:200000:10000 +nobody:300000:10000 +nobody:400000:10000 root:500000:1000 +0:510000:1000 diff --git a/tests/libsubid/01_list_ranges/list_ranges.test b/tests/libsubid/01_list_ranges/list_ranges.test index 37af12565..e0d9f09cd 100755 --- a/tests/libsubid/01_list_ranges/list_ranges.test +++ b/tests/libsubid/01_list_ranges/list_ranges.test @@ -17,19 +17,21 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0 change_config echo -n "list foo's ranges..." -${build_path}/src/getsubids foo > /tmp/subuidlistout -${build_path}/src/getsubids -g foo > /tmp/subgidlistout +${build_path}/src/getsubids nobody > /tmp/subuidlistout +${build_path}/src/getsubids -g nobody > /tmp/subgidlistout echo "OK" echo -n "Check the subuid ranges..." -[ $(wc -l /tmp/subuidlistout | awk '{ print $1 }') -eq 2 ] -grep "0: foo 300000 10000" /tmp/subuidlistout -grep "1: foo 400000 10000" /tmp/subuidlistout +[ $(wc -l /tmp/subuidlistout | awk '{ print $1 }') -eq 3 ] +grep "0: nobody 200000 10000" /tmp/subuidlistout +grep "1: nobody 300000 10000" /tmp/subuidlistout +grep "2: nobody 400000 10000" /tmp/subuidlistout echo "OK" echo -n "Check the subgid ranges..." -[ $(wc -l /tmp/subgidlistout | awk '{ print $1 }') -eq 1 ] -grep "0: foo 200000 10000" /tmp/subgidlistout +[ $(wc -l /tmp/subgidlistout | awk '{ print $1 }') -eq 2 ] +grep "0: nobody 200000 10000" /tmp/subgidlistout +grep "1: nobody 210000 10000" /tmp/subgidlistout echo "OK" log_status "$0" "SUCCESS"