From 49abb4a079c4a600350ee8f5d53dd1bba298a278 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Thu, 8 Oct 2026 12:36:40 +0200 Subject: [PATCH] XDSPluginTest: expect a signed image's INTx_MAX to pass through as saturated Plugin 1.1.0 (2629f3821) passes a saturated pixel of a signed image (INTx_MAX) through with its value so XDS flags it against OVERLOAD; only the error marker (INTx_MIN signed, UINTx_MAX unsigned) becomes -1. The legacy test still expected INT16_MAX -> -1. It now checks the saturated value explicitly and also that module-edge (bit 30) and chip-edge (bit 31) mask pixels read as -2. Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01SVmAWnzCmRKAXVUCdc4iNi --- tests/XDSPluginTest.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/tests/XDSPluginTest.cpp b/tests/XDSPluginTest.cpp index bd23b4443..9960e1071 100644 --- a/tests/XDSPluginTest.cpp +++ b/tests/XDSPluginTest.cpp @@ -112,10 +112,14 @@ TEST_CASE("XDSPlugin_GetData_Legacy", "[HDF5][XDS][Plugin]") { RegisterHDF5Filter(); std::vector pixel_mask(x.GetPixelsNum(), 0); + pixel_mask[3] = 1u << 30; // module edge + pixel_mask[4] = 1u << 31; // chip edge std::vector image(x.GetPixelsNum(), 0); - image[0] = INT16_MAX; - image[1] = INT16_MIN; + image[0] = INT16_MAX; // saturated + image[1] = INT16_MIN; // error marker image[2] = 456; + image[3] = 50; + image[4] = 60; { StartMessage start_message; @@ -158,9 +162,12 @@ TEST_CASE("XDSPlugin_GetData_Legacy", "[HDF5][XDS][Plugin]") { REQUIRE_NOTHROW(plugin_get_data(&frame_number, &nx, &ny, data.data(), info, &error_flag)); REQUIRE(error_flag == 0); - CHECK(data[0] == -1); + // A saturated pixel of a signed image is passed through, so XDS sees it above OVERLOAD + CHECK(data[0] == INT16_MAX); CHECK(data[1] == -1); CHECK(data[2] == 456); + CHECK(data[3] == -2); + CHECK(data[4] == -2); CHECK(data[5678] == 10); frame_number = 2;