From: aborah-sudo Date: Wed, 8 Apr 2026 11:37:22 +0000 (+0530) Subject: Tests: Verify user creation fails when UID exceeds maximum allowed value (2^32 - 1) X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=829d9548947545a5e9115f46bd99dff5d5e838ee;p=thirdparty%2Fshadow.git Tests: Verify user creation fails when UID exceeds maximum allowed value (2^32 - 1) This is the transformation to Python of the test located in `tests/usertools/01/26_useradd_UID_-1.test` which checks that `useradd` can not add a new user with specific uid --- diff --git a/tests/system/tests/test_useradd.py b/tests/system/tests/test_useradd.py index 2b9288d07..9754c330d 100644 --- a/tests/system/tests/test_useradd.py +++ b/tests/system/tests/test_useradd.py @@ -421,6 +421,7 @@ def test_useradd__valid_group_as_primary(shadow: Shadow, group_name: str, group_ "uid_value, expected_error", [ pytest.param(-1, "useradd: invalid user ID '-1'", id="negative_uid"), + pytest.param(4294967295, "useradd: invalid user ID '4294967295'", id="exceeds_maximum_uid"), pytest.param(4294967296, "useradd: invalid user ID '4294967296'", id="out_of_range_uid"), ], )