mirror of
				https://gitlab.alpinelinux.org/alpine/aports.git
				synced 2025-11-04 02:11:39 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			67 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			67 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
--- a/src/test/objectstore/test_bdev.cc
 | 
						|
+++ b/src/test/objectstore/test_bdev.cc
 | 
						|
@@ -54,8 +54,8 @@
 | 
						|
     BlockDevice::create(g_ceph_context, bdev.path, NULL, NULL,
 | 
						|
       [](void* handle, void* aio) {}, NULL));
 | 
						|
   bufferlist bl;
 | 
						|
-  // writing a bit less than 4GB
 | 
						|
-  for (auto i = 0; i < 4000; i++) {
 | 
						|
+  // writing a bit less than 1GB
 | 
						|
+  for (auto i = 0; i < 1000; i++) {
 | 
						|
     string s(1048576, 'a' + (i % 28));
 | 
						|
     bl.append(s);
 | 
						|
   }
 | 
						|
--- a/src/test/objectstore/test_bluefs.cc
 | 
						|
+++ b/src/test/objectstore/test_bluefs.cc
 | 
						|
@@ -237,7 +237,7 @@
 | 
						|
 }
 | 
						|
 
 | 
						|
 TEST(BlueFS, very_large_write) {
 | 
						|
-  // we'll write a ~5G file, so allocate more than that for the whole fs
 | 
						|
+  // we'll write a ~1G file, so allocate more than that for the whole fs
 | 
						|
   uint64_t size = 1048576 * 1024 * 6ull;
 | 
						|
   TempBdev bdev{size};
 | 
						|
   BlueFS fs(g_ceph_context);
 | 
						|
@@ -260,12 +260,12 @@
 | 
						|
     BlueFS::FileWriter *h;
 | 
						|
     ASSERT_EQ(0, fs.mkdir("dir"));
 | 
						|
     ASSERT_EQ(0, fs.open_for_write("dir", "bigfile", &h, false));
 | 
						|
-    for (unsigned i = 0; i < 3*1024*1048576ull / sizeof(buf); ++i) {
 | 
						|
+    for (unsigned i = 0; i < 1*1024*1048576ull / sizeof(buf); ++i) {
 | 
						|
       h->append(buf, sizeof(buf));
 | 
						|
       total_written += sizeof(buf);
 | 
						|
     }
 | 
						|
     fs.fsync(h);
 | 
						|
-    for (unsigned i = 0; i < 2*1024*1048576ull / sizeof(buf); ++i) {
 | 
						|
+    for (unsigned i = 0; i < 1*1024*1048576ull / sizeof(buf); ++i) {
 | 
						|
       h->append(buf, sizeof(buf));
 | 
						|
       total_written += sizeof(buf);
 | 
						|
     }
 | 
						|
@@ -278,7 +278,7 @@
 | 
						|
     bufferlist bl;
 | 
						|
     BlueFS::FileReaderBuffer readbuf(10485760);
 | 
						|
     ASSERT_EQ(h->file->fnode.size, total_written);
 | 
						|
-    for (unsigned i = 0; i < 3*1024*1048576ull / sizeof(buf); ++i) {
 | 
						|
+    for (unsigned i = 0; i < 1*1024*1048576ull / sizeof(buf); ++i) {
 | 
						|
       bl.clear();
 | 
						|
       fs.read(h, &readbuf, i * sizeof(buf), sizeof(buf), &bl, NULL);
 | 
						|
       int r = memcmp(buf, bl.c_str(), sizeof(buf));
 | 
						|
@@ -288,7 +288,7 @@
 | 
						|
       }
 | 
						|
       ASSERT_EQ(0, r);
 | 
						|
     }
 | 
						|
-    for (unsigned i = 0; i < 2*1024*1048576ull / sizeof(buf); ++i) {
 | 
						|
+    for (unsigned i = 0; i < 1*1024*1048576ull / sizeof(buf); ++i) {
 | 
						|
       bl.clear();
 | 
						|
       fs.read(h, &readbuf, i * sizeof(buf), sizeof(buf), &bl, NULL);
 | 
						|
       int r = memcmp(buf, bl.c_str(), sizeof(buf));
 | 
						|
@@ -313,7 +313,7 @@
 | 
						|
 }
 | 
						|
 
 | 
						|
 TEST(BlueFS, very_large_write2) {
 | 
						|
-  // we'll write a ~5G file, so allocate more than that for the whole fs
 | 
						|
+  // we'll write a ~1G file, so allocate more than that for the whole fs
 | 
						|
   uint64_t size_full = 1048576 * 1024 * 6ull;
 | 
						|
   uint64_t size = 1048576 * 1024 * 5ull;
 | 
						|
   TempBdev bdev{ size_full };
 |