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../../../../lib  open12.c   
>> -lltp -o open12
>> open12.c: In function ?setup?:
>> open12.c:103: error: ?MS_STRICTATIME? undeclared (first use in this function)
>> open12.c:103: error: (Each undeclared identifier is reported only once
>> open12.c:103: error: for each function it appears in.)
>> make[4]: *** [open12] Error 1

Compile error 'MS_STRICTATIME undeclared' because my glibc version(2.11) is
too old. I upgrade it then compile succeed.


> 
> Solution to compilation failures is to add fallback definition into
> ltp/include/lapi/mount.h (have a look at ltp/include/lapi/fcntl.h) and
> include it in the testcase source. That would make the testcase compile,
> but it may still fail when executed. To fix the execution we would need
> to do a runtime check if the kernel supports this flag, I guess that we
> would need to pass it only on newer kernels (we use tst_kvercmp() for
> that).
> 

And I send a patch to check kernel version before call SAFE_MOUNT(, 
MS_STRICTATIME).


Thanks,
Cui Bixuan

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to