[Lsb-messages] /var/www/bzr/lsb/4.1/runtime-test r1284: backport: password test typo (bug 3980)

Mats Wichmann mats at linuxfoundation.org
Fri Jun 6 12:02:18 UTC 2014


------------------------------------------------------------
revno: 1284
committer: Mats Wichmann <mats at linuxfoundation.org>
branch nick: runtime-test
timestamp: Fri 2014-06-06 06:02:18 -0600
message:
  backport: password test typo (bug 3980)
modified:
  modules/usersgroups/tset/LSB.usersgroups/commands/misc/command_tests.sh
  scripts/package/Makefile
-------------- next part --------------
=== modified file 'modules/usersgroups/tset/LSB.usersgroups/commands/misc/command_tests.sh'
--- a/modules/usersgroups/tset/LSB.usersgroups/commands/misc/command_tests.sh	2010-01-21 13:24:48 +0000
+++ b/modules/usersgroups/tset/LSB.usersgroups/commands/misc/command_tests.sh	2014-06-06 12:02:18 +0000
@@ -1643,9 +1643,9 @@
 # - Assumptions:
 # - 	1)Tester has super-user privilege.
 # -	2)All of the commands used in this script work.
-# - 
+# -  
 # - Strategy Statement:
-# - 	Execute passwd and test all its options.
+# - 	Execute passwd and test various options.
 # - 
 # - Expected Results:
 # -    	As specified in the spec. 
@@ -1665,40 +1665,43 @@
 tp40()
  {
     tpstart "passwd - change a user password.  - Reference the Commands and Utilities chapter in the Specification"
-    tet_infoline "Password for the user should be change."
+    tet_infoline "Password for the user should be changed."
     
-#Add a test user
+    # Add a test user 
     OTHER_USER=vsx21
     useradd $OTHER_USER > /dev/null 2>&1
     if [ $? -ne 0 ]; then
-	tet_infoline "Un-able to add a test user: useradd "
+	tet_infoline "Unable to add a test user: useradd "
 	tpresult UNRESOLVED	
     	return
     fi
-    
-#Test passwd with NO option: 
-	OLD_PASSWORD=$(./uberpass -S -p $OTHER_USER)
-
-   TestFile=test.passwd
-
-cat > $TestFile << EOF
-t3st1ng.
-t3st1ng.
+    OLD_PASSWORD=$(./uberpass -S -p $OTHER_USER)
+
+    # Prepare the password to change to.
+    # Note we expect feeding two identical lines from a file as stdin
+    # gives the desired result. We need to pick a password that will
+    # cause no complaints and especially not give additional prompts.
+
+    TestFile=test.passwd
+    cat > $TestFile << EOF
+,eJUQ7hVO
+,eJUQ7hVO
 EOF
 
+    # Test passwd with NO option:
     ./cpt passwd $OTHER_USER < $TestFile > /dev/null 2>&1 
-	if [ $? -eq 0 ]; then
-		NEW_PASSWORD=$(./uberpass -S -p $OTHER_USER)
-		if [ "$OLD_PASSWOR" = "$NEW_PASSWORD" ]; then
-			FAIL=Y
-			tet_infoline "user password did not change."
-		else
-			tet_infoline "passwd : PASS"	
-		fi
+    if [ $? -eq 0 ]; then
+	NEW_PASSWORD=$(./uberpass -S -p $OTHER_USER)
+	if [ "$OLD_PASSWORD" = "$NEW_PASSWORD" ]; then
+	    FAIL=Y
+	    tet_infoline "user password did not change."
 	else
-		tet_infoline "passwd : FAIL"	
-		FAIL=Y
+	    tet_infoline "passwd : PASS"	
 	fi
+    else
+	tet_infoline "passwd : FAIL"	
+	FAIL=Y
+    fi
 
     remove_user $OTHER_USER
     rm -f $TestFile > /dev/null 2>&1
@@ -1718,8 +1721,8 @@
 	tpresult UNRESOLVED	
     	return
     fi
-    
-#Test passwd with option: -x
+ 
+    #Test passwd with option: -x
     passwd -x 384 $OTHER_USER > /dev/null 2>&1 
     TC_EXIT_VALUE=$?
     if [ $TC_EXIT_VALUE -eq 0 ]; then

=== modified file 'scripts/package/Makefile'
--- a/scripts/package/Makefile	2014-06-06 12:01:33 +0000
+++ b/scripts/package/Makefile	2014-06-06 12:02:18 +0000
@@ -1,6 +1,6 @@
 # values used to populate .spec from .spec.sed
 PACKAGE=lsb-test-core
-VERSION=4.1.18
+VERSION=4.1.19
 RELEASE=1
 # PAM Version
 PVERSION=0.99.8.1



More information about the lsb-messages mailing list