From patchwork Mon Apr 10 18:11:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13206568 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CF15FC76196 for ; Mon, 10 Apr 2023 18:11:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230376AbjDJSLl (ORCPT ); Mon, 10 Apr 2023 14:11:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230360AbjDJSLk (ORCPT ); Mon, 10 Apr 2023 14:11:40 -0400 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFBF9CF for ; Mon, 10 Apr 2023 11:11:39 -0700 (PDT) Received: by mail-qt1-x829.google.com with SMTP id a23so3003370qtj.8 for ; Mon, 10 Apr 2023 11:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20210112.gappssmtp.com; s=20210112; t=1681150298; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=n5LOafPib8IS/uhwsznow4aO6Exeoh/RG+Zl/0GljYc=; b=N7JVm+5n/nGlQ9JjfPCtMan9aGVJT8O+cQ5pOX0ux8Ea6IBsOP50mh3S5PutQmAbNE dCAcRianoqgQwEST87pXZuCCvd3C5BUtjrcxCCIHiMP+0cE6nRH0uKCy6lIDu43/sTme F6/IBpA3+AHgPhr0MOlS25QG7ozMvuVoyUsxHyivJGQc95ehO5NKUnvVpLQgsusxF9E8 Hi3XPidQkWzCbqgqXWe+8zqiquaN5VJ+NJJ1MBrAxjhExQUl6P3/YQtiNmvSlsLfeeS9 /qKhEyeCNBIi4T+vQQna72n8vXNvPTGLZlq6FgHw9O0AL8B5xmXIKGOdUEewuaEKbkyH WcgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681150298; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=n5LOafPib8IS/uhwsznow4aO6Exeoh/RG+Zl/0GljYc=; b=qa5k0Vpvnaum55wb9fwkHdQLIZaFBqLe/s9270Q3LOur5cq4zaMzlaFoJEGdulp4eX pAB7KKsVX3M2LMVAHXG4g55jFp1UJ/j+pGWD9RcBH+r08N2TrltZ5ztmV8C2Z6dnVYoO lTeI9BA1TgQ7k+THh8axhZvbYIcvK1HAnn9gjL2b9CIN0jdkXNBh6TeOBwRxGNLDOxLZ ENdyB8J1NlF4YaO0sXelgqVxoJf0LPgtI7f7BkQvfCzFw9sQpzEuiWCNMEvNMR7JiwY4 QRfC1EnxWuJiiVBGN2Nmt6ArkDH9KbKqFBhlOg//Zy3DW5LuRBHBXEj2hGmwSLumwWGH 6P6A== X-Gm-Message-State: AAQBX9el1h01SEyTa0CbDhNUft5ZZDZdB8kZ/fnrfP6Jy5Rcv3bQJ4tP rizqE70NCj2yF9wvFt/n/i+moNdckMe6M9ZBkGn7yA== X-Google-Smtp-Source: AKy350YvDGrTgm32l5QVPNV2zpCYsdNwPer+Pcy6Ey0yVvgOWtSBVOYljg5SZmFKh2vnYvLr+t78ZA== X-Received: by 2002:a05:622a:c5:b0:3e6:2e95:b90c with SMTP id p5-20020a05622a00c500b003e62e95b90cmr21781876qtw.8.1681150298178; Mon, 10 Apr 2023 11:11:38 -0700 (PDT) Received: from localhost (hs-nc-a03feba254-450087-1.tingfiber.com. [64.98.124.17]) by smtp.gmail.com with ESMTPSA id n9-20020a374009000000b00742bc037f29sm3420984qka.120.2023.04.10.11.11.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 11:11:37 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org Subject: [PATCH 1/4] btrfs-progs: fix fsck-tests/056 to run without root Date: Mon, 10 Apr 2023 14:11:31 -0400 Message-Id: <9c27fc4cb1f2d0bbf215afa2f1388d927cd0f239.1681150198.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org We need to make sure the root helper is setup before calling the loop helpers, and additionally we need to use $SUDO_HELPER when we run the final btrfs check. With this patch we can now run this test as a normal user. Signed-off-by: Josef Bacik --- tests/fsck-tests/056-raid56-false-alerts/test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fsck-tests/056-raid56-false-alerts/test.sh b/tests/fsck-tests/056-raid56-false-alerts/test.sh index 6efb5c00..fcd37971 100755 --- a/tests/fsck-tests/056-raid56-false-alerts/test.sh +++ b/tests/fsck-tests/056-raid56-false-alerts/test.sh @@ -10,13 +10,13 @@ check_prereq btrfs check_prereq mkfs.btrfs check_global_prereq losetup +setup_root_helper + setup_loopdevs 3 prepare_loopdevs dev1=${loopdevs[1]} TEST_DEV=$dev1 -setup_root_helper - run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f -m raid1 -d raid5 "${loopdevs[@]}" run_check_mount_test_dev @@ -26,6 +26,6 @@ run_check $SUDO_HELPER dd if=/dev/urandom of="$TEST_MNT/file" bs=16K count=1 \ run_check_umount_test_dev # Check data csum should not report false alerts -run_check "$TOP/btrfs" check --check-data-csum "$dev1" +run_check $SUDO_HELPER "$TOP/btrfs" check --check-data-csum "$dev1" cleanup_loopdevs From patchwork Mon Apr 10 18:11:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13206569 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E8D3C77B61 for ; Mon, 10 Apr 2023 18:11:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230427AbjDJSLo (ORCPT ); Mon, 10 Apr 2023 14:11:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230360AbjDJSLn (ORCPT ); Mon, 10 Apr 2023 14:11:43 -0400 Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E07EB211D for ; Mon, 10 Apr 2023 11:11:42 -0700 (PDT) Received: by mail-qv1-xf31.google.com with SMTP id ek19so3787010qvb.9 for ; Mon, 10 Apr 2023 11:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20210112.gappssmtp.com; s=20210112; t=1681150301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=kDetk/ZcPa1/O+q5LxgrOvvrINk/K7rb1TrNcZk/pmw=; b=tX/i1r7kI36cAiF5hhpeIh4jjQr3Ii5WRsziWsbX/Q5n72M53OfE21Q4IiQhQhzjUB y+nzhM1ar7DhRUeDS2IWoz4d+AeOHTII1181pB7lLFtCGiVSGYJ7cSTPDAaF/ksIJ20c p07OSAfTv5D82bwwu9pONucsETyGfVX6V61dUovcAYlDKnQkUDAi7g/kZLaxfw+7anvh A52japNABybyNMkHWZVdU9gFHtzz+MuEV7AiGpgXbtSLQK15pHiXl7A+vf8ePWqNbG/A mxUQBjw1Gve9CAcbz5D6Be5pKBslve1aSC0qGbUSYr8Rf+gAyg0m+jlQ6y8JgXfAKGSl Wrcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681150301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kDetk/ZcPa1/O+q5LxgrOvvrINk/K7rb1TrNcZk/pmw=; b=NLTE7R8HeCMgJMnxkoTdfMKIbVCAylYXQJBhl7sT+hkPTiayMePxbTwc0W/kaG5219 b6mMRIf08W23kJdlRdnqTDy/y0/TZgFQ90awy80MYgLQakwI0DSWOPjgOWymDOTlb71b vV25yG72M0OeNKFVGxWp71/e6uxaSSn/IIObZxoADxUP9U2hAd21YdEZwNNwWAR/dUo7 H9v7RyytfRZBZlgmCneaKBP3TN9EnlQ5DEzY8gLc3gR3OhKqROze2T8zo5ooK67BwXlA YUIYkicTixwdvZh/wTdphoDwg4PuaTEt1dNTCfhhLJelOdmnz3ilyVNBpEaYkBW3emgU 7E2Q== X-Gm-Message-State: AAQBX9e1/P2b4WZLXbn+slVQFLuYkkxw+1+O+qMPbTwtr5skPyuDy6FS nZJ0dmaQUMZBz5feRosIwYH97Wt6JbkxeWfEvts3BA== X-Google-Smtp-Source: AKy350bAe9HNV8NzVkPguRndVCf1piEsG0IZl6C1W7B4dRlhm+t7nu/EO5NS0PkY3PDo3Ck9CNFhZQ== X-Received: by 2002:a05:6214:1d24:b0:5cc:75c7:8f19 with SMTP id f4-20020a0562141d2400b005cc75c78f19mr19329656qvd.10.1681150300212; Mon, 10 Apr 2023 11:11:40 -0700 (PDT) Received: from localhost (hs-nc-a03feba254-450087-1.tingfiber.com. [64.98.124.17]) by smtp.gmail.com with ESMTPSA id b4-20020ac84f04000000b003e6499b7d56sm3131581qte.88.2023.04.10.11.11.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 11:11:39 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org Subject: [PATCH 2/4] btrfs-progs: fix fsck-tests/057 to run without root Date: Mon, 10 Apr 2023 14:11:32 -0400 Message-Id: <2af7c2b6d02828efdb5821e1219eb34cd710e432.1681150198.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org The setup_root_helper needs to be called before messing with the loop devices, and btrfs check needs to be run with $SUDO_HELPER. Signed-off-by: Josef Bacik --- tests/fsck-tests/057-seed-false-alerts/test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/fsck-tests/057-seed-false-alerts/test.sh b/tests/fsck-tests/057-seed-false-alerts/test.sh index 1d5ad878..4af83c92 100755 --- a/tests/fsck-tests/057-seed-false-alerts/test.sh +++ b/tests/fsck-tests/057-seed-false-alerts/test.sh @@ -10,14 +10,14 @@ check_prereq mkfs.btrfs check_prereq btrfstune check_global_prereq losetup +setup_root_helper + setup_loopdevs 2 prepare_loopdevs dev1=${loopdevs[1]} dev2=${loopdevs[2]} TEST_DEV=$dev1 -setup_root_helper - run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f "$dev1" run_check $SUDO_HELPER "$TOP/btrfstune" -S 1 "$dev1" run_check_mount_test_dev @@ -32,8 +32,8 @@ sprouted_output=$(_mktemp btrfs-progs-sprouted-check-stdout.XXXXXX) # The false alerts are just warnings, so we need to save and filter # the output -run_check_stdout "$TOP/btrfs" check "$dev1" >> "$seed_output" -run_check_stdout "$TOP/btrfs" check "$dev2" >> "$sprouted_output" +run_check_stdout $SUDO_HELPER "$TOP/btrfs" check "$dev1" >> "$seed_output" +run_check_stdout $SUDO_HELPER "$TOP/btrfs" check "$dev2" >> "$sprouted_output" # There should be no warning for both seed and sprouted fs if grep -q "WARNING" "$seed_output"; then From patchwork Mon Apr 10 18:11:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13206570 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 176C5C77B61 for ; Mon, 10 Apr 2023 18:11:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230433AbjDJSLr (ORCPT ); Mon, 10 Apr 2023 14:11:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230360AbjDJSLq (ORCPT ); Mon, 10 Apr 2023 14:11:46 -0400 Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 800A61BD8 for ; Mon, 10 Apr 2023 11:11:44 -0700 (PDT) Received: by mail-qv1-xf2d.google.com with SMTP id kj14so3843807qvb.12 for ; Mon, 10 Apr 2023 11:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20210112.gappssmtp.com; s=20210112; t=1681150303; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=H+OF44Gq7CfmQwYIXdNAKIqSd5uMmG9ie4pLfwuYJZ8=; b=owrx3fdv+RMFWcLRXrEiYX34EgYidZ+iLlu3937ix5+B98NQydics24tzecA4uJ2Nt 9R66Lk0C6ujfVlXt7DinhcSSBfDO06Wtz4OL+L/51mWURiwkK77IqR6cmH9m0G4fTN8U UgnmNooYO7Pnj4o/7pibpcHTnd9FoT/9DrU8lo+PYUibeJcYJz3pirHbhNihDX83Amgw ame7jKNhMaMHVIYMsBcp9/pNR0CNKdROZ7dLwKlopobgTb7+325VAYjfBc2e/Xc6MJCW kL1e9wcI1OekNUsyeZFqRJ33JzeIwUfOUmeA7ZjmcXIhD9LImUKHtahfbuL6qFzr6McV qv4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681150303; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H+OF44Gq7CfmQwYIXdNAKIqSd5uMmG9ie4pLfwuYJZ8=; b=VVQJ5w3LnXiLzjqlrA5YYmJ08iD/HcDYgNHaV4eUIqpGEN9Z4BLqQOe9qjn3+ZkuZM a/5SkZW5qoXmiS6t4VZw813LhxLWG9v/ZnHOw6u8tKhJ9WXmh7F09KdHOT3Ec2gObNbB frC6RUT0uOFxwREdJzGAp8+YHTn4twZUmpgKKlypANF5CF9I2FG/TzkdZTzJU6eh6lY4 oocCh3B9WbApBBO+8z5n3NUFutae9zxYpUUFx2NMLoKE6BKWYheIwp81AD9WdGbppu4/ urXSEg7aoJXqTnfN8y9eipehknpRs+Qi7F1/N2JKjphsAcJV4a87l/StFkPXt9XGWR45 oqXA== X-Gm-Message-State: AAQBX9cb1iHGrxyjOOWIRMBRVodXhrOnY2YTnF4PIdqi5zxqLNRe26ki jX2xVbFyZnk6a+B/4mPwQR7NuHTAgEQ+7nGeLb08sg== X-Google-Smtp-Source: AKy350a5xLveGnRPV0oar6evEhfx4lu7fNYcDZN/Kw5lhd5rucBIuGyYhQmVWc8KGQPfH3zNcbvY0w== X-Received: by 2002:ad4:5ccf:0:b0:5a9:d6dd:271f with SMTP id iu15-20020ad45ccf000000b005a9d6dd271fmr16509197qvb.23.1681150303090; Mon, 10 Apr 2023 11:11:43 -0700 (PDT) Received: from localhost (hs-nc-a03feba254-450087-1.tingfiber.com. [64.98.124.17]) by smtp.gmail.com with ESMTPSA id da7-20020a05621408c700b005dd8b9345fasm3503581qvb.146.2023.04.10.11.11.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 11:11:42 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org Subject: [PATCH 3/4] btrfs-progs: fix fsck-tests/059 to run without root Date: Mon, 10 Apr 2023 14:11:33 -0400 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org We missed a couple of $SUDO_HELPER uses in this test that made it impossible to run without root. Add them in so we can run as a normal user. Signed-off-by: Josef Bacik --- tests/fsck-tests/059-shrunk-device/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fsck-tests/059-shrunk-device/test.sh b/tests/fsck-tests/059-shrunk-device/test.sh index 140ee3a4..3ac2640f 100755 --- a/tests/fsck-tests/059-shrunk-device/test.sh +++ b/tests/fsck-tests/059-shrunk-device/test.sh @@ -14,7 +14,7 @@ _mktemp_local "$file" 1g dev=$(run_check_stdout $SUDO_HELPER losetup --find --show "$file") -run_check "$TOP/mkfs.btrfs" -f "$dev" +run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f "$dev" # The original device size from prepare_loopdevs is 2G. # Since the fs is empty, shrinking it to 996m will not cause any @@ -26,5 +26,5 @@ dev=$(run_check_stdout $SUDO_HELPER losetup --find --show "$file") run_mustfail "btrfs check should detect errors in device size" \ "$TOP/btrfs" check "$dev" -losetup -d "$dev" +$SUDO_HELPER losetup -d "$dev" rm -- "$file" From patchwork Mon Apr 10 18:11:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 13206571 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A44F0C76196 for ; Mon, 10 Apr 2023 18:11:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230444AbjDJSLs (ORCPT ); Mon, 10 Apr 2023 14:11:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230443AbjDJSLr (ORCPT ); Mon, 10 Apr 2023 14:11:47 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 638C4198C for ; Mon, 10 Apr 2023 11:11:46 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id x17so24631416qtv.7 for ; Mon, 10 Apr 2023 11:11:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20210112.gappssmtp.com; s=20210112; t=1681150305; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=CIkUkXhQYF2fir5Te0uHuQwCkBepWX/ri7xRzRhUbzk=; b=kF44Cg8Ob8+BI4S9GUPCkMM6C3vUDWZKZ2F+C2iQf93RiyzkyvfHTLaCk0+whjTpQT 6wzBoSbACwA/2R7gxOdNl6gr4n2B83/o9Bce6/LzedYdxxeRMASYVHLtusDaUrbMZbsK uNke4bA8VVijSwdH49CYpFgQWFvkjACbfy98pjSsG8t0vZurcbMeOdv7BM+ocHjN1sJX if/OcUAgcKcsUmFjLL6VBb6f+8vHpV4+jicJHJwFkuo8ZukVLDpQ1X7wT63B7hN+Sqwv 6QRedDCBsQDPwD7jslIThEcmOMx2Wq2/Oe//zufDaO3gEzJEyQ68+The14oOooVeVJlY 1GOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681150305; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CIkUkXhQYF2fir5Te0uHuQwCkBepWX/ri7xRzRhUbzk=; b=DMxnhus41hJWsnCBrTWBFcqen8LoRUhh53U+56mS36+rKMiThMbYuXZ0GXHxXsWkOA jMBOCL0LyQ5fkETCr39GQ93zzDAti1lk5S52Z03eO/tMD+ZXardVP7WfobC5HtfBGun/ T8Yqwg+EvHedN2q0S79Ckm79wIkjJIwNvxBX9/8Fc92WetN5Qc2BC0CwanlYcXhpm+NC rG+EB8LoVs4fWgSfRswFovIyAUe9f9B4WvKq9hH8A5ZSC/qD8S8wUhVNt6BF2/nnMIPk a+60IrTwBD/0vjdnANE46NTTAwtOjzMMxqzNayJ8DpL+23GARbc0D8wsULvIvivepbl/ 9BnA== X-Gm-Message-State: AAQBX9c/MZ0sPZn6b1OjqkTlJ1wpT5IXo+6mNqU6mdnXTiGxfb31ZTt4 d67rN9+JnfxJYM7l+31twZwSvGQVAbOLMbfHudzKdw== X-Google-Smtp-Source: AKy350ZSd9xGFAjlvkYe8feAUr8GyVdJFxD9eaQJvE7ScTEefpUg6HnRS6IaIgXdOECHPrxjpKT6Dw== X-Received: by 2002:ac8:7fd4:0:b0:3e3:8427:fb51 with SMTP id b20-20020ac87fd4000000b003e38427fb51mr18427825qtk.23.1681150304824; Mon, 10 Apr 2023 11:11:44 -0700 (PDT) Received: from localhost (hs-nc-a03feba254-450087-1.tingfiber.com. [64.98.124.17]) by smtp.gmail.com with ESMTPSA id o5-20020ac872c5000000b003c033b23a9asm3119124qtp.12.2023.04.10.11.11.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 11:11:44 -0700 (PDT) From: Josef Bacik To: linux-btrfs@vger.kernel.org Subject: [PATCH 4/4] btrfs-progs: fix fsck-tests/060 to run without root Date: Mon, 10 Apr 2023 14:11:34 -0400 Message-Id: <9fcda5f1661f9c15fe9514f3d8aa0e34a9f9b23c.1681150198.git.josef@toxicpanda.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org We need to call the setup_root_helper before we start messing with the loop devices. Signed-off-by: Josef Bacik --- tests/fsck-tests/060-degraded-check/test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fsck-tests/060-degraded-check/test.sh b/tests/fsck-tests/060-degraded-check/test.sh index 6a1f50c8..f185a655 100755 --- a/tests/fsck-tests/060-degraded-check/test.sh +++ b/tests/fsck-tests/060-degraded-check/test.sh @@ -10,14 +10,14 @@ check_prereq mkfs.btrfs check_global_prereq losetup check_global_prereq wipefs +setup_root_helper + setup_loopdevs 3 prepare_loopdevs dev1=${loopdevs[1]} dev2=${loopdevs[2]} dev3=${loopdevs[3]} -setup_root_helper - # Run 1: victim is dev1 run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f -m raid5 -d raid5 "${loopdevs[@]}" run_check $SUDO_HELPER wipefs -fa $dev1