From: Subrata Modak <[email protected]>
Subject: Re:[LTP][PATCH] Fs_perms: Miss Installing a Binary
Date: Thu, 19 Mar 2009 12:18:50 +0530

> Hi,
> 
> On Wed, 2009-03-18 at 14:29 +0800, CAI Qian wrote:
> Hi,
>> 
>> The following patch named
>> 
>> [PATCH 3/6] Integrate the File System Permissions Tests in to Default
>> LTP run
>> http://article.gmane.org/gmane.linux.ltp/6875
>> 
>> Added fs_perm test case to the default run, but it failed to execute
>> properly,
>> 
>> ...
>> bin/fs_perms_simpletest.sh:
>> line 1: ./fs_perms: No such file or directory
>> bin/fs_perms_simpletest.sh:
>> line 2: ./fs_perms: No such file or directory
>> bin/fs_perms_simpletest.sh:
>> line 3: ./fs_perms: No such file or directory
>> ...
>> 
>> The following patch fixes it by installing a needed binary.
>> 
>> Signed-off-by: CAI Qian <[email protected]>
> 
> This alone will not solve the problem.
> 
>> 
>> --- testcases/kernel/fs/fs_perms/Makefile.orig       2008-12-23 
>> 14:35:28.000000000 +0800
>> +++ testcases/kernel/fs/fs_perms/Makefile    2009-03-18 13:51:56.000000000 
>> +0800
>> @@ -3,7 +3,7 @@
>>  LDLIBS += -lltp
>>  LDFLAGS += -L../../../../lib
>> 
>> -TARGETS = fs_perms
>> +TARGETS = fs_perms testx
>> 
>>  all: fs_perms testx
> 
> You also need to have the combined patch below, for this output:
>

I have just worked out a patch to combine with my previous one to
address the issue entirely, as well as fix some other tests like
"fs_racer" that have to the same problem -- need to access files in
"bin" directory. Please check the email with the title,

  [PATCH] Fs_perms & Runltp: Fix 2 Issues

CAI Qian
 
> <<<test_output>>>
> incrementing stop
> fs_perms    1  PASS  :  x a 001 file owned by (99/99) as user/group(12/100)
> fs_perms    1  PASS  :  x a 010 file owned by (99/99) as user/group(200/99)
> fs_perms    1  PASS  :  x a 100 file owned by (99/99) as user/group(99/500)
> fs_perms    1  PASS  :  w a 002 file owned by (99/99) as user/group(12/100)
> fs_perms    1  PASS  :  w a 020 file owned by (99/99) as user/group(200/99)
> fs_perms    1  PASS  :  w a 200 file owned by (99/99) as user/group(99/500)
> fs_perms    1  PASS  :  r a 004 file owned by (99/99) as user/group(12/100)
> fs_perms    1  PASS  :  r a 040 file owned by (99/99) as user/group(200/99)
> fs_perms    1  PASS  :  r a 400 file owned by (99/99) as user/group(99/500)
> fs_perms    1  PASS  :  r a 000 file owned by (99/99) as user/group(99/99)
> fs_perms    1  PASS  :  w a 000 file owned by (99/99) as user/group(99/99)
> fs_perms    1  PASS  :  x a 000 file owned by (99/99) as user/group(99/99)
> fs_perms    1  PASS  :  x a 010 file owned by (99/99) as user/group(99/500)
> fs_perms    1  PASS  :  x a 100 file owned by (99/99) as user/group(200/99)
> fs_perms    1  PASS  :  w a 020 file owned by (99/99) as user/group(99/500)
> fs_perms    1  PASS  :  w a 200 file owned by (99/99) as user/group(200/99)
> fs_perms    1  PASS  :  r a 040 file owned by (99/99) as user/group(99/500)
> fs_perms    1  PASS  :  r a 400 file owned by (99/99) as user/group(200/99)
> <<<execution_status>>>
> 
> Signed-off-by: CAI Qian <[email protected]>,
> Signed-off-by: Subrata Modak <[email protected]>,
> ---
> 
> --- ltp-full-20090228/testcases/kernel/fs/fs_perms.orig/fs_perms.c    
> 2009-03-19 12:04:09.000000000 +0530
> +++ ltp-full-20090228/testcases/kernel/fs/fs_perms/fs_perms.c 2009-03-19 
> 12:01:22.000000000 +0530
> @@ -47,13 +47,13 @@ static int testsetup(mode_t mode, int cu
>       int ret;
>  
>       ret = unlink("test.file");
> -     if (ret && errno != ENOENT)
> +     if (ret && errno != ENOENT) 
>               goto done;
> -     ret = system("cp testx test.file");
> -     if (ret)
> +     ret = system("cp $LTPROOT/testcases/bin/testx test.file");
> +     if (ret) 
>               goto done;
>       ret = chmod("test.file", mode);
> -     if (ret)
> +     if (ret) 
>               goto done;
>       ret = chown("test.file", cuserId, cgroupId);
>  
> --- 
> ltp-full-20090228/testcases/kernel/fs/fs_perms.orig/fs_perms_simpletest.sh    
>     2009-03-19 12:04:09.000000000 +0530
> +++ ltp-full-20090228/testcases/kernel/fs/fs_perms/fs_perms_simpletest.sh     
> 2009-03-19 11:47:35.000000000 +0530
> @@ -1,18 +1,18 @@
> -./fs_perms 001 99 99 12 100 x 0
> -./fs_perms 010 99 99 200 99 x 0
> -./fs_perms 100 99 99 99 500 x 0
> -./fs_perms 002 99 99 12 100 w 0
> -./fs_perms 020 99 99 200 99 w 0
> -./fs_perms 200 99 99 99 500 w 0
> -./fs_perms 004 99 99 12 100 r 0
> -./fs_perms 040 99 99 200 99 r 0
> -./fs_perms 400 99 99 99 500 r 0
> -./fs_perms 000 99 99 99 99 r 1
> -./fs_perms 000 99 99 99 99 w 1
> -./fs_perms 000 99 99 99 99 x 1
> -./fs_perms 010 99 99 99 500 x 1
> -./fs_perms 100 99 99 200 99 x 1
> -./fs_perms 020 99 99 99 500 w 1
> -./fs_perms 200 99 99 200 99 w 1
> -./fs_perms 040 99 99 99 500 r 1
> -./fs_perms 400 99 99 200 99 r 1
> +fs_perms 001 99 99 12 100 x 0
> +fs_perms 010 99 99 200 99 x 0
> +fs_perms 100 99 99 99 500 x 0
> +fs_perms 002 99 99 12 100 w 0
> +fs_perms 020 99 99 200 99 w 0
> +fs_perms 200 99 99 99 500 w 0
> +fs_perms 004 99 99 12 100 r 0
> +fs_perms 040 99 99 200 99 r 0
> +fs_perms 400 99 99 99 500 r 0
> +fs_perms 000 99 99 99 99 r 1
> +fs_perms 000 99 99 99 99 w 1
> +fs_perms 000 99 99 99 99 x 1
> +fs_perms 010 99 99 99 500 x 1
> +fs_perms 100 99 99 200 99 x 1
> +fs_perms 020 99 99 99 500 w 1
> +fs_perms 200 99 99 200 99 w 1
> +fs_perms 040 99 99 99 500 r 1
> +fs_perms 400 99 99 200 99 r 1
> --- ltp-full-20090228/testcases/kernel/fs/fs_perms.orig/Makefile      
> 2009-03-19 12:04:09.000000000 +0530
> +++ ltp-full-20090228/testcases/kernel/fs/fs_perms/Makefile   2009-03-19 
> 11:43:50.000000000 +0530
> @@ -3,7 +3,7 @@ CPPFLAGS += -I../../../../include
>  LDLIBS += -lltp
>  LDFLAGS += -L../../../../lib
>  
> -TARGETS = fs_perms
> +TARGETS = fs_perms testx
>  
>  all: fs_perms testx
>  
> --
> Regards--
> Subrata

------------------------------------------------------------------------------
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