All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: fix path for btrfs-corrupt-block
@ 2020-01-10  9:49 Long An
  2020-01-13 21:52 ` David Sterba
  0 siblings, 1 reply; 6+ messages in thread
From: Long An @ 2020-01-10  9:49 UTC (permalink / raw)
  To: linux-btrfs

btrfs-corrupt-block path is wrong on exported testsutie. Fix this issue
for below tests:
fsck-tests/037-freespacetree-repair
misc-tests/038-backup-root-corruption

Signed-off-by: An Long <lan@suse.com>
---
 tests/fsck-tests/037-freespacetree-repair/test.sh   | 2 +-
 tests/misc-tests/038-backup-root-corruption/test.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/fsck-tests/037-freespacetree-repair/test.sh
b/tests/fsck-tests/037-freespacetree-repair/test.sh
index d7ee0f21..49165fcd 100755
--- a/tests/fsck-tests/037-freespacetree-repair/test.sh
+++ b/tests/fsck-tests/037-freespacetree-repair/test.sh
@@ -46,7 +46,7 @@ corrupt_fst_item()
                _fail "Unknown item type for corruption"
        fi

-       run_check "$TOP/btrfs-corrupt-block" -r 10 -K
"$objectid,$type,$offset" \
+       run_check "$INTERNAL_BIN/btrfs-corrupt-block" -r 10 -K
"$objectid,$type,$offset" \
                -f offset "$TEST_DEV"
 }

diff --git a/tests/misc-tests/038-backup-root-corruption/test.sh
b/tests/misc-tests/038-backup-root-corruption/test.sh
index f15d0bba..a970691b 100755
--- a/tests/misc-tests/038-backup-root-corruption/test.sh
+++ b/tests/misc-tests/038-backup-root-corruption/test.sh
@@ -27,7 +27,7 @@ main_root_ptr=$(dump_super | grep root | head -n1 |
awk '{print $2}')

 [ "$backup2_root_ptr" -eq "$main_root_ptr" ] || _fail "Backup slot 2
is not in use"

-run_check "$TOP/btrfs-corrupt-block" -m $main_root_ptr -f generation
"$TEST_DEV"
+run_check "$INTERNAL_BIN/btrfs-corrupt-block" -m $main_root_ptr -f
generation "$TEST_DEV"

 # Should fail because the root is corrupted
 run_mustfail "Unexpected successful mount" \
--
2.16.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] btrfs-progs: fix path for btrfs-corrupt-block
  2020-01-10  9:49 [PATCH] btrfs-progs: fix path for btrfs-corrupt-block Long An
@ 2020-01-13 21:52 ` David Sterba
  0 siblings, 0 replies; 6+ messages in thread
From: David Sterba @ 2020-01-13 21:52 UTC (permalink / raw)
  To: Long An; +Cc: linux-btrfs

On Fri, Jan 10, 2020 at 09:49:13AM +0000, Long An wrote:
> btrfs-corrupt-block path is wrong on exported testsutie. Fix this issue
> for below tests:
> fsck-tests/037-freespacetree-repair
> misc-tests/038-backup-root-corruption

Thanks, btrfs-corrupt-block and fssum need to be handled specially for
the testsuite. I found one more test
(fsck-tests/013-extent-tree-rebuild) with wrong path so fixed it as
well.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] btrfs-progs: fix path for btrfs-corrupt-block
       [not found] ` <MN2PR18MB2685D76F7AFF7508E8101982C6380@MN2PR18MB2685.namprd18.prod.outlook.com>
@ 2020-01-10  9:34   ` Long An
  0 siblings, 0 replies; 6+ messages in thread
From: Long An @ 2020-01-10  9:34 UTC (permalink / raw)
  To: linux-btrfs

As wenruo said, file generation function might be better.
But I think that even so, it still needs to be fixed.

On Fri, 2020-01-10 at 09:26 +0000, Long An wrote:
> btrfs-corrupt-block path is wrong on exported testsutie. Fix this
> issue
> for below tests:
> fsck-tests/037-freespacetree-repair
> misc-tests/038-backup-root-corruption
> 
> Signed-off-by: An Long <lan@suse.com>
> ---
>  tests/fsck-tests/037-freespacetree-repair/test.sh   | 2 +-
>  tests/misc-tests/038-backup-root-corruption/test.sh | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/fsck-tests/037-freespacetree-repair/test.sh
> b/tests/fsck-tests/037-freespacetree-repair/test.sh
> index d7ee0f21..49165fcd 100755
> --- a/tests/fsck-tests/037-freespacetree-repair/test.sh
> +++ b/tests/fsck-tests/037-freespacetree-repair/test.sh
> @@ -46,7 +46,7 @@ corrupt_fst_item()
>                 _fail "Unknown item type for corruption"
>         fi
> 
> -       run_check "$TOP/btrfs-corrupt-block" -r 10 -K
> "$objectid,$type,$offset" \
> +       run_check "$INTERNAL_BIN/btrfs-corrupt-block" -r 10 -K
> "$objectid,$type,$offset" \
>                 -f offset "$TEST_DEV"
>  }
> 
> diff --git a/tests/misc-tests/038-backup-root-corruption/test.sh
> b/tests/misc-tests/038-backup-root-corruption/test.sh
> index f15d0bba..a970691b 100755
> --- a/tests/misc-tests/038-backup-root-corruption/test.sh
> +++ b/tests/misc-tests/038-backup-root-corruption/test.sh
> @@ -27,7 +27,7 @@ main_root_ptr=$(dump_super | grep root | head -n1 |
> awk '{print $2}')
> 
>  [ "$backup2_root_ptr" -eq "$main_root_ptr" ] || _fail "Backup slot 2
> is not in use"
> 
> -run_check "$TOP/btrfs-corrupt-block" -m $main_root_ptr -f generation
> "$TEST_DEV"
> +run_check "$INTERNAL_BIN/btrfs-corrupt-block" -m $main_root_ptr -f
> generation "$TEST_DEV"
> 
>  # Should fail because the root is corrupted
>  run_mustfail "Unexpected successful mount" \
> --
> 2.16.4
> 
> 
-- 
An Long <lan@suse.com>
SUSE SLE-QA , APAC-2 Beijing

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] btrfs-progs: fix path for btrfs-corrupt-block
  2019-12-18 11:26 ` Qu Wenruo
@ 2019-12-19  2:28   ` Long An
  0 siblings, 0 replies; 6+ messages in thread
From: Long An @ 2019-12-19  2:28 UTC (permalink / raw)
  To: linux-btrfs, quwenruo.btrfs

Sorry for mistake. I'll resend ASAP.

On Wed, 2019-12-18 at 19:26 +0800, Qu Wenruo wrote:
> On 2019/12/18 下午6:30, Long An wrote:
> > 
> 
> Is that only me? I see nothing but blank.
> 
> And raw mail shows nothing but different headers.
> 
> Thanks,
> Qu
> 
-- 
An Long <lan@suse.com>
SUSE SLE-QA , APAC-2 Beijing

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] btrfs-progs: fix path for btrfs-corrupt-block
  2019-12-18 10:30 Long An
@ 2019-12-18 11:26 ` Qu Wenruo
  2019-12-19  2:28   ` Long An
  0 siblings, 1 reply; 6+ messages in thread
From: Qu Wenruo @ 2019-12-18 11:26 UTC (permalink / raw)
  To: Long An, linux-btrfs


[-- Attachment #1.1: Type: text/plain, Size: 161 bytes --]

On 2019/12/18 下午6:30, Long An wrote:
> 

Is that only me? I see nothing but blank.

And raw mail shows nothing but different headers.

Thanks,
Qu


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 520 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] btrfs-progs: fix path for btrfs-corrupt-block
@ 2019-12-18 10:30 Long An
  2019-12-18 11:26 ` Qu Wenruo
  0 siblings, 1 reply; 6+ messages in thread
From: Long An @ 2019-12-18 10:30 UTC (permalink / raw)
  To: linux-btrfs



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-13 21:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10  9:49 [PATCH] btrfs-progs: fix path for btrfs-corrupt-block Long An
2020-01-13 21:52 ` David Sterba
     [not found] <20191219025220.31764-1-lan@suse.com>
     [not found] ` <MN2PR18MB2685D76F7AFF7508E8101982C6380@MN2PR18MB2685.namprd18.prod.outlook.com>
2020-01-10  9:34   ` Long An
  -- strict thread matches above, loose matches on Subject: below --
2019-12-18 10:30 Long An
2019-12-18 11:26 ` Qu Wenruo
2019-12-19  2:28   ` Long An

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.