All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] syscall/fallocate04:skip test02 before kernel 2.6.38
@ 2016-01-13  5:14 shuang.qiu
  2016-01-25 13:17 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: shuang.qiu @ 2016-01-13  5:14 UTC (permalink / raw)
  To: ltp

From: Shuang Qiu <shuang.qiu@oracle.com>

FALLOC_FL_PUNCH_HOLE flag for fallocate syscall is available since Linux 2.6.38.

Signed-off-by: Shuang Qiu <shuang.qiu@oracle.com>
---
 testcases/kernel/syscalls/fallocate/fallocate04.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/testcases/kernel/syscalls/fallocate/fallocate04.c b/testcases/kernel/syscalls/fallocate/fallocate04.c
index 41453ac..f77e283 100644
--- a/testcases/kernel/syscalls/fallocate/fallocate04.c
+++ b/testcases/kernel/syscalls/fallocate/fallocate04.c
@@ -142,6 +142,11 @@ static void test02(void)
 	tst_resm(TINFO, "read allocated file size '%zu'", alloc_size0);
 	tst_resm(TINFO, "make a hole with FALLOC_FL_PUNCH_HOLE");
 
+	if (tst_kvercmp(2, 6, 38) < 0) {
+		tst_brkm(TCONF, cleanup,
+			 "Test must be run with kernel 2.6.38 or newer");
+	}
+
 	if (fallocate(fd, FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
 	    block_size, block_size) == -1) {
 		if (errno == EOPNOTSUPP)
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [LTP] [PATCH] syscall/fallocate04:skip test02 before kernel 2.6.38
  2016-01-13  5:14 [LTP] [PATCH] syscall/fallocate04:skip test02 before kernel 2.6.38 shuang.qiu
@ 2016-01-25 13:17 ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2016-01-25 13:17 UTC (permalink / raw)
  To: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-25 13:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-13  5:14 [LTP] [PATCH] syscall/fallocate04:skip test02 before kernel 2.6.38 shuang.qiu
2016-01-25 13:17 ` Cyril Hrubis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.