mbox series

[0/4] btrfs-progs: make some of the fsck-tests run without root

Message ID cover.1681150198.git.josef@toxicpanda.com (mailing list archive)
Headers show
Series btrfs-progs: make some of the fsck-tests run without root | expand

Message

Josef Bacik April 10, 2023, 6:11 p.m. UTC
Hello,

While running tests on my ctree sync patches I noticed these tests were failing
when I ran as a normal user.  Most of them are just needing to call
setup_root_helper before calling the loop device helpers, some need a
$SUDO_HELPER added to a few places.  With these patches in place I can run make
test-fsck as a normal user.  Thanks,

Josef

Josef Bacik (4):
  btrfs-progs: fix fsck-tests/056 to run without root
  btrfs-progs: fix fsck-tests/057 to run without root
  btrfs-progs: fix fsck-tests/059 to run without root
  btrfs-progs: fix fsck-tests/060 to run without root

 tests/fsck-tests/056-raid56-false-alerts/test.sh | 6 +++---
 tests/fsck-tests/057-seed-false-alerts/test.sh   | 8 ++++----
 tests/fsck-tests/059-shrunk-device/test.sh       | 4 ++--
 tests/fsck-tests/060-degraded-check/test.sh      | 4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

Comments

Neal Gompa April 11, 2023, 5 p.m. UTC | #1
On Mon, Apr 10, 2023 at 2:13 PM Josef Bacik <josef@toxicpanda.com> wrote:
>
> Hello,
>
> While running tests on my ctree sync patches I noticed these tests were failing
> when I ran as a normal user.  Most of them are just needing to call
> setup_root_helper before calling the loop device helpers, some need a
> $SUDO_HELPER added to a few places.  With these patches in place I can run make
> test-fsck as a normal user.  Thanks,
>
> Josef
>
> Josef Bacik (4):
>   btrfs-progs: fix fsck-tests/056 to run without root
>   btrfs-progs: fix fsck-tests/057 to run without root
>   btrfs-progs: fix fsck-tests/059 to run without root
>   btrfs-progs: fix fsck-tests/060 to run without root
>
>  tests/fsck-tests/056-raid56-false-alerts/test.sh | 6 +++---
>  tests/fsck-tests/057-seed-false-alerts/test.sh   | 8 ++++----
>  tests/fsck-tests/059-shrunk-device/test.sh       | 4 ++--
>  tests/fsck-tests/060-degraded-check/test.sh      | 4 ++--
>  4 files changed, 11 insertions(+), 11 deletions(-)
>
> --
> 2.39.2
>

LGTM.

Reviewed-by: Neal Gompa <neal@gompa.dev>



--
真実はいつも一つ!/ Always, there's only one truth!
David Sterba April 11, 2023, 11:56 p.m. UTC | #2
On Mon, Apr 10, 2023 at 02:11:30PM -0400, Josef Bacik wrote:
> Hello,
> 
> While running tests on my ctree sync patches I noticed these tests were failing
> when I ran as a normal user.  Most of them are just needing to call
> setup_root_helper before calling the loop device helpers, some need a
> $SUDO_HELPER added to a few places.  With these patches in place I can run make
> test-fsck as a normal user.  Thanks,
> 
> Josef
> 
> Josef Bacik (4):
>   btrfs-progs: fix fsck-tests/056 to run without root
>   btrfs-progs: fix fsck-tests/057 to run without root
>   btrfs-progs: fix fsck-tests/059 to run without root
>   btrfs-progs: fix fsck-tests/060 to run without root

Added to devel, thanks. I went through all other tests, there are some
more missing helper setup calls but they're also called within some
other helpers (like run_check_mkfs_test_dev). I've added them for
clarity.