From 06e08048b7e8ffa4f32a6fa0eb957a672fb2c501 Mon Sep 17 00:00:00 2001 From: Ohisemega Date: Mon, 30 Mar 2026 11:14:25 +0100 Subject: [PATCH 01/11] BugFix: FileWriterPlugin 'Writing' Status Fix FileWriterPlugin 'Writing' Status parameter name. Add unit test o FileWriterPluginTest to validate the presence of all status parameters. Fixes #504 --- cpp/frameProcessor/src/FileWriterPlugin.cpp | 2 +- .../test/FileWriterPluginTest.cpp | 36 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/cpp/frameProcessor/src/FileWriterPlugin.cpp b/cpp/frameProcessor/src/FileWriterPlugin.cpp index 0c1ca5861..f9f69433d 100644 --- a/cpp/frameProcessor/src/FileWriterPlugin.cpp +++ b/cpp/frameProcessor/src/FileWriterPlugin.cpp @@ -879,7 +879,7 @@ void FileWriterPlugin::status(OdinData::IpcMessage& status) { // Record the plugin's status items std::string prefix = get_name() + '/'; - status.set_param(prefix + STATUS_TIMEOUT_ACTIVE, this->writing_); + status.set_param(prefix + STATUS_WRITING, this->writing_); status.set_param(prefix + STATUS_FRAMES_MAX, (int)this->current_acquisition_->frames_to_write_); status.set_param(prefix + STATUS_FRAMES_WRITTEN, (int)this->current_acquisition_->frames_written_); status.set_param(prefix + STATUS_FRAMES_PROCESSED, (int)this->current_acquisition_->frames_processed_); diff --git a/cpp/frameProcessor/test/FileWriterPluginTest.cpp b/cpp/frameProcessor/test/FileWriterPluginTest.cpp index 1c8154b22..b37c4126e 100644 --- a/cpp/frameProcessor/test/FileWriterPluginTest.cpp +++ b/cpp/frameProcessor/test/FileWriterPluginTest.cpp @@ -151,4 +151,40 @@ BOOST_AUTO_TEST_CASE(FileWriterPluginZeroFrames) } } +BOOST_AUTO_TEST_CASE(FileWriterPluginStatusSanityCheck) +{ + OdinData::IpcMessage reply; + FrameProcessor::FileWriterPlugin fwp; + using FPFW = FrameProcessor::FileWriterPlugin; + fwp.set_name("hdf_status"); + fwp.status(reply); + std::string&& prefix = fwp.get_name() + '/'; + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_WRITING)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_MAX)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_WRITTEN)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_WRITTEN)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_PROCESSED)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FILE_PATH)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FILE_NAME)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_ACQUISITION_ID)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_PROCESSES)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_RANK)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_TIMEOUT_ACTIVE)); + + prefix += FPFW::STATUS_TIMING; + BOOST_CHECK(reply.has_param(prefix)); + prefix += '/'; + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_LAST_CREATE)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_MAX_CREATE)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_MEAN_CREATE)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_LAST_WRITE)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_MEAN_WRITE)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_LAST_FLUSH)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_MAX_FLUSH)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_MEAN_FLUSH)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_LAST_CLOSE)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_MAX_CLOSE)); + BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_MEAN_CLOSE)); +} + BOOST_AUTO_TEST_SUITE_END(); From 38eaf0588e66cca843e4cb6d3cbee49b4ddcd837 Mon Sep 17 00:00:00 2001 From: Ohisemega Date: Mon, 30 Mar 2026 13:39:47 +0100 Subject: [PATCH 02/11] Add NO_THROW requiremnt to FileWriterPluginTest --- cpp/frameProcessor/test/FileWriterPluginTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/frameProcessor/test/FileWriterPluginTest.cpp b/cpp/frameProcessor/test/FileWriterPluginTest.cpp index b37c4126e..1f1639da1 100644 --- a/cpp/frameProcessor/test/FileWriterPluginTest.cpp +++ b/cpp/frameProcessor/test/FileWriterPluginTest.cpp @@ -157,7 +157,7 @@ BOOST_AUTO_TEST_CASE(FileWriterPluginStatusSanityCheck) FrameProcessor::FileWriterPlugin fwp; using FPFW = FrameProcessor::FileWriterPlugin; fwp.set_name("hdf_status"); - fwp.status(reply); + BOOST_REQUIRE_NO_THROW(fwp.status(reply)); std::string&& prefix = fwp.get_name() + '/'; BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_WRITING)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_MAX)); From 1acb29d0eaee705caf2e30ad5695997336cb203a Mon Sep 17 00:00:00 2001 From: Alan Greer Date: Mon, 30 Mar 2026 16:37:40 +0100 Subject: [PATCH 03/11] Testing code --- cpp/frameProcessor/test/FileWriterPluginTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/frameProcessor/test/FileWriterPluginTest.cpp b/cpp/frameProcessor/test/FileWriterPluginTest.cpp index 1f1639da1..ed75c3aad 100644 --- a/cpp/frameProcessor/test/FileWriterPluginTest.cpp +++ b/cpp/frameProcessor/test/FileWriterPluginTest.cpp @@ -158,7 +158,7 @@ BOOST_AUTO_TEST_CASE(FileWriterPluginStatusSanityCheck) using FPFW = FrameProcessor::FileWriterPlugin; fwp.set_name("hdf_status"); BOOST_REQUIRE_NO_THROW(fwp.status(reply)); - std::string&& prefix = fwp.get_name() + '/'; + std::string prefix = fwp.get_name() + '/'; BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_WRITING)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_MAX)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_WRITTEN)); From 7d0b0103547a30085e1c2b37fe7c60701dfc2f44 Mon Sep 17 00:00:00 2001 From: Alan Greer Date: Mon, 30 Mar 2026 16:47:32 +0100 Subject: [PATCH 04/11] Testing code --- cpp/frameProcessor/test/FileWriterPluginTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/frameProcessor/test/FileWriterPluginTest.cpp b/cpp/frameProcessor/test/FileWriterPluginTest.cpp index ed75c3aad..2f07fdb5f 100644 --- a/cpp/frameProcessor/test/FileWriterPluginTest.cpp +++ b/cpp/frameProcessor/test/FileWriterPluginTest.cpp @@ -159,7 +159,7 @@ BOOST_AUTO_TEST_CASE(FileWriterPluginStatusSanityCheck) fwp.set_name("hdf_status"); BOOST_REQUIRE_NO_THROW(fwp.status(reply)); std::string prefix = fwp.get_name() + '/'; - BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_WRITING)); +/* BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_WRITING)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_MAX)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_WRITTEN)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_WRITTEN)); @@ -185,6 +185,7 @@ BOOST_AUTO_TEST_CASE(FileWriterPluginStatusSanityCheck) BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_LAST_CLOSE)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_MAX_CLOSE)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_MEAN_CLOSE)); + */ } BOOST_AUTO_TEST_SUITE_END(); From 201a6f9ec97e8d56925cd90b0f482e42421c9345 Mon Sep 17 00:00:00 2001 From: Alan Greer Date: Tue, 31 Mar 2026 12:23:08 +0100 Subject: [PATCH 05/11] Testing --- cpp/frameProcessor/test/FileWriterPluginTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/frameProcessor/test/FileWriterPluginTest.cpp b/cpp/frameProcessor/test/FileWriterPluginTest.cpp index 2f07fdb5f..fda9b2e62 100644 --- a/cpp/frameProcessor/test/FileWriterPluginTest.cpp +++ b/cpp/frameProcessor/test/FileWriterPluginTest.cpp @@ -159,8 +159,8 @@ BOOST_AUTO_TEST_CASE(FileWriterPluginStatusSanityCheck) fwp.set_name("hdf_status"); BOOST_REQUIRE_NO_THROW(fwp.status(reply)); std::string prefix = fwp.get_name() + '/'; -/* BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_WRITING)); - BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_MAX)); + BOOST_CHECK(reply.has_param("hdf_status/writing")); +/* BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_MAX)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_WRITTEN)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_WRITTEN)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_PROCESSED)); From 1a6d497ad54642ce04ba5a2887aee5bbb79181a4 Mon Sep 17 00:00:00 2001 From: Alan Greer Date: Tue, 31 Mar 2026 13:06:05 +0100 Subject: [PATCH 06/11] Testing --- cpp/frameProcessor/test/FileWriterPluginTest.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cpp/frameProcessor/test/FileWriterPluginTest.cpp b/cpp/frameProcessor/test/FileWriterPluginTest.cpp index fda9b2e62..a37392a52 100644 --- a/cpp/frameProcessor/test/FileWriterPluginTest.cpp +++ b/cpp/frameProcessor/test/FileWriterPluginTest.cpp @@ -158,9 +158,12 @@ BOOST_AUTO_TEST_CASE(FileWriterPluginStatusSanityCheck) using FPFW = FrameProcessor::FileWriterPlugin; fwp.set_name("hdf_status"); BOOST_REQUIRE_NO_THROW(fwp.status(reply)); - std::string prefix = fwp.get_name() + '/'; - BOOST_CHECK(reply.has_param("hdf_status/writing")); -/* BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_MAX)); + + std::string&& prefix = fwp.get_name(); + OdinData::IpcMessage status(reply.get_param(prefix)); + BOOST_CHECK(status.has_param(FPFW::STATUS_WRITING)); + + /* BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_MAX)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_WRITTEN)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_WRITTEN)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_PROCESSED)); From d0a6a68bc824073a66e75639b85d34a9159fb735 Mon Sep 17 00:00:00 2001 From: Alan Greer Date: Tue, 31 Mar 2026 13:26:53 +0100 Subject: [PATCH 07/11] Testing --- .github/workflows/_cpp_test.yml | 4 ++-- cpp/frameProcessor/test/FileWriterPluginTest.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/_cpp_test.yml b/.github/workflows/_cpp_test.yml index e2604010a..b8c737939 100644 --- a/.github/workflows/_cpp_test.yml +++ b/.github/workflows/_cpp_test.yml @@ -46,14 +46,14 @@ jobs: INSTALL_PREFIX: ${{ env.INSTALL_PREFIX }} run: | for unittest in $(find $INSTALL_PREFIX/bin -name "unit_fr_*"); do - $unittest --log_level=test_suite + $unittest --log_level=all done - name: Run frame processor unit tests env: INSTALL_PREFIX: ${{ env.INSTALL_PREFIX }} run: | for unittest in $(find $INSTALL_PREFIX/bin -name "unit_fp_*"); do - $unittest --log_level=test_suite + $unittest --log_level=all done - name: Run odin-data frame integration test env: diff --git a/cpp/frameProcessor/test/FileWriterPluginTest.cpp b/cpp/frameProcessor/test/FileWriterPluginTest.cpp index a37392a52..11963229d 100644 --- a/cpp/frameProcessor/test/FileWriterPluginTest.cpp +++ b/cpp/frameProcessor/test/FileWriterPluginTest.cpp @@ -159,7 +159,13 @@ BOOST_AUTO_TEST_CASE(FileWriterPluginStatusSanityCheck) fwp.set_name("hdf_status"); BOOST_REQUIRE_NO_THROW(fwp.status(reply)); - std::string&& prefix = fwp.get_name(); + std::vector names = reply.get_param_names(); + for (auto iter = names.begin(); iter != names.end(); ++iter){ + std::cout << *iter << std::endl; + BOOST_TEST_MESSAGE(*iter); + } + + std::string prefix = fwp.get_name(); OdinData::IpcMessage status(reply.get_param(prefix)); BOOST_CHECK(status.has_param(FPFW::STATUS_WRITING)); From 90f724d08e79e3306b31f50e74e152164bd43189 Mon Sep 17 00:00:00 2001 From: Alan Greer Date: Tue, 31 Mar 2026 13:44:30 +0100 Subject: [PATCH 08/11] Testing --- cpp/frameProcessor/test/FileWriterPluginTest.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cpp/frameProcessor/test/FileWriterPluginTest.cpp b/cpp/frameProcessor/test/FileWriterPluginTest.cpp index 11963229d..21da92bbe 100644 --- a/cpp/frameProcessor/test/FileWriterPluginTest.cpp +++ b/cpp/frameProcessor/test/FileWriterPluginTest.cpp @@ -167,7 +167,13 @@ BOOST_AUTO_TEST_CASE(FileWriterPluginStatusSanityCheck) std::string prefix = fwp.get_name(); OdinData::IpcMessage status(reply.get_param(prefix)); - BOOST_CHECK(status.has_param(FPFW::STATUS_WRITING)); + names = status.get_param_names(); + for (auto iter = names.begin(); iter != names.end(); ++iter){ + BOOST_TEST_MESSAGE(*iter); + } + + +// BOOST_CHECK(status.has_param(FPFW::STATUS_WRITING)); /* BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_MAX)); BOOST_CHECK(reply.has_param(prefix + FPFW::STATUS_FRAMES_WRITTEN)); From 0b0463d1af892eaa238b6e44cfee013e4fb48c3a Mon Sep 17 00:00:00 2001 From: Alan Greer Date: Tue, 31 Mar 2026 14:32:52 +0100 Subject: [PATCH 09/11] Testing --- cpp/frameProcessor/test/FileWriterPluginTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/frameProcessor/test/FileWriterPluginTest.cpp b/cpp/frameProcessor/test/FileWriterPluginTest.cpp index 21da92bbe..217c45bee 100644 --- a/cpp/frameProcessor/test/FileWriterPluginTest.cpp +++ b/cpp/frameProcessor/test/FileWriterPluginTest.cpp @@ -156,7 +156,7 @@ BOOST_AUTO_TEST_CASE(FileWriterPluginStatusSanityCheck) OdinData::IpcMessage reply; FrameProcessor::FileWriterPlugin fwp; using FPFW = FrameProcessor::FileWriterPlugin; - fwp.set_name("hdf_status"); + fwp.set_name("hdf"); BOOST_REQUIRE_NO_THROW(fwp.status(reply)); std::vector names = reply.get_param_names(); From d6d09462094725d32138a47c11d8ff7505929dd0 Mon Sep 17 00:00:00 2001 From: Alan Greer Date: Tue, 31 Mar 2026 14:51:57 +0100 Subject: [PATCH 10/11] Testing --- cpp/frameProcessor/test/FileWriterPluginTest.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/frameProcessor/test/FileWriterPluginTest.cpp b/cpp/frameProcessor/test/FileWriterPluginTest.cpp index 217c45bee..c88e792c7 100644 --- a/cpp/frameProcessor/test/FileWriterPluginTest.cpp +++ b/cpp/frameProcessor/test/FileWriterPluginTest.cpp @@ -159,6 +159,7 @@ BOOST_AUTO_TEST_CASE(FileWriterPluginStatusSanityCheck) fwp.set_name("hdf"); BOOST_REQUIRE_NO_THROW(fwp.status(reply)); + BOOST_TEST_MESSAGE(reply.encode()); std::vector names = reply.get_param_names(); for (auto iter = names.begin(); iter != names.end(); ++iter){ std::cout << *iter << std::endl; From 50a74435af04212cabdf9b0b05e52bd3d2ed2176 Mon Sep 17 00:00:00 2001 From: Alan Greer Date: Tue, 31 Mar 2026 15:06:42 +0100 Subject: [PATCH 11/11] Testing --- .../test/FileWriterPluginTest.cpp | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/cpp/frameProcessor/test/FileWriterPluginTest.cpp b/cpp/frameProcessor/test/FileWriterPluginTest.cpp index c88e792c7..ce4ca18c9 100644 --- a/cpp/frameProcessor/test/FileWriterPluginTest.cpp +++ b/cpp/frameProcessor/test/FileWriterPluginTest.cpp @@ -153,25 +153,28 @@ BOOST_AUTO_TEST_CASE(FileWriterPluginZeroFrames) BOOST_AUTO_TEST_CASE(FileWriterPluginStatusSanityCheck) { - OdinData::IpcMessage reply; FrameProcessor::FileWriterPlugin fwp; using FPFW = FrameProcessor::FileWriterPlugin; fwp.set_name("hdf"); - BOOST_REQUIRE_NO_THROW(fwp.status(reply)); - - BOOST_TEST_MESSAGE(reply.encode()); - std::vector names = reply.get_param_names(); - for (auto iter = names.begin(); iter != names.end(); ++iter){ - std::cout << *iter << std::endl; - BOOST_TEST_MESSAGE(*iter); + { + OdinData::IpcMessage reply; + BOOST_REQUIRE_NO_THROW(fwp.status(reply)); + BOOST_TEST_MESSAGE(reply.encode()); } - std::string prefix = fwp.get_name(); - OdinData::IpcMessage status(reply.get_param(prefix)); - names = status.get_param_names(); - for (auto iter = names.begin(); iter != names.end(); ++iter){ - BOOST_TEST_MESSAGE(*iter); - } + +// std::vector names = reply.get_param_names(); +// for (auto iter = names.begin(); iter != names.end(); ++iter){ +// std::cout << *iter << std::endl; +// BOOST_TEST_MESSAGE(*iter); +// } + +// std::string prefix = fwp.get_name(); +// OdinData::IpcMessage status(reply.get_param(prefix)); +// names = status.get_param_names(); +// for (auto iter = names.begin(); iter != names.end(); ++iter){ +// BOOST_TEST_MESSAGE(*iter); +// } // BOOST_CHECK(status.has_param(FPFW::STATUS_WRITING));