[LTP] [PATCH] Skip test02 before kernel 2.6.38
Shuang Qiu
shuang.qiu@oracle.com
Wed Jan 13 06:14:12 CET 2016
Sorry,forgot to indicate the testcase in subject,please ignore this one.
On 01/13/2016 12:58 PM, shuang.qiu@oracle.com wrote:
> 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)
More information about the Ltp
mailing list