From patchwork Fri Oct 18 17:33:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anna Schumaker X-Patchwork-Id: 11199291 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9174919A1 for ; Fri, 18 Oct 2019 17:33:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 71E15222C2 for ; Fri, 18 Oct 2019 17:33:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="W1TcJrOG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505561AbfJRRdr (ORCPT ); Fri, 18 Oct 2019 13:33:47 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:45177 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728833AbfJRRdq (ORCPT ); Fri, 18 Oct 2019 13:33:46 -0400 Received: by mail-io1-f67.google.com with SMTP id c25so8344737iot.12; Fri, 18 Oct 2019 10:33:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1/8ZkD5unpKQz71lZsRBg9s8TLjbCyqGQCiRLFyW9r0=; b=W1TcJrOGUIVkwGk56+jaLhFR/HuKc6Zvd4frTDA0Q6PEjoEnUpbwUoZqC5sFSBeu5k nskGHUaDD8DNW1JzZAsjUGz8vVD4Oc1EXlLD0BTbkwx33pZ57/roS/+DPTdjjgf+SY7B w2pmkIW9r7Qp7n9CJEZO+lCZWMLYSikrQ4j4CU56Wa8F52haYqDFu8x5MHKhyk/geRRl moH83TwNLqMe8cr6uEF/7Hg3DHFiOkYTcPVkriQyLWZjB2nDibjPMwOGT5zPXKMRMcre RafpenpBrJLZ9VtIYHQrF9tLQD8HTpNIo6eNGnCr0/awPGmg9adn3tjm5cMBbeQw4AvK hEAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=1/8ZkD5unpKQz71lZsRBg9s8TLjbCyqGQCiRLFyW9r0=; b=VUkWsWZ3Gqahx+LXSxMnBmu2IgTEpigP6Q5sDXaEca79cLOXMm1N/d0LoWCLq9TnIn 4M6EV8el3xgDK4q0J35RPnIJQ4M953n00lpdG3Ecu74lfNyRyu5dlb2HHoMCvp0DqOs5 cqOtH5PJDAPEW6COCSL6EE5dHVsZCe+DUnAwSPTnvudmV8835Ozb8v81z2t9v2fNK2zI j8fwWhfiXTvEcqyUB/BAeMH3OT7ND6DnyZ86fSDalx5QAgx9O9FxuJOCxXskHyWtJhGU I+W6F2wVtavhVFFpagx1Vd4Dn2txnQNkjgW03p5uWzvkvSIHf6Wo7AyClusdORNYAU5c 4yAg== X-Gm-Message-State: APjAAAU84cq3/+AATK/oKgQ6rDNsLsEJbOuRzoDsZgnM39DBbCG56N6s vYcyrVsPEfNoObWjO+mSJ66CiMfa X-Google-Smtp-Source: APXvYqwtcYHbdSvYFO83Tt7CqUKWHPeFXpGV76jqJPVPpuLjS163z5MP9Eb6A4+wAus6G5JD0daBxg== X-Received: by 2002:a6b:908:: with SMTP id t8mr2080611ioi.129.1571420025422; Fri, 18 Oct 2019 10:33:45 -0700 (PDT) Received: from gouda.nowheycreamery.com (c-68-32-74-190.hsd1.mi.comcast.net. [68.32.74.190]) by smtp.gmail.com with ESMTPSA id m14sm2416871ild.3.2019.10.18.10.33.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 10:33:44 -0700 (PDT) From: schumaker.anna@gmail.com X-Google-Original-From: Anna.Schumaker@Netapp.com To: fstests@vger.kernel.org, linux-nfs@vger.kernel.org Cc: Anna.Schumaker@Netapp.com Subject: [PATCH 1/2] generic: Create new outfile for 035 over NFS Date: Fri, 18 Oct 2019 13:33:42 -0400 Message-Id: <20191018173343.303032-1-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Anna Schumaker Rename-overwrites over NFS work with a "silly rename" over the network, so the nlink count stays at 1 instead of dropping to 0. This is expected behavior for NFS, so we should use a different golden output file to account for this. See the NFS faq at: nfs.sourceforge.net/#faq_d2 for more information about silly renames. Signed-off-by: Anna Schumaker --- .gitignore | 1 + common/rc | 2 +- tests/generic/035 | 4 ++++ tests/generic/035.cfg | 1 + tests/generic/{035.out => 035.out.default} | 0 tests/generic/035.out.nfs | 5 +++++ 6 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 tests/generic/035.cfg rename tests/generic/{035.out => 035.out.default} (100%) create mode 100644 tests/generic/035.out.nfs diff --git a/.gitignore b/.gitignore index 02734429..6c11a401 100644 --- a/.gitignore +++ b/.gitignore @@ -254,6 +254,7 @@ /dmapi/src/suite2/src/test_rights # Symlinked files +/tests/generic/035.out /tests/xfs/033.out /tests/xfs/071.out /tests/xfs/096.out diff --git a/common/rc b/common/rc index cfaabf10..562d48d8 100644 --- a/common/rc +++ b/common/rc @@ -2848,7 +2848,7 @@ _link_out_file() local features if [ $# -eq 0 ]; then - features="$(_get_os_name)" + features="$(_get_os_name),$FSTYP" if [ -n "$MOUNT_OPTIONS" ]; then features=$features,${MOUNT_OPTIONS##"-o "} fi diff --git a/tests/generic/035 b/tests/generic/035 index 44db45e6..8da3bc99 100755 --- a/tests/generic/035 +++ b/tests/generic/035 @@ -6,6 +6,7 @@ # # Check overwriting rename system call # +seqfull=$0 seq=`basename $0` seqres=$RESULT_DIR/$seq echo "QA output created by $seq" @@ -29,6 +30,9 @@ _supported_os Linux _require_test +# Select appropriate golden output based on fstype +_link_out_file + # real QA test starts here rename_dir=$TEST_DIR/$$ diff --git a/tests/generic/035.cfg b/tests/generic/035.cfg new file mode 100644 index 00000000..d02b0ce9 --- /dev/null +++ b/tests/generic/035.cfg @@ -0,0 +1 @@ +nfs: nfs diff --git a/tests/generic/035.out b/tests/generic/035.out.default similarity index 100% rename from tests/generic/035.out rename to tests/generic/035.out.default diff --git a/tests/generic/035.out.nfs b/tests/generic/035.out.nfs new file mode 100644 index 00000000..6359197f --- /dev/null +++ b/tests/generic/035.out.nfs @@ -0,0 +1,5 @@ +QA output created by 035 +overwriting regular file: +nlink is 1, should be 0 +overwriting directory: +t_rename_overwrite: fstat(3): Stale file handle From patchwork Fri Oct 18 17:33:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anna Schumaker X-Patchwork-Id: 11199295 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D7346A61 for ; Fri, 18 Oct 2019 17:33:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2EE55222BD for ; Fri, 18 Oct 2019 17:33:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Z0XeyDyH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2505563AbfJRRdr (ORCPT ); Fri, 18 Oct 2019 13:33:47 -0400 Received: from mail-il1-f194.google.com ([209.85.166.194]:36198 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502519AbfJRRdr (ORCPT ); Fri, 18 Oct 2019 13:33:47 -0400 Received: by mail-il1-f194.google.com with SMTP id z2so6269009ilb.3; Fri, 18 Oct 2019 10:33:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NTeypUmUMaVTBUGyoYlEEodN2b8ojCnTKiuwMniqi7E=; b=Z0XeyDyHgaQW858x0IvQ3TDySYSZ8uDxyrlPI9loOY762om8YIBcPySzgHmI8CRhFU 71UY/BFPp34Rw6IJU9DltJnAQOYxG+KpMDZgDxx3na92CBtnpZm2PZ9iI6fJK+ado2SM 0veiRmCXt8k6bTlZ2Te/TNth1iZj8foqBNzy81ABFY4dYOEk8aNbI5xqzkzbc8i0raip 27UiyET431yblW0aZ7TIxLDxzjg8tNuREeViNoiB8SBwZJ9caIOu5m8gkxJl7yIV7eat rvu7QPJxO8lKLZRJeDcOjN0Li87CYWkB2Fp8EKCieTrOaZ24VZ5GeDL6c4Q3bR/KtRDX nbnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=NTeypUmUMaVTBUGyoYlEEodN2b8ojCnTKiuwMniqi7E=; b=Ncc62gbUrVCPoNmbPFLo2O6W7jagOem42G8Y97UNT1ZY9Xx27HRcHaIay7l+jNmQC2 fTyq3jHRW2ptF6YrYXSo738G3km3DRX6KFFne2xUkrLalIJAXPLexaIwVXu1oyynSIcN ignM5TX9vPY1KJLOqvyDpxKgtgwbofNaH4X2QRPrsSvKd7WDu0ilgE5IaklRL1DcM3+G AD1Z16ySV1FIzW/qEZyCaH8QLgQQaUlq0OlYU2geuqD1RHJvQkCurkH3Y4ZGFQbNsOJZ /CM+jnerYUVwlb3Fhl2QfhfW06278Y6KfDluuHSKuu5C2cIWVtkilkO3KxdWfDrZqlEj 9fSQ== X-Gm-Message-State: APjAAAUJrSJBIS0B2IVkkvYi35Kg22MsadBNxocA4ysb5mKSKPwr9USu Ftax9xD3b4vo1PDryQu3USAP/Xn+ X-Google-Smtp-Source: APXvYqyh3frDndCit25hcOILnK3wZIDQN5QCPhP8oJta8daeCqK/CEDMXpsiw0xtwxOYruiY2CwvvA== X-Received: by 2002:a92:475a:: with SMTP id u87mr11800289ila.26.1571420026361; Fri, 18 Oct 2019 10:33:46 -0700 (PDT) Received: from gouda.nowheycreamery.com (c-68-32-74-190.hsd1.mi.comcast.net. [68.32.74.190]) by smtp.gmail.com with ESMTPSA id m14sm2416871ild.3.2019.10.18.10.33.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 10:33:45 -0700 (PDT) From: schumaker.anna@gmail.com X-Google-Original-From: Anna.Schumaker@Netapp.com To: fstests@vger.kernel.org, linux-nfs@vger.kernel.org Cc: Anna.Schumaker@Netapp.com Subject: [PATCH 2/2] generic: 448 shouldn't delete $BASE_TEST_FILE if it isn't set yet Date: Fri, 18 Oct 2019 13:33:43 -0400 Message-Id: <20191018173343.303032-2-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191018173343.303032-1-Anna.Schumaker@Netapp.com> References: <20191018173343.303032-1-Anna.Schumaker@Netapp.com> MIME-Version: 1.0 Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org From: Anna Schumaker NFS v4.2 supports SEEK_DATA and SEEK_HOLE, but earlier versions do not. As a result, the test exits and runs the cleanup function without the $BASE_TEST_FILE variable set and the shell expands it to "rm -f .*", deleting all hidden files in the current directory. Signed-off-by: Anna Schumaker --- tests/generic/448 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/generic/448 b/tests/generic/448 index dada499b..d6cdebbf 100755 --- a/tests/generic/448 +++ b/tests/generic/448 @@ -17,7 +17,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _cleanup() { - rm -f $tmp.* $BASE_TEST_FILE.* + rm -f $tmp.* + [ ! -z $BASE_TEST_FILE ] && rm -f $BASE_TEST_FILE.* } # get standard environment, filters and checks