Commit Graph

10 Commits (master)

Author SHA1 Message Date
David Sterba 81ada30fec btrfs-progs: switch to mkfs helper
Signed-off-by: David Sterba <dsterba@suse.com>
2019-06-05 20:27:32 +02:00
David Sterba dcb174ce2e btrfs-progs: tests: add shell quotes to misc test scripts
Signed-off-by: David Sterba <dsterba@suse.com>
2018-03-30 22:15:55 +02:00
David Sterba a855717a87 btrfs-progs: tests: remove trivial use of local variables
No need to use a temporary variable if the parameter usage is obvious
from the context.

Signed-off-by: David Sterba <dsterba@suse.com>
2018-03-30 22:15:55 +02:00
Gu Jinxiang cebf3b3722 btrfs-progs: introduce TEST_TOP and INTERNAL_BIN for tests
Use TEST_TOP as base for tests to reference any files, this will be used
for git and external testsuite.

INTERNAL_BIN is needed for referencing binaries that could reside in
different paths in git vs external testsuite.

Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com>
[ add quotes around sourced files, update changelog ]
Signed-off-by: David Sterba <dsterba@suse.com>
2018-02-13 15:41:32 +01:00
David Sterba c8d1c4c792 btrfs-progs: tests: switch to dump- commands from inspect
The dump-super and debug-tree commands are replacements for the
standalone tools.

Signed-off-by: David Sterba <dsterba@suse.com>
2016-11-09 13:13:37 +01:00
David Sterba ac45d64c04 btrfs-progs: tests: add missing prerequisites
Signed-off-by: David Sterba <dsterba@suse.com>
2016-01-12 15:16:11 +01:00
Zhao Lei d4d500d341 btrfs-progs: tests: Introduce init_env to initialize common env variant
For example, $TEST_DIR is common used in severial tests, and have
duplicated code for initialize.

These duplicated code not only benifits harddisk vendor, but have
inconsistent details, as:
  convert-tests.sh: lack of mkdir
  fsck-tests/012-leaf-corruption/test.sh: unnecessary mkdir
  fsck-tests/013-extent-tree-rebuild/test.sh: unnecessary init
  misc-tests/XXX ...
And severial error message:
  _fail "unable to create mount point on $TEST_MNT"
  _fail "failed to create mount point"
  ...

This patch move initizlizaton of $TEST_DIR to common init_env(),
to avoid above problem, and init_env() can be used to add more
things in future.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2015-09-01 14:02:48 +02:00
Zhao Lei bafc3a33f5 btrfs-progs: tests: Move code to create loop device to common
This code block is used several tests, move it to ./common and add a
helper.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2015-08-31 19:25:11 +02:00
David Sterba 4b4d742b26 btrfs-progs: tests: verify btrfstune output during uuid-rewrite
The 'Current fsid:' value does not match the real fsid.

Reported-by: Mike Fleetwood <mike.fleetwood@googlemail.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-18 19:49:33 +02:00
David Sterba 551c4bb064 btrfs-progs: tests: add misc tests for uuid rewrite
Simple tests of the -u/-U options of btrfstune.

Signed-off-by: David Sterba <dsterba@suse.cz>
2015-06-03 14:04:02 +02:00