diff --git a/fs_mgr/libfiemap/Android.bp b/fs_mgr/libfiemap/Android.bp index 9d18a442b..bde9d0a70 100644 --- a/fs_mgr/libfiemap/Android.bp +++ b/fs_mgr/libfiemap/Android.bp @@ -69,6 +69,7 @@ cc_test { "libdm", "libfs_mgr", "liblog", + "libgsi", ], data: [ diff --git a/fs_mgr/libfiemap/fiemap_writer_test.cpp b/fs_mgr/libfiemap/fiemap_writer_test.cpp index 22a37225e..3c8ab42c1 100644 --- a/fs_mgr/libfiemap/fiemap_writer_test.cpp +++ b/fs_mgr/libfiemap/fiemap_writer_test.cpp @@ -35,6 +35,7 @@ #include #include #include +#include #include "utility.h" @@ -148,7 +149,10 @@ TEST_F(FiemapWriterTest, CheckBlockDevicePath) { FiemapUniquePtr fptr = FiemapWriter::Open(testfile, gBlockSize); EXPECT_EQ(fptr->size(), gBlockSize); EXPECT_EQ(fptr->bdev_path().find("/dev/block/"), size_t(0)); - EXPECT_EQ(fptr->bdev_path().find("/dev/block/dm-"), string::npos); + + if (!android::gsi::IsGsiRunning()) { + EXPECT_EQ(fptr->bdev_path().find("/dev/block/dm-"), string::npos); + } } TEST_F(FiemapWriterTest, CheckFileCreated) {