[PATCH v2 4/5] test: ipa: libipa: histogram: Add tests for small inter quantile mean ranges

Stefan Klug stefan.klug at ideasonboard.com
Tue Apr 1 14:36:12 CEST 2025


Add tests for small inter quantile mean ranges. As these cases fail at
the moment, mark the test as should_fail.

Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

---

Changes in v2:
- Move test patch before fix
- Add should_fail
- Fix typo in comment
---
 test/ipa/libipa/histogram.cpp | 4 ++++
 test/ipa/libipa/meson.build   | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/test/ipa/libipa/histogram.cpp b/test/ipa/libipa/histogram.cpp
index 5ce84a61b7da..77ff31a6db0e 100644
--- a/test/ipa/libipa/histogram.cpp
+++ b/test/ipa/libipa/histogram.cpp
@@ -55,6 +55,10 @@ protected:
 		/* Test interquantile mean that starts and ends in the middle of a bin. */
 		ASSERT_EQ(hist.interQuantileMean(0.25, 0.75), 1.0);
 
+		/* Test small ranges at the borders of the histogram. */
+		ASSERT_EQ(hist.interQuantileMean(0.0, 0.1), 0.1);
+		ASSERT_EQ(hist.interQuantileMean(0.9, 1.0), 1.9);
+
 		return TestPass;
 	}
 };
diff --git a/test/ipa/libipa/meson.build b/test/ipa/libipa/meson.build
index 8c63ebd8e2f7..83c84bd8c227 100644
--- a/test/ipa/libipa/meson.build
+++ b/test/ipa/libipa/meson.build
@@ -2,7 +2,7 @@
 
 libipa_test = [
     {'name': 'fixedpoint', 'sources': ['fixedpoint.cpp']},
-    {'name': 'histogram', 'sources': ['histogram.cpp']},
+    {'name': 'histogram', 'sources': ['histogram.cpp'], 'should_fail': true},
     {'name': 'interpolator', 'sources': ['interpolator.cpp']},
 ]
 
-- 
2.43.0



More information about the libcamera-devel mailing list