fix "su01" test
PATCH 1/1 fix "su01" test
Hi,
I ran "su01" test.
This test failed:
------------<log>
userdel: user su_usr1 does not exist
Creating mailbox file: File exists
userdel: user su_usr2 does not exist
Creating mailbox file: File exists
YOU NEED TO SET ENVIROMENT VARIABLE PASSWD.
------------
This failure was caused by "PASSWD" environment variable not being set:
------------<su01_s1>
#Grab input from enviroment
if [info exists env(PASSWD)] {
set PASSWD $env(PASSWD)
} else {
send_user "YOU NEED TO SET ENVIROMENT VARIABLE PASSWD. \n" exit 1
}
------------
According to "su01_s1", this "PASSWD" is the password of "root" user:
------------<su01_s1>
spawn /bin/su -c whoami
set i_am_root 0
expect {
"Password:" {
send "$PASSWD\r"
expect {
"root" { set i_am_root 1
set i_can_root 1
}
} }
}
------------
I think whether this test program is unfinished.
Probably the author of this program thought that there was a problem to set a password in the shell, I think.
Because, the password of root is various by each users who run the test, and it cannot be gotten from environment variable or file etc.
So, I suggest that "su01" shell demands root password when it is run. But, when user forgot to input, it should return and finish with error.
I attach the patch for "su01" file.
Regards--
-Tomonori Mitani
testcases/commands/su/su01 +11 -0
@@ -81,6 +81,17 @@ rm -f $TEST_ENV_FILE > /dev/null 2>&1 +#Set password of root-user + echo "Please input password of root-user within 30 seconds." + read -t 30 PASSWD + if [ $? != 0 ] + then { + echo "Time over. Password was not input." + exit 1 + } + fi + export PASSWD + #Create 1st test user #erase user if he may exist , so we can have a clean en rm -rf /home/$TEST_USER1
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 45 lines · Mitani
Hi,
I ran "su01" test.
This test failed:
------------<log>
userdel: usersu_usr1does not exist
Creating mailbox file: File exists
userdel: usersu_usr2does not exist
Creating mailbox file: File exists
YOU NEED TO SET ENVIROMENT VARIABLE PASSWD.
------------This failure was caused by "PASSWD" environment variable not being set:
------------<su01_s1>
#Grab input from enviroment
if [info exists env(PASSWD)] {
set PASSWD $env(PASSWD)
} else {
send_user "YOU NEED TO SET ENVIROMENT VARIABLE PASSWD. \n" exit 1
}
------------According to "
su01_s1", this "PASSWD" is the password of "root" user:
------------<su01_s1>
spawn/bin/su-c whoami
seti_am_root0
expect {
"Password:" {
send "$PASSWD\r"
expect {
"root" { seti_am_root1
seti_can_root1
}
}
}
}
------------I think whether this test program is unfinished.
Probably the author of this program thought that there was a problem to set a password in the shell, I think.
Because, the password of root is various by each users who run the test, and it cannot be gotten from environment variable or file etc.
Quoted 5 lines
So, I suggest that "su01" shell demands root password when it is run. But, when user forgot to input, it should return and finish with error.
I attach the patch for "su01" file.
I don't agree; this item is already mentioned in INSTALL (but I
think that it should probably be moved to a README file or something... INSTALL doesn't seem intuitive) for another set of tests:
iv) Finally, before running the networktests.sh script, two variables must
be set within the script file. The "RHOST" variable should be set to the hostname of the server. The "PASSWD" variable should be set to root's password on the server machine. This is necessary for tests such as telnet01 and ftp01.
All of the applications which require $PASSWD need to be
documented though as this is far from intuitive. Thanks,
-Garrett
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 56 lines · Garrett Cooper
Quoted 45 lines · Mitani
Hi,
I ran "su01" test.
This test failed:
------------<log>
userdel: usersu_usr1does not exist
Creating mailbox file: File exists
userdel: usersu_usr2does not exist
Creating mailbox file: File exists
YOU NEED TO SET ENVIROMENT VARIABLE PASSWD.
------------This failure was caused by "PASSWD" environment variable not being set:
------------<su01_s1>
#Grab input from enviroment
if [info exists env(PASSWD)] {
set PASSWD $env(PASSWD)
} else {
send_user "YOU NEED TO SET ENVIROMENT VARIABLE PASSWD. \n" exit 1
}
------------According to "
su01_s1", this "PASSWD" is the password of "root" user:
------------<su01_s1>
spawn/bin/su-c whoami
seti_am_root0
expect {
"Password:" {
send "$PASSWD\r"
expect {
"root" { seti_am_root1
seti_can_root1
}
}
}
}
------------I think whether this test program is unfinished.
Probably the author of this program thought that there was a problem to set a password in the shell, I think.
Because, the password of root is various by each users who run the test, and it cannot be gotten from environment variable or file etc.Quoted 5 lines
So, I suggest that "su01" shell demands root password when it is run. But, when user forgot to input, it should return and finish with error.
I attach the patch for "su01" file.
I don't agree; this item is already mentioned in INSTALL (but I think that it should probably be moved to a README file or something... INSTALL doesn't seem intuitive) for another set of tests:
Quoted 8 lines
iv) Finally, before running the
networktests.shscript, two variables must be set within the script file. The "RHOST" variable should be set to the hostname of the server. The "PASSWD" variable should be set to root's password on the server machine. This is necessary for tests such as telnet01 and ftp01.All of the applications which require $PASSWD need to be documented though as this is far from intuitive.
Also, what you're suggesting would fix _interactive_ tests, not
_non-interactive_ tests, where the majority of all users should *not* be running LTP interactively -- thus I don't think that it's a worthwhile addition (sorry :(...).
Thanks,
-Garrett
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Sorry.
I understand.
I was careless.
Thank you--
-Tomonori Mitani
Quoted 85 lines
-----Original Message-----
From: Garrett Cooper [mailto:[email protected]]
Sent: Tuesday, April 20, 2010 3:46 PM
To: Mitani
Cc: [email protected]; [email protected]
Subject: Re: [LTP] [PATCH] fix "su01" testQuoted 13 lines · Garrett Cooper
Quoted 12 lines · Mitani
Hi,
I ran "su01" test.
This test failed:
------------<log>
userdel: usersu_usr1does not exist
Creating mailbox file: File exists
userdel: usersu_usr2does not exist
Creating mailbox file: File exists
YOU NEED TO SET ENVIROMENT VARIABLE PASSWD.
------------Quoted 1 line
Quoted 1 line
This failure was caused by "PASSWD" environment variable not being
set:
Quoted 11 lines
Quoted 11 lines
------------<su01_s1>
#Grab input from enviroment
if [info exists env(PASSWD)] {
set PASSWD $env(PASSWD)
} else {
send_user "YOU NEED TO SET ENVIROMENT VARIABLE PASSWD. \n" exit 1
}
------------According to "
su01_s1", this "PASSWD" is the password of "root"user:
Quoted 15 lines
Quoted 15 lines
------------<su01_s1>
spawn/bin/su-c whoami
seti_am_root0
expect {
"Password:" {
send "$PASSWD\r"
expect {
"root" { seti_am_root1
seti_can_root1
}
}
}
}
------------Quoted 4 lines
Quoted 4 lines
I think whether this test program is unfinished.
Probably the author of this program thought that there was a problem to set a password in the shell, I think.
Because, the password of root is various by each users who run thetest,
Quoted 3 lines
Quoted 3 lines
and it cannot be gotten from environment variable or file etc.
So, I suggest that "su01" shell demands root password when it is
run.
Quoted 1 line
Quoted 1 line
But, when user forgot to input, it should return and finish with
error.
Quoted 5 lines
Quoted 3 lines
I attach the patch for "su01" file.
I don't agree; this item is already mentioned in INSTALL (but
I
Quoted 2 lines
think that it should probably be moved to a README file or something... INSTALL doesn't seem intuitive) for another set of
tests:
Quoted 2 lines
iv) Finally, before running the
networktests.shscript, twovariables must
Quoted 1 line
be set within the script file. The "RHOST" variable should
be set to
Quoted 1 line
the hostname of the server. The "PASSWD" variable should
be set to
Quoted 1 line
root's password on the server machine. This is necessary
for tests
Quoted 4 lines
such as telnet01 and ftp01.
All of the applications which require $PASSWD need to be documented though as this is far from intuitive.
Quoted 6 lines
Also, what you're suggesting would fix _interactive_ tests, not
_non-interactive_ tests, where the majority of all users should *not* be running LTP interactively -- thus I don't think that it's a worthwhile addition (sorry :(...).
Thanks,
-Garrett
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
Quoted 4 lines · Mitani
Sorry.
I understand.
I was careless.
...
I'm not saying you're wrong, in fact your observation that there
is an issue is absolutely correct :D -- I'm just disagreeing with your proposed change (please don't take it personally :)..). As I said before, if the details in the documentation were clearer as to the requirements for the su01, etc tests, this wouldn't have been an issue when you were executing the test.
Cheers!
-Garrett
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list