[prev in list] [next in list] [prev in thread] [next in thread]
List: ltp-list
Subject: Re: [LTP]
From: Garrett Cooper <yaneurabeya () gmail ! com>
Date: 2010-08-20 13:54:13
Message-ID: D2E04B18-BD6D-458D-A41E-BD8BC095E9F1 () gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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 <godwin.gao@hotmail.com>
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
[Attachment #5 (unknown)]
<html><head><base href="x-msg://4/"></head><body style="word-wrap: break-word; \
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Aug \
20, 2010, at 1:08 AM, GaoGodwin wrote:</div><br \
class="Apple-interchange-newline"><blockquote type="cite"><span \
class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; \
font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: \
normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; \
white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: \
0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; \
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; \
"><div class="hmmessage" style="font-size: 10pt; "><font size="2" style="font-size: \
10pt; ">Hi,<br><br>There are three failures found when running the LTP at_deny01 \
case.<br><br>[1] at_deny01 1 TCONF : at command \
not found on system<br>[2] /home/test_user_1/at_deny01: line 129: tst_resm: command \
not found<br>[3] You are required to change your password immediately (root \
enforced)<br><br>The root causes of these failures:<br><br>[1] In the shell script, \
if the return value of a function is 0, it view as TRUE. In the at_deny01<br>162 if \
type at > /dev/null; then<br>163 \
tst_resm TCONF "at command not found on system"<br>if the system has at function, \
shell script will print "at command not found on system". This is \
opposite.<br><br>[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,<br>change \
user to test_user_1 and run the at_deny01 script.<br>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<br>run this script, it can NOT find the tst_resm \
command.<br><br>[3] When some boards boot up, the system time is 010100001970. the \
Linux system will let NON-root user change its password immediately<span \
class="Apple-converted-space"> </span><br>and stop the script running. This \
patch will let the script run normally without changing the password.<span \
class="Apple-converted-space"> </span><br><br>Patch attached, I have checked it \
on the Ubuntu.<br><br>Signed-off-by: Godwin Gao <<a \
href="mailto:godwin.gao@hotmail.com">godwin.gao@hotmail.com</a>><br></font></div></span></blockquote></div><br><div>I'd \
accept item 1, because it fixes the issue seen. I wouldn't accept the rest, \
because:</div><div><br></div><div>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.</div><div>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.</div><div><br></div><div>Also, why are you calling su with -p now? It's for \
preserving the environment according to the GNU coreutils page: <a \
href="http://www.gnu.org/software/coreutils/manual/html_node/su-invocation.html">http://www.gnu.org/software/coreutils/manual/html_node/su-invocation.html</a> \
.</div><div><br></div><div>Thanks,</div><div>-Garrett</div></body></html>
------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic