This has been Applied.
--Subrata--

On Tue, 2007-11-13 at 13:20 +0800, Cai Qian wrote:
> Hi,
> 
> proc01 test case attempts to read files which are not designed to be
> read. Therefore, it causes the test to fail. For example,
> 
> --w------- 1 root root 0 Nov 13 13:09 /proc/sysrq-trigger
> 
> The following patch will check file permission first, and then skip
> write-only files, and report them as INFO.
> 
> Regards,
> CQ
> plain text document attachment (perm.patch)
> --- testcases/kernel/fs/proc/proc01.c.orig    2007-11-13 12:23:56.000000000 
> +0800
> +++ testcases/kernel/fs/proc/proc01.c 2007-11-13 13:02:19.000000000 +0800
> @@ -200,6 +200,14 @@
>                       return 0;
>               }
> 
> +        /* Skip write-only files. */
> +        if ((statbuf.st_mode & S_IRUSR) == 0
> +            && statbuf.st_mode & S_IWUSR) {
> +            tst_resm(TINFO, "%s: is write-only.", obj);
> +            close(fd);
> +            return 0;
> +        }
> +
>               nread = 1;
>               while (nread > 0) {
>                       nread = read(fd, buf, buffsize);
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________ Ltp-list mailing list 
> [email protected] 
> https://lists.sourceforge.net/lists/listinfo/ltp-list


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to