Hi,
Any comment to this patch?
Thanks:)

On 05/31/2011 11:04 PM, tangchen wrote:
> 
> 
> On 05/31/2011 11:48 PM, Cyril Hrubis wrote:
>> Hi!
>>> cgroup filesystem is used in testcases oom03 and oom04, but cgroup
>>> filesystem is not supported in kernel older than 2.6.24. So we should
>>> check the kernel tag first.
>>
>> Still this doesn't help on kernels where cgroups are not compiled in.
>>
>> What about changing the mount_mem() to exit the test with TCONF when
>> mount() returned ENODEV.
>>
> Comment is followed, and here is the new patch. Thanks.:)
> 
> Signed-off-by: Tang Chen <[email protected]>
> ---
>  testcases/kernel/mem/lib/mem.c |   11 +++++++++--
>  1 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/testcases/kernel/mem/lib/mem.c b/testcases/kernel/mem/lib/mem.c
> index e679f1a..4d77408 100644
> --- a/testcases/kernel/mem/lib/mem.c
> +++ b/testcases/kernel/mem/lib/mem.c
> @@ -256,8 +256,15 @@ void mount_mem(char *name, char *fs, char *options, char 
> *path, char *path_new)
>  {
>       if (mkdir(path, 0777) == -1)
>               tst_brkm(TBROK|TERRNO, cleanup, "mkdir %s", path);
> -     if (mount(name, path, fs, 0, options) == -1)
> -             tst_brkm(TBROK|TERRNO, cleanup, "mount %s", path);
> +     if (mount(name, path, fs, 0, options) == -1) {
> +             if (errno == ENODEV) {
> +                     if (rmdir(path) == -1)
> +                             tst_resm(TWARN|TERRNO, "rmdir %s", path);
> +                     tst_brkm(TCONF, NULL, "File system %s is not configured 
> in kernel", fs);
> +             } else {
> +                     tst_brkm(TBROK|TERRNO, cleanup, "mount %s", path);
> +             }
> +     }
>       if (mkdir(path_new, 0777) == -1)
>               tst_brkm(TBROK|TERRNO, cleanup, "mkdir %s", path_new);
>  }

-- 
Best Regards,
Tang chen
--------------------------------------------------
Tang Chen
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST)
No.6 Wenzhu Road, Nanjing, 210012, China 
TEL: +86+25-86630566-8508
FUJITSU INTERNAL: 7998-8508
FAX: +86+25-83317685
EMail: [email protected]
--------------------------------------------------
This communication is for use by the intended recipient(s) only and may contain 
information that is privileged, confidential and exempt from disclosure under 
applicable law. If you are not an intended recipient of this communication, you 
are hereby notified that any dissemination, distribution or copying hereof is 
strictly prohibited.  If you have received this communication in error, please 
notify me by reply e-mail, permanently delete this communication from your 
system, and destroy any hard copies you may have printed


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to