2010/8/23 Godwin Gao <[email protected]>:
> Retested the at_deny01 case, and found the same issue[2]. The below is the
> test steps, if something wrong, please note me.
>
> 1. create a runtest/at file
> r...@godwin-desktop:/home/godwin/LTP_New/ltp-full-20100630# cat runtest/at
> at_deny01    at_deny01
> 2. fixed the issue[1]
> 3. ./runltp -p -l a.txt -f at
>
> Seems it is a environment setup issue, test_user_1 does not have the
> ${LTPROOT}/testcases/bin in its PATH.
> Attached the log

    Ok, I see the issue now:

‘-’
‘-l’
‘--login’
    Make the shell a login shell. This means the following. Unset all
environment variables except TERM, HOME, and SHELL (which are set as
described above), and USER and LOGNAME (which are set, even for the
super-user, as described above), and set PATH to a compiled-in default
value. Change to user's home directory. Prepend ‘-’ to the shell's
name, intended to make it read its login startup file(s).

    Note that it's a `precompiled' path (BSD explicitly calls this out
as /bin:/usr/bin, but who knows what Linux sets this as).
    Here's a quick patch for this item; please let me know how it
works in the negative case.
Thanks,
-Garrett

PS The reason why I did this was to avoid environment tainting as
setup_test says:

        # This is the workaround for a potential bug.
        # [Bug 468337] At Refuse to Work with Non-login Shell
        # https://bugzilla.redhat.com/show_bug.cgi?id=468337
        # As we are running in non-login shell now, we cannot run the script
        # by simply given it a relative path. Therefore, we copy it to test
        # users' home directories, and run it from there.

because -m/-p would have done just that (besides... environment
tainting just makes crud non-deterministic...).

Attachment: fix-at_deny01-error-conditions.diff
Description: Binary data

------------------------------------------------------------------------------
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