Skip to content

Added serialization infrastructure - #1397

Draft
Tejaswini-Janjale25 wants to merge 1 commit into
eclipse-score:mainfrom
Tejaswini-Janjale25:teja_serializer_infrastructure
Draft

Tejaswini-Janjale25 wants to merge 1 commit into
eclipse-score:mainfrom
Tejaswini-Janjale25:teja_serializer_infrastructure

Conversation

@Tejaswini-Janjale25

Copy link
Copy Markdown
Contributor

Introduce shared serializer loading infrastructure under score/mw/com/impl/serialization using score::os dynamic loading, with supporting BUILD and integration test files. SWP-279540

Comment thread score/mw/com/impl/serialization/serialization_infrastructure.cpp Fixed
return;
}

std::fprintf(file, "%s\n", marker);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

SerializationInfrastructure(SerializationInfrastructure&&) = delete;
SerializationInfrastructure& operator=(SerializationInfrastructure&&) = delete;

bool IsOpen() const noexcept;

@mseth77 mseth77 Oct 19, 2026 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Result instead of nool

@Tejaswini-Janjale25 Tejaswini-Janjale25 Oct 21, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the code

SerializationInfrastructure& operator=(SerializationInfrastructure&&) = delete;

bool IsOpen() const noexcept;
const std::string& ErrorMessage() const noexcept;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get rid of Error message. Use Result as a return.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated it


const auto probe_value = infrastructure.ResolveSymbol<BackendProbeValueFn>("BackendProbeValue");
ASSERT_NE(probe_value, nullptr) << infrastructure.ErrorMessage();
EXPECT_EQ(probe_value(), 0xC0FFEE42U);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not use magic numbers

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated it

constexpr const char* kLifecycleFileEnv = "SERIALIZER_BACKEND_LIFECYCLE_FILE";
constexpr const char* kTestPluginRunfile =
"score_communication/score/mw/com/impl/serialization/serialization_infrastructure_test_plugin.so";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I remember dfcnlImpl provides a way to inject mocks.
Please rewrite the test using Mocks.

For reference look at Flock test in the mw::com repo.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the tests

Introduce shared serializer loading infrastructure under score/mw/com/impl/serialization using score::os dynamic loading, with supporting BUILD and integration test files. SWP-279540
@Tejaswini-Janjale25
Tejaswini-Janjale25 force-pushed the teja_serializer_infrastructure branch from 4575288 to 9d2f6bd Compare October 21, 2026 11:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants