Skip to content

Commit

Permalink
test: add inode dumping test
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Dec 30, 2023
1 parent 86f0af2 commit 4d1de7d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/tool_main_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,3 +383,18 @@ TEST(mkdwarfs_test, chmod_norm) {

EXPECT_EQ(expected_norm, norm);
}

TEST(mkdwarfs_test, dump_inodes) {
std::string const image_file = "test.dwarfs";
std::string const inode_file = "inode.dump";

mkdwarfs_tester t;
t.os->setenv("DWARFS_DUMP_INODES", inode_file);

EXPECT_EQ(0, t.run({"-i", "/", "-o", image_file}));

auto dump = t.fa->get_file(inode_file);

ASSERT_TRUE(dump);
EXPECT_GT(dump->size(), 100) << dump.value();
}

0 comments on commit 4d1de7d

Please sign in to comment.