-
Notifications
You must be signed in to change notification settings - Fork 102
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
Ensure that cached.csr always exists at the beginning #2636
Conversation
Hi @steven-bellock . Could you review this PR? Thanks. |
char *file_name = "test_csr/cached.staging"; | ||
|
||
rename(file_name, new_name); | ||
|
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.
Delete whitespace.
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.
Thanks. I have deleted it.
@@ -322,6 +332,9 @@ void libspdm_test_requester_get_csr_case1(void **state) | |||
/*init req_info*/ | |||
libspdm_gen_req_info(); | |||
|
|||
/*ensure that cached.csr exists in test_csr at the beginning*/ | |||
libspdm_clear_cached_csr(); |
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.
Probably best to call this from libspdm_requester_get_csr_test_main
.
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.
Thanks. I have moved the code location.
Fix the issue: DMTF#2632 The successful unit_test will always make cached.csr name unchanged. But a failed unit_test may change cached.csr to cached.staging, which cause the next unit_test still failing even if the issue is fixed. Add new api to ensure that cached.csr always exists at the beginning. Signed-off-by: Wenxing Hou <wenxing.hou@intel.com>
8bd651b
to
7460a81
Compare
Fix: #2632
The successful unit_test will always make cached.csr name unchanged. But a failed unit_test may change cached.csr to cached.staging, which cause the next unit_test still failing even if the issue is fixed.
Add new api to ensure that cached.csr always exists at the beginning.