diff --git a/Makefile.am b/Makefile.am
index 0ebd45bb..c7561272 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -39,6 +39,7 @@ dist_man8_MANS =
 testdir = @TESTBINDIR@
 test_PROGRAMS =
 test_SCRIPTS =
+test_DATA =
 
 TESTS =
 EXTRA_DIST = COPYING CHANGELOG.md README.txt
diff --git a/tests/ubifs_tools-tests/Makemodule.am b/tests/ubifs_tools-tests/Makemodule.am
index 9881ebbe..7ef873ce 100644
--- a/tests/ubifs_tools-tests/Makemodule.am
+++ b/tests/ubifs_tools-tests/Makemodule.am
@@ -6,3 +6,58 @@ test_SCRIPTS += \
 	tests/ubifs_tools-tests/fsck_tests/cycle_corrupted_fsck_fault_inject.sh \
 	tests/ubifs_tools-tests/fsck_tests/cycle_powercut_mount_fsck.sh \
 	tests/ubifs_tools-tests/fsck_tests/random_corrupted_fsck.sh
+
+test_DATA += \
+	tests/ubifs_tools-tests/images/good.gz \
+	tests/ubifs_tools-tests/images/sb_fanout.gz \
+	tests/ubifs_tools-tests/images/sb_fmt_version.gz \
+	tests/ubifs_tools-tests/images/sb_leb_size.gz \
+	tests/ubifs_tools-tests/images/sb_log_lebs.gz \
+	tests/ubifs_tools-tests/images/sb_min_io_size.gz \
+	tests/ubifs_tools-tests/images/master_highest_inum.gz \
+	tests/ubifs_tools-tests/images/master_lpt.gz \
+	tests/ubifs_tools-tests/images/master_tnc.gz \
+	tests/ubifs_tools-tests/images/master_total_dead.gz \
+	tests/ubifs_tools-tests/images/master_total_dirty.gz \
+	tests/ubifs_tools-tests/images/master_total_free.gz \
+	tests/ubifs_tools-tests/images/journal_log.gz \
+	tests/ubifs_tools-tests/images/journal_bud.gz \
+	tests/ubifs_tools-tests/images/orphan_node.gz \
+	tests/ubifs_tools-tests/images/lpt_dirty.gz \
+	tests/ubifs_tools-tests/images/lpt_flags.gz \
+	tests/ubifs_tools-tests/images/lpt_free.gz \
+	tests/ubifs_tools-tests/images/lpt_pos.gz \
+	tests/ubifs_tools-tests/images/ltab_dirty.gz \
+	tests/ubifs_tools-tests/images/ltab_free.gz \
+	tests/ubifs_tools-tests/images/index_size.gz \
+	tests/ubifs_tools-tests/images/tnc_lv0_key.gz \
+	tests/ubifs_tools-tests/images/tnc_lv0_len.gz \
+	tests/ubifs_tools-tests/images/tnc_lv0_pos.gz \
+	tests/ubifs_tools-tests/images/tnc_noleaf_key.gz \
+	tests/ubifs_tools-tests/images/tnc_noleaf_len.gz \
+	tests/ubifs_tools-tests/images/tnc_noleaf_pos.gz \
+	tests/ubifs_tools-tests/images/corrupted_data_leb.gz \
+	tests/ubifs_tools-tests/images/corrupted_idx_leb.gz \
+	tests/ubifs_tools-tests/images/inode_data.gz \
+	tests/ubifs_tools-tests/images/inode_mode.gz \
+	tests/ubifs_tools-tests/images/inode_nlink.gz \
+	tests/ubifs_tools-tests/images/inode_size.gz \
+	tests/ubifs_tools-tests/images/inode_xcnt.gz \
+	tests/ubifs_tools-tests/images/soft_link_inode_mode.gz \
+	tests/ubifs_tools-tests/images/soft_link_data_len.gz \
+	tests/ubifs_tools-tests/images/dentry_key.gz \
+	tests/ubifs_tools-tests/images/dentry_nlen.gz \
+	tests/ubifs_tools-tests/images/dentry_type.gz \
+	tests/ubifs_tools-tests/images/xinode_flags.gz \
+	tests/ubifs_tools-tests/images/xinode_key.gz \
+	tests/ubifs_tools-tests/images/xinode_mode.gz \
+	tests/ubifs_tools-tests/images/xentry_key.gz \
+	tests/ubifs_tools-tests/images/xentry_nlen.gz \
+	tests/ubifs_tools-tests/images/xentry_type.gz \
+	tests/ubifs_tools-tests/images/xent_host.gz \
+	tests/ubifs_tools-tests/images/dir_many_dentry.gz \
+	tests/ubifs_tools-tests/images/dir_lost.gz \
+	tests/ubifs_tools-tests/images/dir_lost_duplicated.gz \
+	tests/ubifs_tools-tests/images/dir_lost_not_recover.gz \
+	tests/ubifs_tools-tests/images/root_dir.gz \
+	tests/ubifs_tools-tests/images/empty_tnc.gz
diff --git a/tests/ubifs_tools-tests/images/corrupted_data_leb.gz b/tests/ubifs_tools-tests/images/corrupted_data_leb.gz
new file mode 100644
index 0000000000000000000000000000000000000000..ebb98a4fefb664a2505fece1c12ab1faf104632d
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/corrupted_idx_leb.gz b/tests/ubifs_tools-tests/images/corrupted_idx_leb.gz
new file mode 100644
index 0000000000000000000000000000000000000000..446f8118af32366765ded1f51c6070348171ce64
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/dentry_key.gz b/tests/ubifs_tools-tests/images/dentry_key.gz
new file mode 100644
index 0000000000000000000000000000000000000000..bc313b5cddc698648b1ad29abc3deb711083c5a0
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/dentry_nlen.gz b/tests/ubifs_tools-tests/images/dentry_nlen.gz
new file mode 100644
index 0000000000000000000000000000000000000000..4e5c826e78bc9dd526312337f6573badf15d139c
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/dentry_type.gz b/tests/ubifs_tools-tests/images/dentry_type.gz
new file mode 100644
index 0000000000000000000000000000000000000000..e67348da01f38aceab7e7ab952a8433a8671b542
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/dir_lost.gz b/tests/ubifs_tools-tests/images/dir_lost.gz
new file mode 100644
index 0000000000000000000000000000000000000000..fd42040d2e23a4c8f65146ea1b9d81a1eb1732c1
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/dir_lost_duplicated.gz b/tests/ubifs_tools-tests/images/dir_lost_duplicated.gz
new file mode 100644
index 0000000000000000000000000000000000000000..09def92c3cf51b942c0c52f4023e5f1c9fc9a04a
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/dir_lost_not_recover.gz b/tests/ubifs_tools-tests/images/dir_lost_not_recover.gz
new file mode 100644
index 0000000000000000000000000000000000000000..6fe82bb449fb91a14c169121554cd4defa5dc905
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/dir_many_dentry.gz b/tests/ubifs_tools-tests/images/dir_many_dentry.gz
new file mode 100644
index 0000000000000000000000000000000000000000..f027bfc4c7b8125fff294deb0a31b3371a891188
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/empty_tnc.gz b/tests/ubifs_tools-tests/images/empty_tnc.gz
new file mode 100644
index 0000000000000000000000000000000000000000..7e85a8c977d7998f39fc594d5dd867bfb5b6820e
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/good.gz b/tests/ubifs_tools-tests/images/good.gz
new file mode 100644
index 0000000000000000000000000000000000000000..686e949f4eaca715e5edcd24c2453c9e3fdfda5e
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/index_size.gz b/tests/ubifs_tools-tests/images/index_size.gz
new file mode 100644
index 0000000000000000000000000000000000000000..0ebcf59bee8ef0eef7d61d78dbe111fa827c0569
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/inode_data.gz b/tests/ubifs_tools-tests/images/inode_data.gz
new file mode 100644
index 0000000000000000000000000000000000000000..f8135dcab14fe393e78083d762e1b873eb8982fe
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/inode_mode.gz b/tests/ubifs_tools-tests/images/inode_mode.gz
new file mode 100644
index 0000000000000000000000000000000000000000..1bdbb264c2d29e538abcb0c5380ac9e0fad79508
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/inode_nlink.gz b/tests/ubifs_tools-tests/images/inode_nlink.gz
new file mode 100644
index 0000000000000000000000000000000000000000..19461d944818cb8849c372624d9f13d43b8105a5
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/inode_size.gz b/tests/ubifs_tools-tests/images/inode_size.gz
new file mode 100644
index 0000000000000000000000000000000000000000..aa7574cbf40a7ad1b6b536b438122926ccf6d398
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/inode_xcnt.gz b/tests/ubifs_tools-tests/images/inode_xcnt.gz
new file mode 100644
index 0000000000000000000000000000000000000000..4bc5ac23fc822d93fad2510f157b86e57756e5b9
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/journal_bud.gz b/tests/ubifs_tools-tests/images/journal_bud.gz
new file mode 100644
index 0000000000000000000000000000000000000000..37cf4538471f7f5c7a78df3137e67aad842e1afb
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/journal_log.gz b/tests/ubifs_tools-tests/images/journal_log.gz
new file mode 100644
index 0000000000000000000000000000000000000000..e1ddc88745d15a9801cde30a907c1211267ad2e6
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/lpt_dirty.gz b/tests/ubifs_tools-tests/images/lpt_dirty.gz
new file mode 100644
index 0000000000000000000000000000000000000000..b7381c35a72e62564e4dc8f9f6c0f234929d9216
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/lpt_flags.gz b/tests/ubifs_tools-tests/images/lpt_flags.gz
new file mode 100644
index 0000000000000000000000000000000000000000..baf60973814dcea453a007a3529f53fcc2143a2a
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/lpt_free.gz b/tests/ubifs_tools-tests/images/lpt_free.gz
new file mode 100644
index 0000000000000000000000000000000000000000..abc46fd241a9ca0ed4d1404d6e4a8c75540733ef
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/lpt_pos.gz b/tests/ubifs_tools-tests/images/lpt_pos.gz
new file mode 100644
index 0000000000000000000000000000000000000000..d050f18edb9d037a387ed78838f8da51cb8c2cd0
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/ltab_dirty.gz b/tests/ubifs_tools-tests/images/ltab_dirty.gz
new file mode 100644
index 0000000000000000000000000000000000000000..56dabee0f44e1323090fd5af8fb30f6de493ed8d
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/ltab_free.gz b/tests/ubifs_tools-tests/images/ltab_free.gz
new file mode 100644
index 0000000000000000000000000000000000000000..985e275e7b7060475c4bf8a3eea0a9345adbfdaa
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/master_highest_inum.gz b/tests/ubifs_tools-tests/images/master_highest_inum.gz
new file mode 100644
index 0000000000000000000000000000000000000000..08ed04450cc762d26e4aef53c748bad64a57f1d1
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/master_lpt.gz b/tests/ubifs_tools-tests/images/master_lpt.gz
new file mode 100644
index 0000000000000000000000000000000000000000..4b205a2654599764122614cba6a16ca902e06702
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/master_tnc.gz b/tests/ubifs_tools-tests/images/master_tnc.gz
new file mode 100644
index 0000000000000000000000000000000000000000..4219a5e0f7dee8d331cc3800aefe14743597ab99
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/master_total_dead.gz b/tests/ubifs_tools-tests/images/master_total_dead.gz
new file mode 100644
index 0000000000000000000000000000000000000000..165d78789b54ec4646de14be7b32087b0b7d5bbd
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/master_total_dirty.gz b/tests/ubifs_tools-tests/images/master_total_dirty.gz
new file mode 100644
index 0000000000000000000000000000000000000000..9416bbd6cf7afba06e16b2c73a2ce0c6134336f2
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/master_total_free.gz b/tests/ubifs_tools-tests/images/master_total_free.gz
new file mode 100644
index 0000000000000000000000000000000000000000..e6e942ffb48ef2e99c04bfa1de4dd6bbed8de5cb
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/orphan_node.gz b/tests/ubifs_tools-tests/images/orphan_node.gz
new file mode 100644
index 0000000000000000000000000000000000000000..901d75d4a40a530c27eb025501e6bc5a54ae31da
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/root_dir.gz b/tests/ubifs_tools-tests/images/root_dir.gz
new file mode 100644
index 0000000000000000000000000000000000000000..d45e4dcc1ac09b33081ee65b175e469c6ee39a25
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/sb_fanout.gz b/tests/ubifs_tools-tests/images/sb_fanout.gz
new file mode 100644
index 0000000000000000000000000000000000000000..520fd09055ca671969093bd07bbb200746742d06
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/sb_fmt_version.gz b/tests/ubifs_tools-tests/images/sb_fmt_version.gz
new file mode 100644
index 0000000000000000000000000000000000000000..c6309e18c593a96a001ad332c967faf968d01431
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/sb_leb_size.gz b/tests/ubifs_tools-tests/images/sb_leb_size.gz
new file mode 100644
index 0000000000000000000000000000000000000000..a04ed7b630895e0a89890d5b589bcf4f39e540b5
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/sb_log_lebs.gz b/tests/ubifs_tools-tests/images/sb_log_lebs.gz
new file mode 100644
index 0000000000000000000000000000000000000000..9113fe4d2407d31f40ca9ee6363ff36c56b7f937
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/sb_min_io_size.gz b/tests/ubifs_tools-tests/images/sb_min_io_size.gz
new file mode 100644
index 0000000000000000000000000000000000000000..788096deeed7a1959ab322bba3ec186e1a158d5c
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/soft_link_data_len.gz b/tests/ubifs_tools-tests/images/soft_link_data_len.gz
new file mode 100644
index 0000000000000000000000000000000000000000..10414a7710ab27242eeb479a4da393cd3189f4dc
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/soft_link_inode_mode.gz b/tests/ubifs_tools-tests/images/soft_link_inode_mode.gz
new file mode 100644
index 0000000000000000000000000000000000000000..e333611964870cd1a888ad434a6178da4c60a644
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/tnc_lv0_key.gz b/tests/ubifs_tools-tests/images/tnc_lv0_key.gz
new file mode 100644
index 0000000000000000000000000000000000000000..bcc8ca2af6f9700762cbda165501d19e0608933a
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/tnc_lv0_len.gz b/tests/ubifs_tools-tests/images/tnc_lv0_len.gz
new file mode 100644
index 0000000000000000000000000000000000000000..1c64d794aaf2169d164a742b8124b306e2e83d2c
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/tnc_lv0_pos.gz b/tests/ubifs_tools-tests/images/tnc_lv0_pos.gz
new file mode 100644
index 0000000000000000000000000000000000000000..5816123fa32543f3150c18927940a72c754e522a
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/tnc_noleaf_key.gz b/tests/ubifs_tools-tests/images/tnc_noleaf_key.gz
new file mode 100644
index 0000000000000000000000000000000000000000..fc7c0edc87f66590d568b4c0a13edc83acaca369
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/tnc_noleaf_len.gz b/tests/ubifs_tools-tests/images/tnc_noleaf_len.gz
new file mode 100644
index 0000000000000000000000000000000000000000..2d0f80d3f8f142fd6b787fc3cabf71ee4e83df7b
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/tnc_noleaf_pos.gz b/tests/ubifs_tools-tests/images/tnc_noleaf_pos.gz
new file mode 100644
index 0000000000000000000000000000000000000000..1a05959b9773f9daf19199bad97d784a0664c2e8
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/xent_host.gz b/tests/ubifs_tools-tests/images/xent_host.gz
new file mode 100644
index 0000000000000000000000000000000000000000..b2aef46b86914b66d3511b15b60542bcb0a9a18a
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/xentry_key.gz b/tests/ubifs_tools-tests/images/xentry_key.gz
new file mode 100644
index 0000000000000000000000000000000000000000..b4fa6d53e6fc471e3fbc7a40825555707b164990
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/xentry_nlen.gz b/tests/ubifs_tools-tests/images/xentry_nlen.gz
new file mode 100644
index 0000000000000000000000000000000000000000..e351280373c12a3d64c93992ca13686aaa397d6f
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/xentry_type.gz b/tests/ubifs_tools-tests/images/xentry_type.gz
new file mode 100644
index 0000000000000000000000000000000000000000..e0c57634415150394b01e80f7f109086e5b4b5ce
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/xinode_flags.gz b/tests/ubifs_tools-tests/images/xinode_flags.gz
new file mode 100644
index 0000000000000000000000000000000000000000..34d3ff71387f393c0814da352e03f36358e2df5a
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/xinode_key.gz b/tests/ubifs_tools-tests/images/xinode_key.gz
new file mode 100644
index 0000000000000000000000000000000000000000..c92956cde911a84c6c192973c5e7f3e1fe02b06e
GIT binary patch
diff --git a/tests/ubifs_tools-tests/images/xinode_mode.gz b/tests/ubifs_tools-tests/images/xinode_mode.gz
new file mode 100644
index 0000000000000000000000000000000000000000..0e5264815fd83f6c6aecaf1b7110ee69a0d16fee
