refactor: keep code for dumping file systems in case of errors

This commit is contained in:
Marcus Holland-Moritz 2023-11-20 22:33:10 +01:00
parent 80b11347e1
commit cfb894e192

View File

@ -28,6 +28,8 @@
#include <sstream> #include <sstream>
#include <vector> #include <vector>
#include <folly/FileUtil.h>
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <fmt/format.h> #include <fmt/format.h>
@ -798,7 +800,12 @@ TEST_P(file_scanner, inode_ordering) {
auto ref = build_dwarfs(lgr, input, "null", bmcfg, opts); auto ref = build_dwarfs(lgr, input, "null", bmcfg, opts);
for (int i = 0; i < 50; ++i) { 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());
// }
} }
} }