Re: [LTP] [PATCH] performing test on loop device if noatime or relatime specified

2015-05-13 Thread Cyril Hrubis
Hi! > >> then compile error: > >> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -g -O2 > >> -Wold-style-definition -D_FORTIFY_SOURCE=2 > >> -I/home/cuibixuan/home/git/ltp/ltp/testcases/kernel/include > >> -I../../../../include -I../../../../include -L../../../../lib open12.c > >> -

Re: [LTP] [PATCH] performing test on loop device if noatime or relatime specified

2015-05-13 Thread Cui Bixuan
On 2015/5/12 21:48, Cyril Hrubis wrote: > Hi! >> then compile error: >> gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -g -O2 >> -Wold-style-definition -D_FORTIFY_SOURCE=2 >> -I/home/cuibixuan/home/git/ltp/ltp/testcases/kernel/include >> -I../../../../include -I../../../../include -L../

Re: [LTP] [PATCH] performing test on loop device if noatime or relatime specified

2015-05-12 Thread Cyril Hrubis
Hi! > then compile error: > gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall -W -g -O2 > -Wold-style-definition -D_FORTIFY_SOURCE=2 > -I/home/cuibixuan/home/git/ltp/ltp/testcases/kernel/include > -I../../../../include -I../../../../include -L../../../../lib open12.c > -lltp -o open12 > o

Re: [LTP] [PATCH] performing test on loop device if noatime or relatime specified

2015-05-12 Thread Cui Bixuan
> + > + SAFE_MOUNT(cleanup, device, MNTPOINT, fs_type, MS_STRICTATIME, > NULL); > + mount_flag = 1; > + SAFE_FILE_PRINTF(cleanup, TEST_FILE, TEST_FILE); > } Hi, I run the LTP today: .configure make then compile error: gcc -g -O2 -g -O2 -fno-strict-aliasi

Re: [LTP] [PATCH] performing test on loop device if noatime or relatime specified

2015-05-08 Thread Han Pingtian
On Thu, May 07, 2015 at 02:48:31PM +0200, Cyril Hrubis wrote: > Hi! > > Thanks. I have revised the patch according to your suggestions. > > Pushed with following modifications, thanks. > > * The device preparation must be done only once in setup() > otherwise the testcase fails with -i 2 > > *

Re: [LTP] [PATCH] performing test on loop device if noatime or relatime specified

2015-05-07 Thread Cyril Hrubis
Hi! > Thanks. I have revised the patch according to your suggestions. Pushed with following modifications, thanks. * The device preparation must be done only once in setup() otherwise the testcase fails with -i 2 * The testcase was previously working fine when executed as non-root user, I've

Re: [LTP] [PATCH] performing test on loop device if noatime or relatime specified

2015-05-06 Thread Han Pingtian
On Mon, May 04, 2015 at 01:53:26PM +0200, Cyril Hrubis wrote: > What about creating a test directory in test temporary directory > unconditionally and change the TEST_FILE to point to a file in it? That > way we can just mount the loop device over the directory if needed and > avoid the ugly chdir

Re: [LTP] [PATCH] performing test on loop device if noatime or relatime specified

2015-05-04 Thread Cyril Hrubis
Hi! > diff --git a/testcases/kernel/syscalls/open/open12.c > b/testcases/kernel/syscalls/open/open12.c > index 54ddfe0..f9be35b 100644 > --- a/testcases/kernel/syscalls/open/open12.c > +++ b/testcases/kernel/syscalls/open/open12.c > @@ -24,6 +24,7 @@ > #include > #include > #include > +#incl

[LTP] [PATCH] performing test on loop device if noatime or relatime specified

2015-05-04 Thread Han Pingtian
Hi, The noatime test of open12 fails on a distribution which doesn't use tmpfs for /tmp. I have composed a patch to fix it. Please have a look, thanks. After 2.6.30, kernel specifies relatime option by default. If so then try to mount a loop device using strictatime option to do the noatime test.