Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Feb 2015 20:45:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-testing@freebsd.org
Subject:   [Bug 197612] usr.sbin.pw.pw_usernext:usernext* tests are broken (but pass sometimes...?)
Message-ID:  <bug-197612-32464-IfBgSgA9VL@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-197612-32464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-197612-32464@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197612

--- Comment #8 from Garrett Cooper,425-314-3911 <ngie@FreeBSD.org> ---
(In reply to Brad Davis from comment #7)

It will. Why isn't arithmetic done properly with the base value though..? 

$ sudo /usr/libexec/atf-sh pw_usernext.sh usernext                              
pw_usernext.sh: WARNING: Running test cases outside of kyua(1) is unsupported
pw_usernext.sh: WARNING: No isolation nor timeout control is being applied; you
may get unexpected failures; see atf-test-case(4)
Executing command [ pw -V /root useradd test1 ]
Executing command [ pw -V /root useradd test2 ]
Executing command [ pw -V /root useradd test3 ]
Executing command [ pw -V /root useradd test4 ]
Executing command [ pw -V /root useradd test5 ]
Executing command [ pw -V /root usernext ]
passed
[ngie@fuji-current-amd64 /usr/src.svn/usr.sbin/pw/tests]$ sudo
/usr/libexec/atf-sh pw_usernext.sh usernext_assigned_group
pw_usernext.sh: WARNING: Running test cases outside of kyua(1) is unsupported
pw_usernext.sh: WARNING: No isolation nor timeout control is being applied; you
may get unexpected failures; see atf-test-case(4)
Executing command [ pw -V /root useradd -n test1 -g 0 ]
Executing command [ pw -V /root usernext ]
passed
$ svn diff pw_usernext.sh 
Index: pw_usernext.sh
===================================================================
--- pw_usernext.sh      (revision 278777)
+++ pw_usernext.sh      (working copy)
@@ -15,7 +15,7 @@
                atf_check -s exit:0 ${PW} useradd test$var0
                var0=`expr $var0 + 1`
        done
-       atf_check -s exit:0 -o match:"100${LIMIT}:100${LIMIT}" \
+       atf_check -s exit:0 -o match:"$(( 1000 + ${LIMIT} )):$(( 1000 +
${LIMIT} ))" \
                ${PW} usernext
 }

@@ -32,7 +32,7 @@
                atf_check -s exit:0 ${PW} useradd -n test$var0 -g 0
                var0=`expr $var0 + 1`
        done
-       atf_check -s exit:0 -o match:"100${LIMIT}:1001" \
+       atf_check -s exit:0 -o match:"$(( 1000 + ${LIMIT} )):1001" \
                ${PW} usernext
 }

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-197612-32464-IfBgSgA9VL>