On 2/14/2012 9:48 AM, Peng Haitao wrote:
> Salvatore CRO' said the following on 2012-2-14 16:27:
>> On 2/14/2012 9:18 AM, Peng Haitao wrote:
>>> Salvatore CRO' said the following on 2012-2-14 16:04:
>>>> Sorry for "...." in the first sentence of my reply.
>>>>
>>>> I was looking for the right word to complete the sentence and put "..." in
>>>> the meanwhile.
>>>> Then I forgot to do the text replacing!
>>>>
>>> :)
>>>
>>>> I didn't mean in any way to be offensive.
>>>>
>>> Yeah,no problem.
>> Thank you.
>>
>>>> Anyhow I think your solution could not be the proper one.
>>>>
>>> When TERM env variable is defined, first unsetenv(), then call setenv() to
>>> set it.
>>> When TERM env variable is not defined, then call setenv("TERM", "xterm", 1)
>>> to set it.
>>>
>>> This has a problem?
>>>
>> I don't see anything wrong with your implementation. On the other hand if
>> the variable is not set we should not
>> force it in my opinion and keep test logic consistent.
>> If var is ND both child and parent will evaluate respective variable to ""
>> and the test will pass.
>> What we could argue on is whether to still treat the same way the two cases
>> when sprintf returns 0 or negative number.
>> IMO, it should not be the case.
>>
> The case test to verify inheritance of environment variables by child.
> If environment variable is not set, I think the case should be exit.
>
> I modify the case with the solution, because Garrett Cooper said the steps:)
> http://sourceforge.net/mailarchive/message.php?msg_id=27104028
It does not convince me either. The problem Cristian reported refers to
how ssh handles user profile initialization.
I had the same problem as I run ltp on an embedded system from linux
host via ssh and I did not modifiy the test at all.
The approach Garett proposed to Cristian is not applicable as it
modifies the test to overcome a ssh specific issue.
Instead I used ssh -t -t (twice!) when executing ltp to ensure TERM
variable is defined in console initialized by ssh.
Furthermore subsequent commit 60eddf837a9c414fe18dded4b07522d0d2066761
made the test safer against
this situation.
Based on this rationale I will propose the patch to modify sprintf check.
BR,
Salvo.
>
> Best Regards,
> Peng
>
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list