linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: Fix missing internal deps in tests.
@ 2017-07-10 21:29 Adam Buchbinder
  2017-07-10 21:29 ` [PATCH] btrfs-progs: Tighten integer types in print-tree Adam Buchbinder
  2017-07-12 22:24 ` [PATCH] btrfs-progs: Fix missing internal deps in tests David Sterba
  0 siblings, 2 replies; 4+ messages in thread
From: Adam Buchbinder @ 2017-07-10 21:29 UTC (permalink / raw)
  To: linux-btrfs; +Cc: abuchbinder

Doing a straight 'make test' would fail because some misc and fsck
tests require particular tools to already be built. Add dependencies
at the Makefile and shell-script level.

Signed-off-by: Adam Buchbinder <abuchbinder@google.com>
---
 Makefile            | 5 +++--
 tests/fsck-tests.sh | 1 +
 tests/misc-tests.sh | 3 +++
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 81598df..4669525 100644
--- a/Makefile
+++ b/Makefile
@@ -272,11 +272,12 @@ test-convert: btrfs btrfs-convert
 	$(Q)bash tests/convert-tests.sh
 
 test-check: test-fsck
-test-fsck: btrfs btrfs-image btrfs-corrupt-block mkfs.btrfs
+test-fsck: btrfs btrfs-image btrfs-corrupt-block mkfs.btrfs btrfstune
 	@echo "    [TEST]   fsck-tests.sh"
 	$(Q)bash tests/fsck-tests.sh
 
-test-misc: btrfs btrfs-image btrfs-corrupt-block mkfs.btrfs btrfstune fssum
+test-misc: btrfs btrfs-image btrfs-corrupt-block mkfs.btrfs btrfstune fssum \
+		btrfs-zero-log btrfs-find-root btrfs-select-super
 	@echo "    [TEST]   misc-tests.sh"
 	$(Q)bash tests/misc-tests.sh
 
diff --git a/tests/fsck-tests.sh b/tests/fsck-tests.sh
index 44cca1b..15d26c7 100755
--- a/tests/fsck-tests.sh
+++ b/tests/fsck-tests.sh
@@ -23,6 +23,7 @@ rm -f "$RESULTS"
 check_prereq btrfs-corrupt-block
 check_prereq btrfs-image
 check_prereq btrfs
+check_prereq btrfstune
 check_kernel_support
 
 run_one_test() {
diff --git a/tests/misc-tests.sh b/tests/misc-tests.sh
index 1c645c9..0898801 100755
--- a/tests/misc-tests.sh
+++ b/tests/misc-tests.sh
@@ -24,6 +24,9 @@ check_prereq btrfs-corrupt-block
 check_prereq btrfs-image
 check_prereq btrfstune
 check_prereq btrfs
+check_prereq btrfs-zero-log
+check_prereq btrfs-find-root
+check_prereq btrfs-select-super
 check_kernel_support
 
 # The tests are driven by their custom script called 'test.sh'
-- 
2.13.2.725.g09c95d1e9-goog


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

* [PATCH] btrfs-progs: Tighten integer types in print-tree.
  2017-07-10 21:29 [PATCH] btrfs-progs: Fix missing internal deps in tests Adam Buchbinder
@ 2017-07-10 21:29 ` Adam Buchbinder
  2017-07-12 22:26   ` David Sterba
  2017-07-12 22:24 ` [PATCH] btrfs-progs: Fix missing internal deps in tests David Sterba
  1 sibling, 1 reply; 4+ messages in thread
From: Adam Buchbinder @ 2017-07-10 21:29 UTC (permalink / raw)
  To: linux-btrfs; +Cc: abuchbinder

There are likely more places where the wrong size types are used, but
these tripped Clang's warnings because they eventually get passed to
printf.

Signed-off-by: Adam Buchbinder <abuchbinder@google.com>
---
 print-tree.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/print-tree.c b/print-tree.c
index a0d3395..82d6572 100644
--- a/print-tree.c
+++ b/print-tree.c
@@ -197,7 +197,7 @@ static void qgroup_flags_to_str(u64 flags, char *ret)
 
 void print_chunk(struct extent_buffer *eb, struct btrfs_chunk *chunk)
 {
-	int num_stripes = btrfs_chunk_num_stripes(eb, chunk);
+	u16 num_stripes = btrfs_chunk_num_stripes(eb, chunk);
 	int i;
 	u32 chunk_item_size = btrfs_chunk_item_size(num_stripes);
 	char chunk_flags_str[32] = {0};
@@ -336,7 +336,7 @@ static void print_file_extent_item(struct extent_buffer *eb,
 				   int slot,
 				   struct btrfs_file_extent_item *fi)
 {
-	int extent_type = btrfs_file_extent_type(eb, fi);
+	unsigned char extent_type = btrfs_file_extent_type(eb, fi);
 	char compress_str[16];
 
 	compress_type_to_str(btrfs_file_extent_compression(eb, fi),
-- 
2.13.2.725.g09c95d1e9-goog


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

* Re: [PATCH] btrfs-progs: Fix missing internal deps in tests.
  2017-07-10 21:29 [PATCH] btrfs-progs: Fix missing internal deps in tests Adam Buchbinder
  2017-07-10 21:29 ` [PATCH] btrfs-progs: Tighten integer types in print-tree Adam Buchbinder
@ 2017-07-12 22:24 ` David Sterba
  1 sibling, 0 replies; 4+ messages in thread
From: David Sterba @ 2017-07-12 22:24 UTC (permalink / raw)
  To: Adam Buchbinder; +Cc: linux-btrfs

On Mon, Jul 10, 2017 at 02:29:08PM -0700, Adam Buchbinder wrote:
> Doing a straight 'make test' would fail because some misc and fsck
> tests require particular tools to already be built. Add dependencies
> at the Makefile and shell-script level.
> 
> Signed-off-by: Adam Buchbinder <abuchbinder@google.com>

Applied, thanks.

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

* Re: [PATCH] btrfs-progs: Tighten integer types in print-tree.
  2017-07-10 21:29 ` [PATCH] btrfs-progs: Tighten integer types in print-tree Adam Buchbinder
@ 2017-07-12 22:26   ` David Sterba
  0 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2017-07-12 22:26 UTC (permalink / raw)
  To: Adam Buchbinder; +Cc: linux-btrfs

On Mon, Jul 10, 2017 at 02:29:09PM -0700, Adam Buchbinder wrote:
> There are likely more places where the wrong size types are used, but
> these tripped Clang's warnings because they eventually get passed to
> printf.
> 
> Signed-off-by: Adam Buchbinder <abuchbinder@google.com>

Applied, thanks.

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

end of thread, other threads:[~2017-07-12 22:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-10 21:29 [PATCH] btrfs-progs: Fix missing internal deps in tests Adam Buchbinder
2017-07-10 21:29 ` [PATCH] btrfs-progs: Tighten integer types in print-tree Adam Buchbinder
2017-07-12 22:26   ` David Sterba
2017-07-12 22:24 ` [PATCH] btrfs-progs: Fix missing internal deps in tests David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).