src/storage/blobfs/test/unit/format-test.cc
// Blobfs cannot be formatted on an FVM with a slice size that does not divide
// the blobfs block size.
Blobfs cannot be formatted on an FVM with a slice size that does not divide
the blobfs block size.
Blobfs cannot be formatted on an FVM with a slice size that does not divide the blobfs block size .
TEST(FormatFilesystemTest, FormatFVMDeviceWithNonDivisibleSliceSize) {
  const uint64_t kBlockCount = 1 << 20;
  const uint32_t kBlockSize = kBlobfsBlockSize;
  const uint64_t kSliceSize = kBlobfsBlockSize * 8 + 1;
  const uint64_t kSliceCount = 1028;
  auto device =
      std::make_unique<FakeFVMBlockDevice>(kBlockCount, kBlockSize, kSliceSize, kSliceCount);
  ASSERT_EQ(ZX_ERR_IO_INVALID, FormatFilesystem(device.get()));
  ASSERT_EQ(ZX_ERR_INVALID_ARGS, CheckMountability(std::move(device)));
}
TEST ( FormatFilesystemTest , FormatFVMDeviceWithNonDivisibleSliceSize ) { const uint64_t kBlockCount = 1 << 20 ; const uint32_t kBlockSize = kBlobfsBlockSize ; const uint64_t kSliceSize = kBlobfsBlockSize * 8 + 1 ; const uint64_t kSliceCount = 1028 ; auto device = std :: make_unique < FakeFVMBlockDevice > ( kBlockCount , kBlockSize , kSliceSize , kSliceCount ) ; ASSERT_EQ ( ZX_ERR_IO_INVALID , FormatFilesystem ( device . get ( ) ) ) ; ASSERT_EQ ( ZX_ERR_INVALID_ARGS , CheckMountability ( std :: move ( device ) ) ) ; }
Blobfs cannot be formatted on an FVM with a slice size that does not divide
the blobfs block size.
Blobfs cannot be formatted on an FVM with a slice size that does not divide the blobfs block size .