All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Salvatore CRO'" <salvatore.cro@st.com>
To: Peng Haitao <penght@cn.fujitsu.com>,
	ltp-list@lists.sourceforge.net, cristian@regolo.cc
Subject: Re: [LTP] Fwd: Re: [PATCH] clone06: fix error of TERM environment variable is not available
Date: Tue, 14 Feb 2012 11:03:05 +0100	[thread overview]
Message-ID: <4F3A3159.8000407@st.com> (raw)
In-Reply-To: <4F3A1FC1.5040103@cn.fujitsu.com>

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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

      parent reply	other threads:[~2012-02-14 10:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4F39D61D.80309@cn.fujitsu.com>
2012-02-14  7:54 ` [LTP] [PATCH] clone06: fix error of TERM environment variable is not available Salvatore CRO'
     [not found]   ` <4F3A158D.8070403@st.com>
     [not found]     ` <4F3A18B8.5060506@cn.fujitsu.com>
     [not found]       ` <4F3A1AE8.9050905@st.com>
     [not found]         ` <4F3A1FC1.5040103@cn.fujitsu.com>
2012-02-14 10:03           ` Salvatore CRO' [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F3A3159.8000407@st.com \
    --to=salvatore.cro@st.com \
    --cc=cristian@regolo.cc \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=penght@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.