Hi,
--- On Thu, 1/22/09, Subrata Modak <subr...@linux.vnet.ibm.com> wrote: > From: Subrata Modak <subr...@linux.vnet.ibm.com> > Subject: Re: [LTP] proc01 failures with selinux disabled > To: "Kamalesh Babulal" <kamal...@linux.vnet.ibm.com> > Cc: ltp-l...@lists.sf.net, "Cai Qian" <caiq...@cclom.cn>, "Cai Qian" > <q...@redhat.com> > Date: Thursday, January 22, 2009, 6:00 PM > On Wed, 2009-01-21 at 22:09 -0800, CAI Qian wrote: > > Hi, > > > > > > --- On Thu, 1/22/09, Kamalesh Babulal > <kamal...@linux.vnet.ibm.com> wrote: > > > > > From: Kamalesh Babulal > <kamal...@linux.vnet.ibm.com> > > > Subject: [LTP] proc01 failures with selinux > disabled > > > To: ltp-l...@lists.sf.net > > > Cc: aar...@linux.vnet.ibm.com > > > Date: Thursday, January 22, 2009, 1:25 AM > > > Hi Subrata, > > > > > > When running the testcases/kernel/fs/proc/proc01 > testcase, > > > the > > > /proc/self/*/attr/* read fails, if the selinux is > not > > > enabled. The > > > function cap_getprocattr() is called when selinux > is > > > disabled, while > > > reading the /proc/self/*/attr/* files and it > returns > > > -EINVAL, > > > whereas if the selinux is enabled the read passes > because > > > the selinux > > > equivalent selinux_getprocattr() is called. > > > > > > proc01 0 INFO : > /proc/self/task/15923/mem: read: > > > known issue: Input/output error > > > proc01 1 FAIL : > /proc/self/task/15923/attr/current: > > > read: Invalid argument > > > proc01 2 FAIL : > /proc/self/task/15923/attr/prev: > > > read: Invalid argument > > > proc01 3 FAIL : > /proc/self/task/15923/attr/exec: > > > read: Invalid argument > > > proc01 4 FAIL : > > > /proc/self/task/15923/attr/fscreate: read: > Invalid argument > > > proc01 5 FAIL : > > > /proc/self/task/15923/attr/keycreate: read: > Invalid argument > > > proc01 6 FAIL : > > > /proc/self/task/15923/attr/sockcreate: read: > Invalid > > > argument > > > proc01 0 INFO : /proc/self/mem: read: > known issue: > > > Input/output error > > > proc01 7 FAIL : /proc/self/attr/current: > read: > > > Invalid argument > > > proc01 8 FAIL : /proc/self/attr/prev: > read: Invalid > > > argument > > > proc01 9 FAIL : /proc/self/attr/exec: > read: Invalid > > > argument > > > proc01 10 FAIL : /proc/self/attr/fscreate: > read: > > > Invalid argument > > > proc01 11 FAIL : > /proc/self/attr/keycreate: read: > > > Invalid argument > > > proc01 12 FAIL : > /proc/self/attr/sockcreate: read: > > > Invalid argument > > > proc01 13 FAIL : readproc() failed with 12 > errors. > > > > > > This patch added the /proc/self/*/attr/* to > know_issue > > > array, these > > > arrary element could be called only when the read > fails > > > (when selinux is > > > disabled). > > > > > > Signed-off-by: Kamalesh Babulal > > > <kamal...@linux.vnet.ibm.com> > > > --- > > > testcases/kernel/fs/proc/proc01.c | 2 ++ > > > 1 file changed, 2 insertions(+) > > > > > > Index: b/testcases/kernel/fs/proc/proc01.c > > > > =================================================================== > > > --- a/testcases/kernel/fs/proc/proc01.c > > > +++ b/testcases/kernel/fs/proc/proc01.c > > > @@ -88,6 +88,8 @@ const Mapping known_issues[] = > > > {"read", > "/proc/xen/privcmd", > > > EINVAL}, > > > {"read", > "/proc/self/mem", EIO}, > > > {"read", > > > "/proc/self/task/[0-9]*/mem", EIO}, > > > + {"read", > "/proc/self/attr/*", > > > EINVAL}, > > > + {"read", > > > "/proc/self/task/[0-9]*/attr/*", > EINVAL}, > > > {"", "", 0} > > > }; > > > > > > > This approach will skip the failures that those > entries return EINVAL > > while SELinux is enable. You can check if SELinux is > enable or not, and > > then add then to something like > known_issue_without_selinux table. > > > > I'd suggest to add some comments or TINFO at the > beginning of it to > > state that the test should be run with SELinux enable. > > If the test cannot run with Selinux Enabled, then exit with > TCONF and > proper message. > Report appropriate info post testing when Selinux is > actually enabled. > Actually, it is not that it cannot be run with SELinux disabled. It can, and there is no enforcement. I don't want to block the test to run if SELinux is disabled if anybody want to have a try. However, those EINVAL failures are unclear to me that if they are kernel bugs or not, so if you want to get away with those errors when SELinux is disabled, you can probably fix the kernel bugs, ignore them or put them to the SELinux off known issue list, as I mentioned before. Because everybody in Red Hat is trained that any test should be run with SELinux enabled, it is off my interest to make that change. CAI Qian > Regards-- > Subrata > > > > > CAI Qian > > > > > -- > > > Thanks & Regards, > > > Kamalesh Babulal, > > > Linux Technology Center, > > > IBM, ISTL. > > > > > > > ------------------------------------------------------------------------------ > > > This SF.net email is sponsored by: > > > SourcForge Community > > > SourceForge wants to tell your story. > > > http://p.sf.net/sfu/sf-spreadtheword > > > _______________________________________________ > > > Ltp-list mailing list > > > Ltp-list@lists.sourceforge.net > > > > https://lists.sourceforge.net/lists/listinfo/ltp-list > > > > > ------------------------------------------------------------------------------ > > This SF.net email is sponsored by: > > SourcForge Community > > SourceForge wants to tell your story. > > http://p.sf.net/sfu/sf-spreadtheword > > _______________________________________________ > > Ltp-list mailing list > > Ltp-list@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/ltp-list ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list