Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a crashy program for SetString test. #4443

Open
wants to merge 1 commit into
base: 25.lts.1+
Choose a base branch
from

Conversation

v-kryachko
Copy link
Collaborator

b/358663298

Change-Id: If8931dac92837bc7295006e7c3e57fe8f91dc627

b/358663298

Change-Id: If8931dac92837bc7295006e7c3e57fe8f91dc627
@@ -29,3 +29,13 @@ target(gtest_target_type, "extension_test") {
deps += cobalt_platform_dependencies
}
}

target(gtest_target_type, "setstring_test") {
Copy link
Member

Choose a reason for hiding this comment

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

The target itself here looks fine.

But if you want to make it part of the CI / automatic test runs in this branch, you'll also have to add this new target into GetTestTargets either in cobalt/build/cobalt_configuration.py or in the platform specific equivalent.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In current implementation, this test is an integration test, because involves a host and a target parts. Hence, it cannot be a part of the CI / automatic test. This PR contains the target part.

Copy link
Member

Choose a reason for hiding this comment

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

Lets describe this intent in the comment above the test itself - it's not obvious from the code. Other than that lgtm.

extension_api->SetString("Annotation3", long_string);
extension_api->SetString("Annotation4", long_string);

SbSystemBreakIntoDebugger();
Copy link
Member

Choose a reason for hiding this comment

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

Do we simply expect this test to crash ?

Note that our current version of GoogleTest on Starboard does not yet support Death Tests:

https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, it just crashes to generate a coredump. Would be nice to implement it as a Death Test.

Copy link
Member

@kaidokert kaidokert left a comment

Choose a reason for hiding this comment

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

lgtm - lets just describe the intent clearly in a comment above the test, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants