src/storage/blobfs/test/unit/allocator_test.cc
// Test the functions which can alter the size of the block / node maps after
// initialization.
Test the functions which can alter the size of the block / node maps after
initialization.
Test the functions which can alter the size of the block / node maps after initialization .
TEST(AllocatorTest, ResetSize) {
  constexpr uint64_t kNodesPerBlock = kBlobfsBlockSize / kBlobfsInodeSize;
  ResetSizeHelper(1, kNodesPerBlock, 1, kNodesPerBlock);
  ResetSizeHelper(1, kNodesPerBlock, 2, kNodesPerBlock * 2);
  ResetSizeHelper(1, kNodesPerBlock, 8, kNodesPerBlock * 8);
  ResetSizeHelper(1, kNodesPerBlock, 2048, kNodesPerBlock * 2048);
  ResetSizeHelper(2, kNodesPerBlock * 2, 1, kNodesPerBlock);
  ResetSizeHelper(8, kNodesPerBlock * 8, 1, kNodesPerBlock);
  ResetSizeHelper(2048, kNodesPerBlock * 2048, 1, kNodesPerBlock);
}
TEST ( AllocatorTest , ResetSize ) { constexpr uint64_t kNodesPerBlock = kBlobfsBlockSize / kBlobfsInodeSize ; ResetSizeHelper ( 1 , kNodesPerBlock , 1 , kNodesPerBlock ) ; ResetSizeHelper ( 1 , kNodesPerBlock , 2 , kNodesPerBlock * 2 ) ; ResetSizeHelper ( 1 , kNodesPerBlock , 8 , kNodesPerBlock * 8 ) ; ResetSizeHelper ( 1 , kNodesPerBlock , 2048 , kNodesPerBlock * 2048 ) ; ResetSizeHelper ( 2 , kNodesPerBlock * 2 , 1 , kNodesPerBlock ) ; ResetSizeHelper ( 8 , kNodesPerBlock * 8 , 1 , kNodesPerBlock ) ; ResetSizeHelper ( 2048 , kNodesPerBlock * 2048 , 1 , kNodesPerBlock ) ; }
Test the functions which can alter the size of the block / node maps after
initialization.
Test the functions which can alter the size of the block / node maps after initialization .
// Test no changes in size. // Test 2x growth. // Test 8x growth. // Test 2048x growth. // Test 2x shrinking. // Test 8x shrinking. // Test 2048x shrinking.