Li, Jin | 21 Jun 2012 09:27
Favicon

[bug report] a typo in runltp script

Hi,

When I use runltp with the option [-b DEVICE], notice the typo as follows:

sed -i "" -e "s|DEVICE_FS_TYPE|$DEVICE_FS_TYPE|"  ${TMP}/alltests

The runltp will hit error and exit.

Is it a typo or I miss something else ?

Thanks,

Jin

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
chrubis | 21 Jun 2012 13:40
Picon

Re: [bug report] a typo in runltp script

Hi!
> When I use runltp with the option [-b DEVICE], notice the typo as follows:
> 
> sed -i "" -e "s|DEVICE_FS_TYPE|$DEVICE_FS_TYPE|"  ${TMP}/alltests
> 
> The runltp will hit error and exit.
> 
> Is it a typo or I miss something else ?

That line went in with Garrett's patch to improve the script. I guess he
was using slightly different version of sed (or just typed the line
wrong). (CCed him in case he remebers).

And in any case we should fix that. Do you care to send a patch?

--

-- 
Cyril Hrubis
chrubis@...

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Wanlong Gao | 22 Jun 2012 04:35
Favicon
Gravatar

[PATCH] runltp: fix the wrong parsing -b option

Maybe a typo when replacing DEVICE_FS_TYPE.

Signed-off-by: Wanlong Gao <gaowanlong@...>
---
 runltp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/runltp b/runltp
index 3bd5252..0d77a6e 100755
--- a/runltp
+++ b/runltp
 <at>  <at>  -683,7 +683,7  <at>  <at>  main()
         sed -i "s|DEVICE|$DEVICE|"  ${TMP}/alltests
     else
         echo "remove test cases which require the block device."
-    echo "You can specify it with option -b"
+        echo "You can specify it with option -b"
         sed -i "/DEVICE/d"  ${TMP}/alltests
     fi

 <at>  <at>  -719,7 +719,7  <at>  <at>  main()
     fi

     if [ -n "$DEVICE" ]; then
-        sed -i "" -e "s|DEVICE_FS_TYPE|$DEVICE_FS_TYPE|"  ${TMP}/alltests
+        sed -i "s|DEVICE_FS_TYPE|$DEVICE_FS_TYPE|"  ${TMP}/alltests
     fi

     if [ $? -ne 0 ]; then
--

-- 
(Continue reading)

Wanlong Gao | 26 Jun 2012 10:26
Favicon
Gravatar

Re: [PATCH] runltp: fix the wrong parsing -b option

On 06/22/2012 10:35 AM, Wanlong Gao wrote:
> Maybe a typo when replacing DEVICE_FS_TYPE.

Objections, Cooper?
There isn't any other places have this odd statement in this file
like here.

Thanks,
Wanlong Gao

> 
> Signed-off-by: Wanlong Gao <gaowanlong@...>
> ---
>  runltp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/runltp b/runltp
> index 3bd5252..0d77a6e 100755
> --- a/runltp
> +++ b/runltp
>  <at>  <at>  -683,7 +683,7  <at>  <at>  main()
>          sed -i "s|DEVICE|$DEVICE|"  ${TMP}/alltests
>      else
>          echo "remove test cases which require the block device."
> -    echo "You can specify it with option -b"
> +        echo "You can specify it with option -b"
>          sed -i "/DEVICE/d"  ${TMP}/alltests
>      fi
>  
>  <at>  <at>  -719,7 +719,7  <at>  <at>  main()
(Continue reading)

Garrett Cooper | 29 Jun 2012 04:13
Picon
Gravatar

Re: [PATCH] runltp: fix the wrong parsing -b option

On Tue, Jun 26, 2012 at 1:26 AM, Wanlong Gao <gaowanlong@...> wrote:
> On 06/22/2012 10:35 AM, Wanlong Gao wrote:
>> Maybe a typo when replacing DEVICE_FS_TYPE.
>
> Objections, Cooper?
> There isn't any other places have this odd statement in this file
> like here.

LGTM.

Reviewed-by: Garrett Cooper <yanegomi@...>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Wanlong Gao | 29 Jun 2012 04:21
Favicon
Gravatar

Re: [PATCH] runltp: fix the wrong parsing -b option

On 06/29/2012 10:13 AM, Garrett Cooper wrote:
> On Tue, Jun 26, 2012 at 1:26 AM, Wanlong Gao <gaowanlong@...> wrote:
>> On 06/22/2012 10:35 AM, Wanlong Gao wrote:
>>> Maybe a typo when replacing DEVICE_FS_TYPE.
>>
>> Objections, Cooper?
>> There isn't any other places have this odd statement in this file
>> like here.
> 
> LGTM.
> 
> Reviewed-by: Garrett Cooper <yanegomi@...>

Thank you, pushed.

Wanlong Gao

> 

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Garrett Cooper | 22 Jun 2012 04:53
Picon
Gravatar

Re: [bug report] a typo in runltp script

On Thu, Jun 21, 2012 at 12:27 AM, Li, Jin <Jin.Li@...> wrote:
> Hi,
>
> When I use runltp with the option [-b DEVICE], notice the typo as follows:
>
> sed -i "" -e "s|DEVICE_FS_TYPE|$DEVICE_FS_TYPE|"  ${TMP}/alltests
>
> The runltp will hit error and exit.
>
> Is it a typo or I miss something else ?

    It wasn't an intentional "typo". It's an inconsistency between BSD
sed and GNU sed (something that irritates me from time to time). The
above form works with BSD sed.
    Replacing `-i ""` with `-i '.bk'` should work.
Thanks,
-Garrett

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

Gmane