From patchwork Fri Mar 26 15:41:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Reichl X-Patchwork-Id: 12167035 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6AA5C433E1 for ; Fri, 26 Mar 2021 15:42:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9DF8B61A2D for ; Fri, 26 Mar 2021 15:42:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230134AbhCZPlv (ORCPT ); Fri, 26 Mar 2021 11:41:51 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:50035 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230237AbhCZPlk (ORCPT ); Fri, 26 Mar 2021 11:41:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616773300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=11n3RGMjxHBqSo7kl9jXsdv4+Yf1mclEiOQFAHX4kgY=; b=aCujBlHXvgPL3QywdbJajzwldcFd1t52WAHPb/06cp76F+xqSZvqIk9pknT0EdT0nXDDxc MB0fQ0LQbCjuW4aCbkzGcF3lNq9C2bl+OPdaK/ZL/T7Y3VMgUm0W878+3+9crH1vuV3uSk 8fEp8tqV2nZGsv6XSCslPwgCC43RmOY= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-551-1W7na1bEPti5lrqJDPRIbg-1; Fri, 26 Mar 2021 11:41:38 -0400 X-MC-Unique: 1W7na1bEPti5lrqJDPRIbg-1 Received: by mail-ej1-f69.google.com with SMTP id e7so4251531ejx.5 for ; Fri, 26 Mar 2021 08:41:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=11n3RGMjxHBqSo7kl9jXsdv4+Yf1mclEiOQFAHX4kgY=; b=TKYQIrYiIZrOnMcCA1n7ok6JhZRw2q0tyMj948TNRBF5hmt8Eby2rZ4IiZSCod5J/W xzT2/lgJp06LLoehvjqmF9zv82JW3L1X8mXKpvS9R6Qkj7h6/qqZW5A4irkrYaMjhtGO 0urtBuVOlx/WtgtIHDZxfXmdwWTmer7CLOmK5RLU6GU+YqqDA/PPITXNO/3BTAxE7/M7 vEcbk/zwDpocwY529xDgIa8Wig3gGrPV4Dx3hFhMKDf22ZUz4ov85Tu6xJ04vuu4k6NJ AKoHAmVRx0nr7BrfXl8lcSyU1lhkbR0Y/UtMzeyNSUv/2NIhBsPO75hyqMTician30HS gy9g== X-Gm-Message-State: AOAM532+ABYaj5e2MQI7rb+t6uiPupvsiN270ZARR5BkLB8NmTGFLQSg KPpDSGbBWpbH0IEIprd3MKXn4IBhogAl6ghBwo1ngZcj+zAcn766gkjRikq9VMbqYrfSCM1SXFT UwOtYrEZMNvV8gToUyCKqS0+POK106D/HqAWSUuQhkimX6DdrTLVQL83Hjrk/lQ4hy2v0 X-Received: by 2002:a17:906:4e99:: with SMTP id v25mr16061898eju.532.1616773296814; Fri, 26 Mar 2021 08:41:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrl9FrQjepFhDFsnpprWLMbrYw4WfQJ8WjXCY/VeDLHG4qNFxmqlxDE8jNET+VF735uVlhbA== X-Received: by 2002:a17:906:4e99:: with SMTP id v25mr16061888eju.532.1616773296671; Fri, 26 Mar 2021 08:41:36 -0700 (PDT) Received: from localhost.localdomain ([84.19.91.9]) by smtp.gmail.com with ESMTPSA id p9sm4389791eds.66.2021.03.26.08.41.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 08:41:36 -0700 (PDT) From: Pavel Reichl To: fstests@vger.kernel.org Cc: zlang@redhat.com, xzhou@redhat.com Subject: [PATCH 1/5] common: Add _require_{chown,chmod}() Date: Fri, 26 Mar 2021 16:41:30 +0100 Message-Id: <20210326154134.309159-2-preichl@redhat.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210326154134.309159-1-preichl@redhat.com> References: <20210326154134.309159-1-preichl@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Add helper function that ensures that test is only executed on file systems that implement chown and chmod. Signed-off-by: Pavel Reichl --- common/rc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/common/rc b/common/rc index 0ce3cb0d..b18d37fd 100644 --- a/common/rc +++ b/common/rc @@ -2129,6 +2129,24 @@ _require_user() [ "$?" == "0" ] || _notrun "$qa_user cannot execute commands." } +# check for a chown support +# +_require_chown() +{ + if [ "$FSTYP" = "exfat" ]; then + _notrun "chown is not supported on $FSTYP" + fi +} + +# check for a chmod support +# +_require_chmod() +{ + if [ "$FSTYP" = "exfat" ]; then + _notrun "chmod is not supported on $FSTYP" + fi +} + # check for a group on the machine, fsgqa as default # _require_group() From patchwork Fri Mar 26 15:41:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Reichl X-Patchwork-Id: 12167037 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08770C433E3 for ; Fri, 26 Mar 2021 15:42:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CC6EF61A43 for ; Fri, 26 Mar 2021 15:42:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230192AbhCZPlw (ORCPT ); Fri, 26 Mar 2021 11:41:52 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:38328 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230249AbhCZPll (ORCPT ); Fri, 26 Mar 2021 11:41:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616773301; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tBH46VgVsNuhboqNNMvhn70GP7sx1dn9/WV1tz/cZGg=; b=Xx7xcC8fin18ZepB1X6gu9kVEqblfq6CnvHXblddyIDUfYHASvGRJsn3zRt4FwQgNv2yQv ZkDVxBGG4ZTmpnRYOEUL2RabJbCzHENlduI/QIgofUKiFNoalQ5cOfcFZj9J16+FMPGPMN kV2IzBgeeGFSi0awktGHAulDn1A660w= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-344-hiTIK22mN1ibluIcdBGq6A-1; Fri, 26 Mar 2021 11:41:39 -0400 X-MC-Unique: hiTIK22mN1ibluIcdBGq6A-1 Received: by mail-ej1-f69.google.com with SMTP id kx22so4257614ejc.17 for ; Fri, 26 Mar 2021 08:41:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tBH46VgVsNuhboqNNMvhn70GP7sx1dn9/WV1tz/cZGg=; b=DrGzYWFpQSGyIs9D6GKdtexpMEQwDGAHaB/wuyuID6Kr6c4wB6Vdbyb59bTjwNKA7/ mVsCysxYZ+pntZg60VZYovuFzVuYPPiEmUWgWoyAOh6EZO4M4eFTjd+xx2TOgSntpPGH xU7Uezu1WQZnCWuMWDbpuCQ5P44RkL8blWNZR+2wJtszRTPWJVuA99ghu6v7a8tIZ4t4 eF7qjCwG1gNviJVXyaWtSOgPOi8rkqfU5YgaBuLxlsMQwlUzfiJFjGZpbl98Cth/m9nO 3QCsFDgxGI/lwQy8l6VNatGHaWNT1G51ePBxHVix9pHenhNoeT1+ny7qx1IQZ+3/vyaZ OE+A== X-Gm-Message-State: AOAM530anjvjmlWLIGwL/JnIny+JVfXBp8/Xs0kqN0zHeW3ml4gD/n68 g/bfZ5fcVj0Ortcwfd/chYPQ1gOVPon1Q4KquTDuXt4dxFJMtr/f8EanerBI1klzBlhalpZYk0J xo+LBate88/fDobUuTSglu+4WYAB/VayibkBh56ZWMqQWx9d1Fiy3+7REzQDSvhnuu7rg X-Received: by 2002:a17:906:f84b:: with SMTP id ks11mr15883459ejb.296.1616773297790; Fri, 26 Mar 2021 08:41:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxkoBqIT9azgy3Skad/Q4EH/6tPODFSaez6ecxseQrbeux7uN3CsR8xXqGKDZB9vWDcOhtBIg== X-Received: by 2002:a17:906:f84b:: with SMTP id ks11mr15883442ejb.296.1616773297636; Fri, 26 Mar 2021 08:41:37 -0700 (PDT) Received: from localhost.localdomain ([84.19.91.9]) by smtp.gmail.com with ESMTPSA id p9sm4389791eds.66.2021.03.26.08.41.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 08:41:37 -0700 (PDT) From: Pavel Reichl To: fstests@vger.kernel.org Cc: zlang@redhat.com, xzhou@redhat.com Subject: [PATCH 2/5] g/87,88,125,126,128,193,314,317,355: Add _require_chown/chmod Date: Fri, 26 Mar 2021 16:41:31 +0100 Message-Id: <20210326154134.309159-3-preichl@redhat.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210326154134.309159-1-preichl@redhat.com> References: <20210326154134.309159-1-preichl@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Signed-off-by: Pavel Reichl --- tests/generic/087 | 1 + tests/generic/088 | 1 + tests/generic/125 | 1 + tests/generic/126 | 1 + tests/generic/128 | 1 + tests/generic/193 | 1 + tests/generic/314 | 1 + tests/generic/317 | 1 + tests/generic/355 | 1 + 9 files changed, 9 insertions(+) diff --git a/tests/generic/087 b/tests/generic/087 index 1f30dbf4..c3576117 100755 --- a/tests/generic/087 +++ b/tests/generic/087 @@ -37,6 +37,7 @@ _cleanup() # real QA test starts here _supported_fs generic _require_test +_require_chown QA_FS_PERMS=$here/src/fs_perms diff --git a/tests/generic/088 b/tests/generic/088 index 9388a083..ad99bd7e 100755 --- a/tests/generic/088 +++ b/tests/generic/088 @@ -29,6 +29,7 @@ _filter() # real QA test starts here _supported_fs generic _require_test +_require_chown path=$TEST_DIR/t_access $here/src/t_access_root $path | tee $seqres.full | _filter diff --git a/tests/generic/125 b/tests/generic/125 index e84248d3..8c8f5cd7 100755 --- a/tests/generic/125 +++ b/tests/generic/125 @@ -25,6 +25,7 @@ _supported_fs generic _require_test _require_user _require_odirect +_require_chmod TESTDIR=$TEST_DIR/ftrunc TESTFILE=$TESTDIR/ftrunc.tmp diff --git a/tests/generic/126 b/tests/generic/126 index ac25d294..636ca00d 100755 --- a/tests/generic/126 +++ b/tests/generic/126 @@ -27,6 +27,7 @@ _cleanup() # real QA test starts here _supported_fs generic _require_test +_require_chown QA_FS_PERMS=$here/src/fs_perms diff --git a/tests/generic/128 b/tests/generic/128 index b3e49eff..c1eae77a 100755 --- a/tests/generic/128 +++ b/tests/generic/128 @@ -24,6 +24,7 @@ _supported_fs generic _require_scratch _require_user +_require_chmod _scratch_mkfs >/dev/null 2>&1 _scratch_mount "-o nosuid" diff --git a/tests/generic/193 b/tests/generic/193 index 3125efdd..fd0ebbf6 100755 --- a/tests/generic/193 +++ b/tests/generic/193 @@ -56,6 +56,7 @@ _supported_fs generic _require_test _require_user +_require_chown test_root=$TEST_DIR/$seq.$$.root test_user=$TEST_DIR/$seq.$$.user diff --git a/tests/generic/314 b/tests/generic/314 index 03df81ce..540f0feb 100755 --- a/tests/generic/314 +++ b/tests/generic/314 @@ -29,6 +29,7 @@ _cleanup() _supported_fs generic _require_test _require_user +_require_chown rm -rf $TEST_DIR/$seq-dir diff --git a/tests/generic/317 b/tests/generic/317 index 29c37a57..289dfabe 100755 --- a/tests/generic/317 +++ b/tests/generic/317 @@ -45,6 +45,7 @@ _require_scratch _require_user _require_ugid_map _require_userns +_require_chown qa_user_id=`id -u $qa_user` _filter_output() diff --git a/tests/generic/355 b/tests/generic/355 index 161dd042..74fba0f9 100755 --- a/tests/generic/355 +++ b/tests/generic/355 @@ -32,6 +32,7 @@ _supported_fs generic _require_test _require_user _require_odirect +_require_chown testfile=$TEST_DIR/$seq.test rm -f $testfile From patchwork Fri Mar 26 15:41:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Reichl X-Patchwork-Id: 12167041 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50787C433C1 for ; Fri, 26 Mar 2021 15:42:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2242861A1E for ; Fri, 26 Mar 2021 15:42:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230337AbhCZPm0 (ORCPT ); Fri, 26 Mar 2021 11:42:26 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:60903 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbhCZPlw (ORCPT ); Fri, 26 Mar 2021 11:41:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616773312; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iS+YL2dRDw0JUwIkorm6P2sufQKDI5n+EM+kjcQhL3A=; b=ik9vTEhuGlvrKM8ePUr2U+MVIvGw/8BLdh8hyixCMMW6xboLXNeIp5jJz6azoMMeBHypdd xCRg9jlX0Q8hDjTz0IZCvdSvyYBIjlUdsBCPvIDBVfxrPoERVOka1sLgm81lex2LU7jk0a xnJkjqFOA8MTStEGb8vjBhvNRQSsyEI= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-82-0OQ_1RIOMCym_u-gv1jxeQ-1; Fri, 26 Mar 2021 11:41:40 -0400 X-MC-Unique: 0OQ_1RIOMCym_u-gv1jxeQ-1 Received: by mail-ej1-f72.google.com with SMTP id gn30so4255758ejc.3 for ; Fri, 26 Mar 2021 08:41:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iS+YL2dRDw0JUwIkorm6P2sufQKDI5n+EM+kjcQhL3A=; b=d6ZSs+I0FxdaCPdZn4DyBmGUtPemz72/2hJI2CM+qmtiZFiNq42y3Wrwde2dM2pkf3 Uma27dPBTGWnu8gqkzP+t+aTkhGPBhpCd88nffxzfGiYjgZKLABIQfum5FoYDJXfoRK9 BeX11pRcqoC9oYQb5nmRmBedaEQG9s9cYK+KhoadmNs/blOqe0b8sHL65QzTgDaiO/Gh XrOYhC14v9IdkLdtq62QqLdLG7YLgihqJxCxZtqfjTMvaJXKGTw21M2rkppaDYPiCi/3 ffvhVhaD6K0HXYsgXGSkCmjGRRHnAl7tTNMmBcQ/fboiljsC5W6XVcHT+BFHVNt1v/++ O8wA== X-Gm-Message-State: AOAM532WWN3563OMt9wWkH3FNMSSGThhN9IANy3fbXgxjwla4zFRN6kr AmIg/V0EkwElWe/rwYv/EWQGhVVi3cYr9843RNt08dInWrKjLQtzxf8V+NugcJBeRBojEM486Df 6hRgJSJxcufvZ6WCNFJ4Zkjpy2FGArLeqiZwdd5BxNRVvFA/XyVYUg+NHM2+8cfgdoRNZ X-Received: by 2002:aa7:c98f:: with SMTP id c15mr16207002edt.231.1616773298860; Fri, 26 Mar 2021 08:41:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwd6SMjkesngkbM2G06dhIGF680U/uFDpvwsL5Rvh3393xlAvR4VeFCdlqDs46GKKn7Exju2g== X-Received: by 2002:aa7:c98f:: with SMTP id c15mr16206982edt.231.1616773298673; Fri, 26 Mar 2021 08:41:38 -0700 (PDT) Received: from localhost.localdomain ([84.19.91.9]) by smtp.gmail.com with ESMTPSA id p9sm4389791eds.66.2021.03.26.08.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 08:41:38 -0700 (PDT) From: Pavel Reichl To: fstests@vger.kernel.org Cc: zlang@redhat.com, xzhou@redhat.com Subject: [PATCH 3/5] common: hide permision warning from mkswap for exfat Date: Fri, 26 Mar 2021 16:41:32 +0100 Message-Id: <20210326154134.309159-4-preichl@redhat.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210326154134.309159-1-preichl@redhat.com> References: <20210326154134.309159-1-preichl@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org exfat does not support posix file permisions, so warning from mkswap is inavitable. This patch hides the warning message so the test won't fail. Signed-off-by: Pavel Reichl --- common/rc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/rc b/common/rc index b18d37fd..9977b264 100644 --- a/common/rc +++ b/common/rc @@ -2383,7 +2383,13 @@ _format_swapfile() { # Swap files must be nocow on Btrfs. $CHATTR_PROG +C "$fname" > /dev/null 2>&1 _pwrite_byte 0x61 0 "$sz" "$fname" >> $seqres.full - $MKSWAP_PROG "$fname" >> $seqres.full + if [ "$FSTYP" = "exfat" ]; then + # exfat does not support posix file permisions, so warning is + # to be expected + $MKSWAP_PROG "$fname" 2>&1 | grep -v 'insecure permission' >> $seqres.full + else + $MKSWAP_PROG "$fname" >> $seqres.full + fi } # Check that the filesystem supports swapfiles From patchwork Fri Mar 26 15:41:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Reichl X-Patchwork-Id: 12167033 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F3480C433E0 for ; Fri, 26 Mar 2021 15:42:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B120561A1E for ; Fri, 26 Mar 2021 15:42:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230213AbhCZPlx (ORCPT ); Fri, 26 Mar 2021 11:41:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:57533 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230098AbhCZPlp (ORCPT ); Fri, 26 Mar 2021 11:41:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616773305; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zgYyA8E04umfgr33cgrQ4FyX0gHPN3lDzm6K/C5W2tU=; b=OuEvLnF/N8WVDsjgpnLsa3bVsOvqlsWWUGyGp1A6BbBTMFmf6jnP6+blkJdpe1lheEoCvl OP8F8iGfacOzX0kmRu8tbzM9B79VbG59yItk0uUjn4xW9X5KZK2Juz2Bjz8aoCrPpASVzy XNq6O6xD3YPYsYdlEmju+9jYi73EkJw= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-188-rTw4JjHYOlyI1kAre_sSsg-1; Fri, 26 Mar 2021 11:41:42 -0400 X-MC-Unique: rTw4JjHYOlyI1kAre_sSsg-1 Received: by mail-ed1-f69.google.com with SMTP id r6so1131879edh.7 for ; Fri, 26 Mar 2021 08:41:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zgYyA8E04umfgr33cgrQ4FyX0gHPN3lDzm6K/C5W2tU=; b=JvztUqZPP+yeav8+fXVzNAUrSUCwliSyeiCE6a4WQrZ9f/tMd4xzgBLABPKcc8YxqJ eP5TDGVqv3rNU5bPmHh4grkgAaszP4yoQXqp9+laMf3fSByYSBSlS65n3wo0x29eKqg8 RfjlsGN4OJx511czzchMucY07PE6rfPg8EkFoV3RBEq1EyorV2xQjIjt5y6uglb2KvW7 Tv5G0EIfBu4N6DqEXS2c3RXVKknrmUNdChx6F/P61JkMixvIhRQ/CvJ7tzwzIX53sWdc M7DmXvgvgy4Ym7nVx4Qnf0ydHhGP4Q23pz+DivhXIZjrup+2a5keJ8kdxlpeyTbaDveO 6LBQ== X-Gm-Message-State: AOAM530fiDfU/PRXdOyPWhlWPOirbpIo6ORTsC3SMH4VQxZ307bdo1sV EEa9zjvcdEvRB5+BGQRP3V7/35OwPkN/EkJn5Nr8apEv09LDQzuqECHM4G7jDSnajwjVcnqr1lH Pz/f9hld7JhzW0mkijp+wA9viqpqtCfL6t930akCzc02ImpkMptwKjpLrI+3KbORFwEqK X-Received: by 2002:a17:906:eda3:: with SMTP id sa3mr15961113ejb.147.1616773299990; Fri, 26 Mar 2021 08:41:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwThHwRlqqAY/a9QvNlBqD86j8aJFvvhdQHotP9caHD+JEqtuOmwbjzklVaVT4VuJ81rWMAWQ== X-Received: by 2002:a17:906:eda3:: with SMTP id sa3mr15961084ejb.147.1616773299753; Fri, 26 Mar 2021 08:41:39 -0700 (PDT) Received: from localhost.localdomain ([84.19.91.9]) by smtp.gmail.com with ESMTPSA id p9sm4389791eds.66.2021.03.26.08.41.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 08:41:39 -0700 (PDT) From: Pavel Reichl To: fstests@vger.kernel.org Cc: zlang@redhat.com, xzhou@redhat.com Subject: [PATCH 4/5] generic/554: hide permision warning on exfat Date: Fri, 26 Mar 2021 16:41:33 +0100 Message-Id: <20210326154134.309159-5-preichl@redhat.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210326154134.309159-1-preichl@redhat.com> References: <20210326154134.309159-1-preichl@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Signed-off-by: Pavel Reichl --- tests/generic/554 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/generic/554 b/tests/generic/554 index fa4f97d2..365628e2 100755 --- a/tests/generic/554 +++ b/tests/generic/554 @@ -46,7 +46,15 @@ $XFS_IO_PROG -f -c "pwrite -S 0x61 0 128k" $SCRATCH_MNT/file >> $seqres.full 2>& echo swap files return ETXTBUSY _format_swapfile $SCRATCH_MNT/swapfile 16m -swapon $SCRATCH_MNT/swapfile +if [ "$FSTYP" = "exfat" ]; then + # exfat does not support posix file permisions, so warning is + # to be expected + swapon $SCRATCH_MNT/swapfile 2>&1 |\ + grep -v 'insecure permission' >> $seqres.full +else + swapon $SCRATCH_MNT/swapfile +fi + $XFS_IO_PROG -f -c "copy_range -l 32k $SCRATCH_MNT/file" $SCRATCH_MNT/swapfile swapoff $SCRATCH_MNT/swapfile From patchwork Fri Mar 26 15:41:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Reichl X-Patchwork-Id: 12167039 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FBDBC433E5 for ; Fri, 26 Mar 2021 15:42:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 098F161A32 for ; Fri, 26 Mar 2021 15:42:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230225AbhCZPlx (ORCPT ); Fri, 26 Mar 2021 11:41:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:38005 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230253AbhCZPlr (ORCPT ); Fri, 26 Mar 2021 11:41:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616773306; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LkJ6qWHxSfuxNqvg132bNGuMpPuVn9GLJ8yG6ihh9YQ=; b=bogh1sd2JpSv2ToNLH7hXLITSqB/gXHrfCf03qXCJiC78mDED2BwhKzNgLlZLuFQCOy3QO gs6M+0V42B0wDo1AZv6tu1cfSqrycf7g5uktUjoUyyhrHhrjqT2mHUUNKZ4tI2p8BRM8a7 fUaAcT/2O7aS1lB5vSvpHdI2XcnvLv4= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-458-LIagPlV0Mb-30ZBCKAAcUQ-1; Fri, 26 Mar 2021 11:41:43 -0400 X-MC-Unique: LIagPlV0Mb-30ZBCKAAcUQ-1 Received: by mail-ed1-f72.google.com with SMTP id h2so4609772edw.10 for ; Fri, 26 Mar 2021 08:41:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LkJ6qWHxSfuxNqvg132bNGuMpPuVn9GLJ8yG6ihh9YQ=; b=JdWqmgacH4BXn9nPXxM//3MVuuwQRPE5qSYqbgRcOKNpxVDC241tEiNUp5wS4XA2CL 2UL9xO5qwMNmsGdwKSeP1jPELlxjfwPtM751PfhtZA2tM6/WrkByriTOz54n+dJHB20N AXBNVMmW4o5TRhS2nxuqVRf6uyDYBn6qYlyqMe2E/I7i41RInF8qbrZbZmEy6P6kiodx R/8OMGyYLvFbXI6Y1p3AZ5+SfMuOjt1bgO0jmApbIFMz81wO+WvWE2vL52BN4rDW8WUm YguBSDNJPr5gBV9gprXbqOaSuhnL3bQjXBtSgi9cyaQv5/bsIUm1O1kXOI6uPnonYozx HIqw== X-Gm-Message-State: AOAM5326VZ6GLd+yGFKOuaq/IGpUzajIt4JVkvxvMkP4iV2T3iUnuoGc BTD8HXDD4yvjegVn7t9XNuIPb02un2ITYMRTJXUDIF9oDUvMD0xkNuSp2saz6JlEAJbLt4S9HVK 7D7j9hhelh53XUTNpWb7BUpxjx8QZMQv3Kt1qzNsyoKvlFT44025EgKWz0Ygpq33K7iop X-Received: by 2002:a05:6402:1051:: with SMTP id e17mr15931672edu.42.1616773301745; Fri, 26 Mar 2021 08:41:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxx7vWLjFsd1WEpsh7V5plJI4CqA2p5Czt0YjSI9gzfkGq8XfpnV5kqRzBg95RHHh0bgaRKQA== X-Received: by 2002:a05:6402:1051:: with SMTP id e17mr15931660edu.42.1616773301597; Fri, 26 Mar 2021 08:41:41 -0700 (PDT) Received: from localhost.localdomain ([84.19.91.9]) by smtp.gmail.com with ESMTPSA id p9sm4389791eds.66.2021.03.26.08.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Mar 2021 08:41:41 -0700 (PDT) From: Pavel Reichl To: fstests@vger.kernel.org Cc: zlang@redhat.com, xzhou@redhat.com Subject: [PATCH 5/5] generic/003: Amend the test for exfat Date: Fri, 26 Mar 2021 16:41:34 +0100 Message-Id: <20210326154134.309159-6-preichl@redhat.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210326154134.309159-1-preichl@redhat.com> References: <20210326154134.309159-1-preichl@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org Update the test so it can be run even for exfat which has 2 seconds granularity for access_time and does not have a timestamp for metadata change. Signed-off-by: Pavel Reichl --- tests/generic/003 | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/tests/generic/003 b/tests/generic/003 index ec4fdfc1..39596665 100755 --- a/tests/generic/003 +++ b/tests/generic/003 @@ -37,6 +37,13 @@ _require_relatime rm -f $seqres.full +if [ "$FSTYP" = "exfat" ]; then + # exfat's timestamp for access_time has double seconds granularity + access_delay=2 +else + access_delay=1 +fi + _stat() { stat -c "%x;%y;%z" $1 } @@ -79,14 +86,14 @@ echo "aaa" > $TPATH/dir1/file1 file1_stat_before_first_access=`_stat $TPATH/dir1/file1` # Accessing file1 the first time -sleep 1 +sleep $access_delay cat $TPATH/dir1/file1 > /dev/null file1_stat_after_first_access=`_stat $TPATH/dir1/file1` _compare_stat_times YNN "$file1_stat_before_first_access" \ "$file1_stat_after_first_access" "after accessing file1 first time" # Accessing file1 a second time -sleep 1 +sleep $access_delay cat $TPATH/dir1/file1 > /dev/null file1_stat_after_second_access=`_stat $TPATH/dir1/file1` _compare_stat_times NNN "$file1_stat_after_first_access" \ @@ -109,7 +116,7 @@ _compare_stat_times NYY "$dir2_stat_before_file_creation" \ # Accessing file2 file2_stat_before_first_access=`_stat $TPATH/dir2/file2` -sleep 1 +sleep $access_delay cat $TPATH/dir2/file2 > /dev/null file2_stat_after_first_access=`_stat $TPATH/dir2/file2` _compare_stat_times YNN "$file2_stat_before_first_access" \ @@ -135,11 +142,15 @@ echo "xyz" > $TPATH/dir1/file1 file1_stat_after_modify=`_stat $TPATH/dir1/file1` _compare_stat_times NYY "$file1_stat_before_modify" \ "$file1_stat_after_modify" "after modifying file1" -sleep 1 -mv $TPATH/dir1/file1 $TPATH/dir1/file1_renamed -file1_stat_after_change=`_stat $TPATH/dir1/file1_renamed` -_compare_stat_times NNY "$file1_stat_after_modify" \ - "$file1_stat_after_change" "after changing file1" + +# exfat does not support last metadata change timestamp +if [ "$FSTYP" != "exfat" ]; then + sleep 1 + mv $TPATH/dir1/file1 $TPATH/dir1/file1_renamed + file1_stat_after_change=`_stat $TPATH/dir1/file1_renamed` + _compare_stat_times NNY "$file1_stat_after_modify" \ + "$file1_stat_after_change" "after changing file1" +fi # Mounting with strictatime option and # accessing a previously created file twice @@ -148,7 +159,7 @@ cat $TPATH/dir2/file3 > /dev/null file3_stat_after_second_access=`_stat $TPATH/dir2/file3` _compare_stat_times YNN "$file3_stat_after_first_access" \ "$file3_stat_after_second_access" "after accessing file3 second time" -sleep 1 +sleep $access_delay cat $TPATH/dir2/file3 > /dev/null file3_stat_after_third_access=`_stat $TPATH/dir2/file3` _compare_stat_times YNN "$file3_stat_after_second_access" \