From cfb894e192ea64197f86890c53eddf00b2cd38ab Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Mon, 20 Nov 2023 22:33:10 +0100 Subject: [PATCH] refactor: keep code for dumping file systems in case of errors --- test/dwarfs.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/dwarfs.cpp b/test/dwarfs.cpp index d9e5e604..ee86baaa 100644 --- a/test/dwarfs.cpp +++ b/test/dwarfs.cpp @@ -28,6 +28,8 @@ #include #include +#include + #include #include @@ -798,7 +800,12 @@ TEST_P(file_scanner, inode_ordering) { auto ref = build_dwarfs(lgr, input, "null", bmcfg, opts); for (int i = 0; i < 50; ++i) { - EXPECT_EQ(ref, build_dwarfs(lgr, input, "null", bmcfg, opts)); + auto fs = build_dwarfs(lgr, input, "null", bmcfg, opts); + EXPECT_EQ(ref, fs); + // if (ref != fs) { + // folly::writeFile(ref, "ref.dwarfs"); + // folly::writeFile(fs, fmt::format("test{}.dwarfs", i).c_str()); + // } } }