-
Notifications
You must be signed in to change notification settings - Fork 121
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
base: 25.lts.1+
Are you sure you want to change the base?
Conversation
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") { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
b/358663298
Change-Id: If8931dac92837bc7295006e7c3e57fe8f91dc627