From patchwork Sat Dec 29 02:34:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Tao X-Patchwork-Id: 10744731 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 C57F491E for ; Sat, 29 Dec 2018 02:31:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B4ACF28DEF for ; Sat, 29 Dec 2018 02:31:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A637228DF9; Sat, 29 Dec 2018 02:31:37 +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 544B428DEF for ; Sat, 29 Dec 2018 02:31:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728185AbeL2Cba (ORCPT ); Fri, 28 Dec 2018 21:31:30 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:16669 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727208AbeL2Cba (ORCPT ); Fri, 28 Dec 2018 21:31:30 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E87DEC4C6A105 for ; Sat, 29 Dec 2018 10:31:25 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Sat, 29 Dec 2018 10:31:21 +0800 From: Hou Tao To: CC: Subject: [PATCH 1/5] check: use _try_scratch_mount instead of _scratch_mount to mount SCRATCH_DEV Date: Sat, 29 Dec 2018 10:34:48 +0800 Message-ID: <20181229023452.28074-2-houtao1@huawei.com> X-Mailer: git-send-email 2.16.2.dirty In-Reply-To: <20181229023452.28074-1-houtao1@huawei.com> References: <20181229023452.28074-1-houtao1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Else there won't be any error messages when mounting SCRATCH_DEV failed, because _scratch_mount exits early by invoking _fail. Signed-off-by: Hou Tao --- check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check b/check index e85f40ac..e4d76737 100755 --- a/check +++ b/check @@ -607,7 +607,7 @@ for section in $HOST_OPTIONS_SECTIONS; do # call the overridden mount - make sure the FS mounts with # the same options that we'll mount with later. - if ! _scratch_mount >$tmp.err 2>&1 + if ! _try_scratch_mount >$tmp.err 2>&1 then echo "our local mount routine ..." cat $tmp.err From patchwork Sat Dec 29 02:34:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Tao X-Patchwork-Id: 10744729 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 263A913B5 for ; Sat, 29 Dec 2018 02:31:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16F4528DEF for ; Sat, 29 Dec 2018 02:31:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF7E328DF9; Sat, 29 Dec 2018 02:31:30 +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 87CF828DF2 for ; Sat, 29 Dec 2018 02:31:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727451AbeL2Cba (ORCPT ); Fri, 28 Dec 2018 21:31:30 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:16670 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728185AbeL2Cb3 (ORCPT ); Fri, 28 Dec 2018 21:31:29 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id E278DAEFBC213 for ; Sat, 29 Dec 2018 10:31:25 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Sat, 29 Dec 2018 10:31:22 +0800 From: Hou Tao To: CC: Subject: [PATCH 2/5] generic/019: check scratch device is a block device or not Date: Sat, 29 Dec 2018 10:34:49 +0800 Message-ID: <20181229023452.28074-3-houtao1@huawei.com> X-Mailer: git-send-email 2.16.2.dirty In-Reply-To: <20181229023452.28074-1-houtao1@huawei.com> References: <20181229023452.28074-1-houtao1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To ensure "blockdev --getsz $SCRATCH_DEV" will succeed. Signed-off-by: Hou Tao --- tests/generic/019 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/generic/019 b/tests/generic/019 index 32db36fc..8e1c9331 100755 --- a/tests/generic/019 +++ b/tests/generic/019 @@ -22,6 +22,7 @@ status=1 # failure is the default! _supported_fs generic _supported_os Linux _require_scratch +_require_block_device $SCRATCH_DEV _require_fail_make_request SYSFS_BDEV=`_sysfs_dev $SCRATCH_DEV` From patchwork Sat Dec 29 02:34:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Tao X-Patchwork-Id: 10744735 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 172241800 for ; Sat, 29 Dec 2018 02:31:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0816628DF5 for ; Sat, 29 Dec 2018 02:31:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDB0428DF2; Sat, 29 Dec 2018 02:31:37 +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 96E7728DF7 for ; Sat, 29 Dec 2018 02:31:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727208AbeL2Cbh (ORCPT ); Fri, 28 Dec 2018 21:31:37 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:17068 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728312AbeL2Cbg (ORCPT ); Fri, 28 Dec 2018 21:31:36 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 02EAA282A53F0 for ; Sat, 29 Dec 2018 10:31:31 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Sat, 29 Dec 2018 10:31:22 +0800 From: Hou Tao To: CC: Subject: [PATCH 3/5] generic/131: wait until the server is ready Date: Sat, 29 Dec 2018 10:34:50 +0800 Message-ID: <20181229023452.28074-4-houtao1@huawei.com> X-Mailer: git-send-email 2.16.2.dirty In-Reply-To: <20181229023452.28074-1-houtao1@huawei.com> References: <20181229023452.28074-1-houtao1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When running xfstests under KVM VM and the load of host is high, only delaying 1s and checking the readiness of server are not enough, and the test case will fail early. Fix it by repeatedly checking the readiness signal until it's found, or the server exits. Signed-off-by: Hou Tao --- tests/generic/131 | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/generic/131 b/tests/generic/131 index d7c146ae..1af86e77 100755 --- a/tests/generic/131 +++ b/tests/generic/131 @@ -37,13 +37,20 @@ TESTFILE=$TEST_DIR/lock_file src/locktest $TESTFILE 2>&1 > $TEST_DIR/server.out & locktest_pid1=$! -sleep 1 +while true; do + sleep 1 -PORT=$(cat $TEST_DIR/server.out | grep "^server port: " | awk '{print $3}') -if [ -z $PORT ]; then - echo "Could not get server port" - exit 1 -fi + PORT=$(cat $TEST_DIR/server.out | grep "^server port: " | awk '{print $3}') + if [ -n "$PORT" ]; then + break + fi + + # check the existence of server process + if ! kill -s 0 $locktest_pid1 >/dev/null 2>&1; then + echo "Could not get server port" + exit 1 + fi +done # Start the client src/locktest -p $PORT -h localhost $TESTFILE 2>&1 > $TEST_DIR/client.out From patchwork Sat Dec 29 02:34:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Tao X-Patchwork-Id: 10744733 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 E0CDF1399 for ; Sat, 29 Dec 2018 02:31:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D0EC528DEF for ; Sat, 29 Dec 2018 02:31:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C378428DF2; Sat, 29 Dec 2018 02:31:37 +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 74B8D28DF2 for ; Sat, 29 Dec 2018 02:31:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728625AbeL2Cbg (ORCPT ); Fri, 28 Dec 2018 21:31:36 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:17070 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727208AbeL2Cbg (ORCPT ); Fri, 28 Dec 2018 21:31:36 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 317B9D2803908 for ; Sat, 29 Dec 2018 10:31:31 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Sat, 29 Dec 2018 10:31:22 +0800 From: Hou Tao To: CC: Subject: [PATCH 4/5] generic/466: explicitly request $SCRATCH_DEV to be a block device Date: Sat, 29 Dec 2018 10:34:51 +0800 Message-ID: <20181229023452.28074-5-houtao1@huawei.com> X-Mailer: git-send-email 2.16.2.dirty In-Reply-To: <20181229023452.28074-1-houtao1@huawei.com> References: <20181229023452.28074-1-houtao1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP so "blockdev --getsize64 $SCRATCH_DEV" will succeed. Signed-off-by: Hou Tao --- tests/generic/466 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/generic/466 b/tests/generic/466 index bc577df7..8168b5be 100755 --- a/tests/generic/466 +++ b/tests/generic/466 @@ -29,6 +29,7 @@ _cleanup() _supported_os Linux _supported_fs generic _require_scratch_nocheck +_require_block_device $SCRATCH_DEV rm -f $seqres.full From patchwork Sat Dec 29 02:34:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hou Tao X-Patchwork-Id: 10744737 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 300C213B5 for ; Sat, 29 Dec 2018 02:31:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D96428DEF for ; Sat, 29 Dec 2018 02:31:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 126E428DF9; Sat, 29 Dec 2018 02:31:38 +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 C2DC728DFC for ; Sat, 29 Dec 2018 02:31:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728312AbeL2Cbh (ORCPT ); Fri, 28 Dec 2018 21:31:37 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:17069 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728365AbeL2Cbg (ORCPT ); Fri, 28 Dec 2018 21:31:36 -0500 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id F3A4CA5BBA5C3 for ; Sat, 29 Dec 2018 10:31:30 +0800 (CST) Received: from huawei.com (10.90.53.225) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.408.0; Sat, 29 Dec 2018 10:31:22 +0800 From: Hou Tao To: CC: Subject: [PATCH 5/5] fsx: check ENOSYS in test_copy_range() Date: Sat, 29 Dec 2018 10:34:52 +0800 Message-ID: <20181229023452.28074-6-houtao1@huawei.com> X-Mailer: git-send-email 2.16.2.dirty In-Reply-To: <20181229023452.28074-1-houtao1@huawei.com> References: <20181229023452.28074-1-houtao1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.90.53.225] X-CFilter-Loop: Reflected Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In configure script, we only check whether or not the build of copy-range test program is successful, but that doesn't mean the kernel has implemented the syscall, so checking for this case. Signed-off-by: Hou Tao Reviewed-by: Darrick J. Wong --- ltp/fsx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ltp/fsx.c b/ltp/fsx.c index 316f08eb..b84180f7 100644 --- a/ltp/fsx.c +++ b/ltp/fsx.c @@ -1583,7 +1583,7 @@ test_copy_range(void) loff_t o1 = 0, o2 = 0; if (syscall(__NR_copy_file_range, fd, &o1, fd, &o2, 0, 0) == -1 && - (errno == EOPNOTSUPP || errno == ENOTTY)) { + (errno == ENOSYS || errno == EOPNOTSUPP || errno == ENOTTY)) { if (!quiet) fprintf(stderr, "main: filesystem does not support "