From 8dc1de8b3f4bc3eff61cc21b45724f0739a19b32 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 4 Jun 2026 08:23:05 +0900 Subject: [PATCH] test-btrfs: quota test is slow 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 | 5 ++++- src/test/test-btrfs.c | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/test/meson.build b/src/test/meson.build index 21b1f435f4..072cb64718 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -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', diff --git a/src/test/test-btrfs.c b/src/test/test-btrfs.c index fe3cfbfd8f..da3c4bf9ca 100644 --- a/src/test/test-btrfs.c +++ b/src/test/test-btrfs.c @@ -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;