public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] fix for file_test for systems without rpm installed
@ 2009-08-19 18:19 Paul Larson
  2009-08-23  7:28 ` Subrata Modak
  2009-08-26 15:52 ` Geert Uytterhoeven
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Larson @ 2009-08-19 18:19 UTC (permalink / raw)
  To: LTP Mailing List

[-- Attachment #1: Type: text/plain, Size: 221 bytes --]

Here's the fixed version, forgot I needed to redo these...

If you run file_test.sh on a system without rpm installed, it should
return tconf instead of tfail.

Signed-off-by: Paul Larson <paul.larson@canonical.com>
---


[-- Attachment #2: file_test-2.patch --]
[-- Type: text/x-patch, Size: 918 bytes --]

diff --git a/testcases/commands/ade/file/file_test.sh b/testcases/commands/ade/file/file_test.sh
index 4fc9dec..4e30d43 100755
--- a/testcases/commands/ade/file/file_test.sh
+++ b/testcases/commands/ade/file/file_test.sh
@@ -472,6 +472,8 @@ export TCID=file09
 export TST_COUNT=9
 
 $LTPBIN/tst_resm TINFO "TEST #9: file command recognizes RPM files"
+`type rpm &> /dev/null`
+if [ $? = 0 ]; then
 if [ -f /etc/redhat-release ]; then
 	bDIR=/usr/src/redhat
 	bCMD=rpmbuild
@@ -574,6 +576,9 @@ else
     $LTPBIN/tst_resm TFAIL "file: Failed to recognize RPM file"
     TFAILCNT=$(( $TFAILCNT+1 ))
 fi
+else
+    $LTPBIN/tst_resm TCONF "rpm not installed"
+fi
 
 
 # TEST #10
@@ -582,11 +587,7 @@ fi
 export TCID=file10
 export TST_COUNT=10
 
-if [ -f /etc/redhat-release ]; then
-   KERNEL=vmlinuz
-else
-   KERNEL=vmlinux
-fi
+KERNEL=vmlinu
 
 $LTPBIN/tst_resm TINFO "TEST #10: file command recognizes $KERNEL file"
 

[-- Attachment #3: Type: text/plain, Size: 355 bytes --]

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

[-- Attachment #4: Type: text/plain, Size: 155 bytes --]

_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [LTP] fix for file_test for systems without rpm installed
  2009-08-19 18:19 [LTP] fix for file_test for systems without rpm installed Paul Larson
@ 2009-08-23  7:28 ` Subrata Modak
  2009-08-26 15:52 ` Geert Uytterhoeven
  1 sibling, 0 replies; 4+ messages in thread
From: Subrata Modak @ 2009-08-23  7:28 UTC (permalink / raw)
  To: Paul Larson; +Cc: LTP Mailing List

On Wed, 2009-08-19 at 13:19 -0500, Paul Larson wrote: 
> Here's the fixed version, forgot I needed to redo these...
> 
> If you run file_test.sh on a system without rpm installed, it should
> return tconf instead of tfail.
> 
> Signed-off-by: Paul Larson <paul.larson@canonical.com>

Thanks Paul.

Regards--
Subrata

> ---
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] fix for file_test for systems without rpm installed
  2009-08-19 18:19 [LTP] fix for file_test for systems without rpm installed Paul Larson
  2009-08-23  7:28 ` Subrata Modak
@ 2009-08-26 15:52 ` Geert Uytterhoeven
  2009-08-26 16:09   ` Paul Larson
  1 sibling, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2009-08-26 15:52 UTC (permalink / raw)
  To: Paul Larson; +Cc: LTP Mailing List

On Wed, 19 Aug 2009, Paul Larson wrote:
> Here's the fixed version, forgot I needed to redo these...
> 
> If you run file_test.sh on a system without rpm installed, it should
> return tconf instead of tfail.
> 
> Signed-off-by: Paul Larson <paul.larson@canonical.com>
> ---

> index 4fc9dec..4e30d43 100755
> --- a/testcases/commands/ade/file/file_test.sh
> +++ b/testcases/commands/ade/file/file_test.sh
> @@ -582,11 +587,7 @@ fi
>  export TCID=file10
>  export TST_COUNT=10
>  
> -if [ -f /etc/redhat-release ]; then
> -   KERNEL=vmlinuz
> -else
> -   KERNEL=vmlinux
> -fi
> +KERNEL=vmlinu
>  
>  $LTPBIN/tst_resm TINFO "TEST #10: file command recognizes $KERNEL file"

I guess this change was not supposed to be part of this patch?

Not that I'm complaining, as it fixes another vmlinuz vs. vmlinux mismatch I
was seeing ;-)

With kind regards,

Geert Uytterhoeven
Software Architect
Techsoft Centre

Technology and Software Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [LTP] fix for file_test for systems without rpm installed
  2009-08-26 15:52 ` Geert Uytterhoeven
@ 2009-08-26 16:09   ` Paul Larson
  0 siblings, 0 replies; 4+ messages in thread
From: Paul Larson @ 2009-08-26 16:09 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: LTP Mailing List

Geert Uytterhoeven wrote:
> On Wed, 19 Aug 2009, Paul Larson wrote:
>> Here's the fixed version, forgot I needed to redo these...
>>
>> If you run file_test.sh on a system without rpm installed, it should
>> return tconf instead of tfail.
>>
>> Signed-off-by: Paul Larson <paul.larson@canonical.com>
>> ---
> 
>> index 4fc9dec..4e30d43 100755
>> --- a/testcases/commands/ade/file/file_test.sh
>> +++ b/testcases/commands/ade/file/file_test.sh
>> @@ -582,11 +587,7 @@ fi
>>  export TCID=file10
>>  export TST_COUNT=10
>>  
>> -if [ -f /etc/redhat-release ]; then
>> -   KERNEL=vmlinuz
>> -else
>> -   KERNEL=vmlinux
>> -fi
>> +KERNEL=vmlinu
>>  
>>  $LTPBIN/tst_resm TINFO "TEST #10: file command recognizes $KERNEL file"
> 
> I guess this change was not supposed to be part of this patch?
> 
> Not that I'm complaining, as it fixes another vmlinuz vs. vmlinux mismatch I
> was seeing ;-)
Ha, yeah I just forgot to mention it too.  And that was exactly the
reason for it.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-26 16:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-19 18:19 [LTP] fix for file_test for systems without rpm installed Paul Larson
2009-08-23  7:28 ` Subrata Modak
2009-08-26 15:52 ` Geert Uytterhoeven
2009-08-26 16:09   ` Paul Larson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox