From patchwork Mon Aug 27 13:12:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 10577093 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2B33013B8 for ; Mon, 27 Aug 2018 13:11:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AEBA299E0 for ; Mon, 27 Aug 2018 13:11:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F48029B1D; Mon, 27 Aug 2018 13:11:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC96029AE3 for ; Mon, 27 Aug 2018 13:11:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726890AbeH0Q5y (ORCPT ); Mon, 27 Aug 2018 12:57:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:36802 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726851AbeH0Q5x (ORCPT ); Mon, 27 Aug 2018 12:57:53 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id BDD55AFC7 for ; Mon, 27 Aug 2018 13:11:16 +0000 (UTC) From: Luis Henriques To: fstests@vger.kernel.org Cc: Jan Kara , Luis Henriques Subject: [PATCH] src/seek_sanity_test: skip test20 if file's too big Date: Mon, 27 Aug 2018 14:12:11 +0100 Message-Id: <20180827131211.5887-1-lhenriques@suse.com> Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since the allocation size can be quite big for some filesystems (4194304 for cephfs), the pwrite operation in test20 may fail with EFBIG. Skip this test if that's the case. Signed-off-by: Luis Henriques --- src/seek_sanity_test.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/seek_sanity_test.c b/src/seek_sanity_test.c index e5aab239771d..e9938d1b1a23 100644 --- a/src/seek_sanity_test.c +++ b/src/seek_sanity_test.c @@ -280,8 +280,17 @@ static int test20(int fd, int testnum) /* Magic size in the middle of ext[23] triple indirect tree */ filsz = (12 + bufsz / 4 + 8 * bufsz / 4 * bufsz / 4 + 2 * bufsz / 4 + 5) * bufsz; ret = do_pwrite(fd, buf, bufsz, filsz - bufsz); - if (ret) + if (ret) { + /* + * Report success. Filesystem just cannot handle so large + * offsets and correctly reports it. + */ + if (errno == EFBIG) { + fprintf(stdout, "Test skipped as fs doesn't support so large files.\n"); + ret = 0; + } goto out; + } /* Offset inside ext[23] indirect block */ ret += do_lseek(testnum, 1, fd, filsz, SEEK_DATA, 14 * bufsz, filsz - bufsz);