[Pkg-shadow-devel] [Git][debian/adduser][debian/latest] move autopkgtests out of uid range > 900

Marc Haber (@zugschlus) gitlab at salsa.debian.org
Fri Sep 4 18:43:49 BST 2026



Marc Haber pushed to branch debian/latest at Debian / adduser


Commits:
f1ee4aba by Marc Haber at 2026-09-01T18:23:59+02:00
move autopkgtests out of uid range > 900

systemd_sysusers allocates system users counting down from 1000. This
causes a conflict with the autopkgtests that we chose to use uids
970-980.

Closes: #1146412

- - - - -


2 changed files:

- debian/tests/f/firstlastuidgid.t
- debian/tests/f/firstlastuidgid_orig.t


Changes:

=====================================
debian/tests/f/firstlastuidgid.t
=====================================
@@ -695,12 +695,12 @@ assert_intersection_search_failure({prefix => 'u7a', system => 0, firstuid => 44
 # two fully independent searches and could create a system user
 # whose uid and gid did not match at all.
 
-assert_intersection_search_success({prefix => 's5a', system => 1, firstuid => 920, lastuid => 930, firstgid => 925, lastgid => 935, expect_first => 925});
+assert_intersection_search_success({prefix => 's5a', system => 1, firstuid => 820, lastuid => 830, firstgid => 825, lastgid => 835, expect_first => 825});
 
 # test group S6A: --system --group with non-overlapping uid/gid
 # ranges must fail outright, same as the regular-user case.
 
-assert_intersection_search_failure({prefix => 's6a', system => 1, firstuid => 936, lastuid => 940, firstgid => 950, lastgid => 955});
+assert_intersection_search_failure({prefix => 's6a', system => 1, firstuid => 836, lastuid => 840, firstgid => 850, lastgid => 855});
 
 # ============================================================
 # Feature tests: --ingroup now prefers the requested group's GID
@@ -728,11 +728,11 @@ assert_preferred_uid({prefix => 'u9a', system => 0, firstuid => 5000, lastuid =>
 
 # test group S7A: same as U8A, but for adduser --system --ingroup.
 
-assert_preferred_uid({prefix => 's7a', system => 1, firstuid => 941, lastuid => 950, fgid => 945, join_by_gid => 0, occupy_gid_as_uid => 0, expect_uid => 945});
+assert_preferred_uid({prefix => 's7a', system => 1, firstuid => 841, lastuid => 850, fgid => 845, join_by_gid => 0, occupy_gid_as_uid => 0, expect_uid => 845});
 
 # test group S8A: same as U9A, but for adduser --system --ingroup.
 
-assert_preferred_uid({prefix => 's8a', system => 1, firstuid => 951, lastuid => 960, fgid => 955, join_by_gid => 0, occupy_gid_as_uid => 1, expect_uid => 951});
+assert_preferred_uid({prefix => 's8a', system => 1, firstuid => 851, lastuid => 860, fgid => 855, join_by_gid => 0, occupy_gid_as_uid => 1, expect_uid => 851});
 
 # test group S9A: same hit-case as S7A, but using --gid GID (a
 # numeric primary group) instead of --ingroup GROUPNAME. addsysuser
@@ -742,14 +742,14 @@ assert_preferred_uid({prefix => 's8a', system => 1, firstuid => 951, lastuid =>
 # free uid in that range, so a match proves the preferred-id logic
 # fired for the --gid path specifically, not just --ingroup.
 
-assert_preferred_uid({prefix => 's9a', system => 1, firstuid => 961, lastuid => 970, fgid => 965, join_by_gid => 1, occupy_gid_as_uid => 0, expect_uid => 965});
+assert_preferred_uid({prefix => 's9a', system => 1, firstuid => 861, lastuid => 870, fgid => 865, join_by_gid => 1, occupy_gid_as_uid => 0, expect_uid => 865});
 
 # test group S10A: same fallback-case as S8A, but using --gid GID
 # instead of --ingroup GROUPNAME: the group's gid is already taken
 # as a uid by another user, so adduser --system --gid must fall
 # back to the lowest free uid in the requested range instead.
 
-assert_preferred_uid({prefix => 's10a', system => 1, firstuid => 971, lastuid => 980, fgid => 975, join_by_gid => 1, occupy_gid_as_uid => 1, expect_uid => 971});
+assert_preferred_uid({prefix => 's10a', system => 1, firstuid => 871, lastuid => 880, fgid => 875, join_by_gid => 1, occupy_gid_as_uid => 1, expect_uid => 871});
 
 # test group U10A: --ingroup preferred-uid logic must respect the
 # requested --firstuid/--lastuid range: if the group's gid lies


=====================================
debian/tests/f/firstlastuidgid_orig.t
=====================================
@@ -424,8 +424,8 @@ cleanup($prefix);
 $prefix='s2a';
 $firstuid1=220;
 $firstgid1=230;
-$fuid = 950;
-$fgid = 960;
+$fuid = 850;
+$fgid = 860;
 $gidcount=$firstgid1;
 $uidcount=$firstuid1;
 foreach $groupbase( @gnames ) {
@@ -497,8 +497,8 @@ cleanup($prefix);
 $prefix='s3a';
 $firstuid1=260;
 $firstgid1=270;
-$fuid = 970;
-$fgid = 980;
+$fuid = 870;
+$fgid = 880;
 %confhash=();
 $confhash{'FIRST_SYSTEM_UID'}="$firstuid1";
 $confhash{'FIRST_SYSTEM_GID'}="$firstgid1";
@@ -547,7 +547,7 @@ cleanup($prefix);
 
 $prefix='s3a2';
 $firstuid1=260;
-$fuid = 970;
+$fuid = 870;
 $uidcount=$firstuid1;
 foreach $userbase( @unames ) {
     $user=$prefix.$userbase;



View it on GitLab: https://salsa.debian.org/debian/adduser/-/commit/f1ee4aba66878309b572769544d3cad272d451ef

-- 
View it on GitLab: https://salsa.debian.org/debian/adduser/-/commit/f1ee4aba66878309b572769544d3cad272d451ef
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-shadow-devel/attachments/20260904/ff2c8ce5/attachment-0001.htm>


More information about the Pkg-shadow-devel mailing list