]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-btrfs: quota test is slow
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 3 Jun 2026 23:23:05 +0000 (08:23 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 4 Jun 2026 19:42:14 +0000 (04:42 +0900)
The quota test takes ~30 seconds on my poor laptop, and randomly fails
with timeout. Let's extend the timeout and skip the test case when slow
tests are disabled.

src/test/meson.build
src/test/test-btrfs.c

index 21b1f435f4630f3826f74a5b8eaabc1d6c5e60f5..072cb64718c2a9be625c81864491158b6b98baee 100644 (file)
@@ -66,7 +66,6 @@ simple_tests += files(
         'test-bitmap.c',
         'test-blockdev-util.c',
         'test-bootspec.c',
-        'test-btrfs.c',
         'test-build-path.c',
         'test-bus-unit-util.c',
         'test-bus-util.c',
@@ -260,6 +259,10 @@ executables += [
                 'sources' : files('test-boot-timestamps.c'),
                 'conditions' : ['ENABLE_EFI'],
         },
+        test_template + {
+                'sources' : files('test-btrfs.c'),
+                'timeout' : 120,
+        },
         test_template + {
                 'sources' : files('test-chase-manual.c'),
                 'type' : 'manual',
index fe3cfbfd8f88622859a2b6463fa20c267c1388a4..da3c4bf9ca06980847159498f658cda27115b88f 100644 (file)
@@ -141,6 +141,9 @@ TEST(recursive) {
 }
 
 TEST(quota) {
+        if (!slow_tests_enabled())
+                return (void) log_tests_skipped("slow tests are disabled");
+
         _cleanup_(rm_rf_subvolume_and_freep) char *dir = NULL;
         _cleanup_close_ int dir_fd = ASSERT_OK(open_test_subvol(&dir));
         BtrfsQuotaInfo quota;