src/storage/blobfs/test/unit/format-test.cc
// After formatting a filesystem with block size valid block count N, mounting
// on a device less M blocks (for M < N) should fail.
After formatting a filesystem with block size valid block count N, mounting
on a device less M blocks (for M < N) should fail.
After formatting a filesystem with block size valid block count N mounting on a device less M blocks ( for M < N ) should fail .
TEST(FormatFilesystemTest, CreateBlobfsFailureWithLessBlocks) {
  const uint64_t kBlockCount = 1 << 20;
  const uint32_t kBlockSize = 512;
  auto device = std::make_unique<FakeBlockDevice>(kBlockCount, kBlockSize);
  ASSERT_EQ(FormatFilesystem(device.get()), ZX_OK);
  device->SetBlockCount(kBlockCount - 1);
  ASSERT_EQ(ZX_ERR_BAD_STATE, CheckMountability(std::move(device)));
}
TEST ( FormatFilesystemTest , CreateBlobfsFailureWithLessBlocks ) { const uint64_t kBlockCount = 1 << 20 ; const uint32_t kBlockSize = 512 ; auto device = std :: make_unique < FakeBlockDevice > ( kBlockCount , kBlockSize ) ; ASSERT_EQ ( FormatFilesystem ( device . get ( ) ) , ZX_OK ) ; device -> SetBlockCount ( kBlockCount - 1 ) ; ASSERT_EQ ( ZX_ERR_BAD_STATE , CheckMountability ( std :: move ( device ) ) ) ; }
After formatting a filesystem with block size valid block count N, mounting
on a device less M blocks (for M < N) should fail.
After formatting a filesystem with block size valid block count N mounting on a device less M blocks ( for M < N ) should fail .