On Wed, 2009-03-11 at 23:20 -0600, Fan He wrote:
> [Patch 1/1] Patch for enabling the ftruncate04 testcase
> 
> -add mount mandatory option to enable test run. this test case doesn't
> work almost all the time we use it.
> -modified ftruncate04.c for the situation when the /tmp(or other test)
> directory is in a LVM filesystem where there are three output lines 
> -modified ltp-full-20081031/runtest/syscalls and
> testcases/kernel/syscalls/ftruncate/Makefile 
>  to make this testcase can be started by the two new added script
> ftruncate.sh and ftruncate_64.sh
> 
> 
> 
> signed-off-by : fredrick he <[email protected]>

Thanks.

Post patching, i get the below results:

<<<test_start>>>
tag=ftruncate04 stime=1236854147
cmdline="ftruncate.sh"
contacts=""
analysis=exit
initiation_status="ok"
<<<test_output>>>
ftruncate04    1  PASS  :  Test passed.
<<<execution_status>>>
duration=1 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=4
<<<test_end>>>

<<<test_start>>>
tag=ftruncate04_64 stime=1236854148
cmdline="ftruncate_64.sh"
contacts=""
analysis=exit
initiation_status="ok"
<<<test_output>>>
ftruncate04_64    1  PASS  :  Test passed.
<<<execution_status>>>
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=1 cstime=4
<<<test_end>>>

Which otherwise would have been:
ftruncate04    1  CONF  :  The filesystem where /tmp is mounted does not
support mandatory locks. Cannot run this test.
ftruncate04_64    1  CONF  :  The filesystem where /tmp is mounted does
not support mandatory locks. Cannot run this test.

Regards--
Subrata

> -----------------------------------------------------------
> 
> ---
> ltp-full-20081031.orig/testcases/kernel/syscalls/ftruncate/ftruncate04.c      
> 2008-08-20
> 18:55:21.000000000 +0800
> +++
> ltp-full-20081031/testcases/kernel/syscalls/ftruncate/ftruncate04.c   
> 2008-12-26
> 16:40:15.000000000 +0800
> @@ -294,7 +294,7 @@ int main( int ac, char **av)
>  
>       local_flag = PASSED;
>       tst_tmpdir();
> -     if (system("mount | grep `df . | grep -v Filesystem | awk
> {'print $1'}` | grep mand >/dev/null") != 0){
> +     if (system("mount | grep `df . | grep ^/ | awk {'print $1'}` |
> grep mand >/dev/null") != 0){
>               tst_resm(TCONF,"The filesystem where /tmp is mounted
> does"
>                              " not support mandatory locks. Cannot run
> this test.");
>               tst_rmdir();
> --- ltp-full-20081031.orig/runtest/syscalls   2008-10-23
> 18:38:34.000000000 +0800
> +++ ltp-full-20081031/runtest/syscalls        2008-12-26 17:25:20.000000000
> +0800
> @@ -241,8 +241,8 @@ ftruncate02 ftruncate02
>  ftruncate02_64 ftruncate02_64
>  ftruncate03 ftruncate03
>  ftruncate03_64 ftruncate03_64
> -ftruncate04 ftruncate04
> -ftruncate04_64 ftruncate04_64
> +ftruncate04 ftruncate.sh
> +ftruncate04_64 ftruncate_64.sh
>  
>  #futimesat test cases
>  futimesat01 futimesat01
> ---
> ltp-full-20081031.orig/testcases/kernel/syscalls/ftruncate/Makefile   
> 2008-08-25
> 22:10:01.000000000 +0800
> +++
> ltp-full-20081031/testcases/kernel/syscalls/ftruncate/Makefile        
> 2008-12-29
> 16:00:45.000000000 +0800
> @@ -29,7 +29,10 @@ TARGETS += $(patsubst %.c,%,$(SRCS))
>  all: $(TARGETS)
>  
>  install:
> -     @set -e; for i in $(TARGETS); do ln -f $$i ../../../bin/$$i ;
> done
> +     @set -e; \
> +     ln -f ftruncate.sh ../../../bin/ftruncate.sh; \
> +     ln -f ftruncate_64.sh ../../../bin/ftruncate_64.sh; \
> +     for i in $(TARGETS); do install -m 755  $$i ../../../bin/$$i ;
> done
>  
>  clean:
>       rm -f $(TARGETS)
> --- /dev/null 2008-06-07 03:39:59.000000000 +0800
> +++
> ltp-full-20081031/testcases/kernel/syscalls/ftruncate/ftruncate.sh    
> 2009-03-12
> 10:24:28.000000000 +0800
> @@ -0,0 +1,9 @@
> +#!/bin/sh
> +
> +cd /tmp
> +DEV=`df . |grep ^/|awk '{print $1}'` 
> +mount ${DEV} -o remount,mand || exit 2
> +ftruncate04
> +ret=$?
> +mount ${DEV} -o remount || exit 2
> +exit $ret
> --- /dev/null 2008-06-07 03:39:59.000000000 +0800
> +++
> ltp-full-20081031/testcases/kernel/syscalls/ftruncate/ftruncate_64.sh 
> 2009-03-12
> 10:24:38.000000000 +0800
> @@ -0,0 +1,9 @@
> +#!/bin/sh
> +
> +cd /tmp
> +DEV=`df . |grep ^/|awk '{print $1}'` 
> +mount ${DEV} -o remount,mand || exit 2
> +ftruncate04_64
> +ret=$?
> +mount ${DEV} -o remount || exit 2
> +exit $ret
> 
> 
> 


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to