[lsb-discuss] [Bug 1415] New: usersgroups: T.misc fails when uid 2634 is not free

bugzilla-daemon at freestandards.org bugzilla-daemon at freestandards.org
Thu Jun 22 04:40:54 PDT 2006

Problem root:
in the script SRC/common/lsblib/usersgroups_funcs.sh the function unique_id does
not return a free uid, but always returns 2634, if free or not.

Affected functions in file:

All the above functions use code like that:
    if [ $? -eq 1 ]; then
        return 0
    elif [ $? -eq 0 ]; then
        return 1
        return 3

If the return code $? equals to 0 in the beginning, the first if branch is not
The "elif"-branch is not executed, too, because $? now holds the result of the
"[ $? -eq 1 ]" (which is the "test $? -eq 1" command, which is "1").
So the "else" branch is taken, resulting in a return value of "1" instead of "3". 

Wrongly failed tests:
- /tset/LSB.usersgroups/commands/misc/T.misc 38,59 ,
(because unique_id doesnt return a free uid, since the uid 2634 is already
occupied on the tested system)
- Potentially many more tests

Lines in Report:

        /tset/LSB.usersgroups/commands/misc/T.misc 38   Failed

                Test Information:
        usermod -u :Modify a user account. - Reference the Commands and
                Utilities chapter in the Specification
        usermod -u FAIL: Could not change uid for user


        /tset/LSB.usersgroups/commands/misc/T.misc 59   Failed

                Test Information:
        useradd -u :Create a new user. - Reference the Commands and Utilities
                chapter in the Specification
        User vsx29 was not found

Configure bugmail: http://bugs.linuxbase.org/userprefs.cgi?tab=email   
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the lsb-discuss mailing list