Hi! > > > > Now, "do_fallocate()" needs fallocate() op. but on ext3 this is > > > > not supported i.e. ENOTSUP. > > > > >>Do you have kernel compiled with CONFIG_TMPFS=y? > > > > No. I've just checked kernel with above option: the reported madvise03 > > testcase worked fine (usage of shmem_fallocate()). > > So your analysis of my scenario is corret. > > Please , discard posted patch. > > >>We can still handle this with some patch to skip first testcase if kernel > >>is compiled without "CONFIG_TMPFS=y". I think that qualifies as TCONF. > >>I'll leave it up to you. > > Hmmm....yes... as TCONF(and not TFAIL) is of course the right exit code in > case of TMPFS not enabled on kernel side. > I let you know...
Generally LTP tests should handle gracefully when syscall returns ENOSYS or ENOTSUP, in reality only cases that has been catched by somebody are handled. What about following patch? madvise/madvise03: Return TCONF on ENOTSUP If support for TMPFS (CONFIG_TMPFS) is not compiled in kernel madvise will return ENOTSUP for these testcases. Return TCONF rather than TFAIL int this case. Signed-off-by: Francesco Rundo <[email protected]> Signed-off-by: Cyril Hrubis <[email protected]> --- testcases/kernel/syscalls/madvise/madvise03.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testcases/kernel/syscalls/madvise/madvise03.c b/testcases/kernel/syscalls/madvise/madvise03.c index aeae429..02b28d2 100644 --- a/testcases/kernel/syscalls/madvise/madvise03.c +++ b/testcases/kernel/syscalls/madvise/madvise03.c @@ -157,6 +157,11 @@ static void cleanup(void) static void check_and_print(char *advice) { if (TEST_RETURN == -1) { + if (TEST_ERRNO == ENOTSUP && !strcmp(advice, "MADV_REMOVE")) { + tst_resm(TCONF, "madvise MADV_REMOVE returned ENOTSUP" + " CONFIG_TMPFS=y not in kernel .config?"); + return; + } tst_resm(TFAIL, "madvise test for %s failed with " "return = %ld, errno = %d : %s", -- Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
