From 1f838b061ba808294915cd0ab6d1315bd77d229b Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Mon, 17 Jun 2024 12:59:34 +0100 Subject: [PATCH] tests: Skip >4GB file tests unless running tests in slow/thorough mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They take too long to include in a normal test run. They’ll still be run in CI once a week as part of our scheduled slow test job. Signed-off-by: Philip Withnall --- gio/tests/file.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gio/tests/file.c b/gio/tests/file.c index 891092c5c..405d295f9 100644 --- a/gio/tests/file.c +++ b/gio/tests/file.c @@ -2938,6 +2938,15 @@ create_testfile_4gb_or_skip (char *filename) int fd; int ret; + /* Reading each 4GB test file takes about 5s on a fast machine, and another 7s + * to compare its contents once it’s been read. That’s too slow for a normal + * test run, and there’s no way to speed it up. */ + if (!g_test_slow ()) + { + g_test_skip ("Skipping slow >4GB file test"); + return FALSE; + } + fd = g_mkstemp (filename); g_assert_cmpint (fd, !=, -1); ret = ftruncate (fd, testfile_4gb_size);