On Aug 20, 2010, at 1:08 AM, GaoGodwin wrote:

> Hi,
> 
> There are three failures found when running the LTP at_deny01 case.
> 
> [1] at_deny01    1  TCONF  :  at command not found on system
> [2] /home/test_user_1/at_deny01: line 129: tst_resm: command not found
> [3] You are required to change your password immediately (root enforced)
> 
> The root causes of these failures:
> 
> [1] In the shell script, if the return value of a function is 0, it view as 
> TRUE. In the at_deny01
> 162 if type at > /dev/null; then
> 163         tst_resm TCONF "at command not found on system"
> if the system has at function, shell script will print "at command not found 
> on system". This is opposite.
> 
> [2] In the at_deny01, root user will create user named a test_user_1, copy 
> the file at_deny01 to the home directory of test_user_1,
> change user to test_user_1 and run the at_deny01 script.
> when run the script, ${LTPROOT}/testcase/bin is in the environment variable 
> of root, but NOT in the test_user_1. So when the test_user_1
> run this script, it can NOT find the tst_resm command.
> 
> [3] When some boards boot up, the system time is 010100001970. the Linux 
> system will let NON-root user change its password immediately 
> and stop the script running. This patch will let the script run normally 
> without changing the password. 
> 
> Patch attached, I have checked it on the Ubuntu.
> 
> Signed-off-by: Godwin Gao <[email protected]>

I'd accept item 1, because it fixes the issue seen. I wouldn't accept the rest, 
because:

2. This is a non-issue; you should setup your environmnent properly before 
running scripts because runltp already does this properly. Otherwise we'd have 
an inconsistently `fixed' test script. It doesn't look like this is fixed in 
the patch anyhow.
3. I can't fix every issue pertaining to user logins, and we shouldn't. There's 
enough code in the sourcebase that uses similar logic, so if it needs to be 
expressed somewhere, please let me know so we can address this `issue' 
universally, not just one off in this test script.

Also, why are you calling su with -p now? It's for preserving the environment 
according to the GNU coreutils page: 
http://www.gnu.org/software/coreutils/manual/html_node/su-invocation.html .

Thanks,
-Garrett
------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to