Skip to content

Commit

Permalink
p_shadow-utils: use next guid for groupadd test
Browse files Browse the repository at this point in the history
There is a possibility that the guid 1010 is in used during the test and
could make it fail. Picking the next available guid works around that
possibility, while letting the test still test the same scenario.
  • Loading branch information
carlosrodfern committed Oct 30, 2024
1 parent 19551e9 commit 7b3b2e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/p_shadow-utils/30-groupadd_tests
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ t_Log "Running $0 group add tests"
sed -i /testgroup/d /etc/group

echo "Create a new group"
groupadd -g 1010 testgroup
next_guid=$((10+$(awk -F: '{print $3}' /etc/group | sort | tail -1)))
groupadd -g $next_guid testgroup
t_CheckExitStatus $?

0 comments on commit 7b3b2e6

Please sign in to comment.