From a1fa160e1677ea214667bac3c155b4ce6989fa90 Mon Sep 17 00:00:00 2001 From: Eugene Kliuchnikov Date: Tue, 7 Jan 2025 10:24:06 +0100 Subject: Further undisable tests (#4041) --- lib/jxl/jxl_test.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/jxl/jxl_test.cc b/lib/jxl/jxl_test.cc index ddf98427..e8ae20b2 100644 --- a/lib/jxl/jxl_test.cc +++ b/lib/jxl/jxl_test.cc @@ -391,7 +391,11 @@ TEST(JxlTest, RoundtripLargeFast) { JXL_X86_64_TEST(JxlTest, RoundtripLargeEmptyModular) { ThreadPoolForTests pool(8); TestImage t; - ASSERT_TRUE(t.SetDimensions(4096, 4096)); + // On 32-bit machines memory could be limited to 2GiB. Current use factor + // is about 20x, that means hat 6MPx image is about the max available size. + constexpr size_t kDim = sizeof(size_t) == 4 ? 2400 : 4096; + const size_t kLim = std::min(kDim, 1024); + ASSERT_TRUE(t.SetDimensions(kDim, kDim)); t.SetDataType(JXL_TYPE_UINT8); ASSERT_TRUE(t.SetChannels(4)); JXL_TEST_ASSIGN_OR_DIE(auto frame, t.AddFrame()); -- 2.47.3