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

tss2-tcti: tcti-libtpms: fix test failure on big-endian platform #2675

Conversation

grandpaul
Copy link
Contributor

Due to tcti_libtpms->response_len and tcti_libtpms->response_buffer_len are size_t. We cannot convert the (size_t *) to (uint32_t *) on big-endian platforms. Thus we create temp uint32_t variables. Make the call and then assign it back to size_t variables.

This commit partially fix the test failure on big-endian platforms.

Due to tcti_libtpms->response_len and tcti_libtpms->response_buffer_len
are size_t. We cannot convert the (size_t *) to (uint32_t *) on big-endian
platforms. Thus we create temp uint32_t variables. Make the call and
then assign it back to size_t variables.

This commit partially fix the test failure on big-endian platforms.

Signed-off-by: Ying-Chun Liu (PaulLiu) <[email protected]>
@codecov
Copy link

codecov bot commented Aug 5, 2023

Codecov Report

Merging #2675 (9ae8553) into master (86949f7) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2675      +/-   ##
==========================================
- Coverage   82.54%   82.54%   -0.01%     
==========================================
  Files         368      368              
  Lines       42941    42947       +6     
==========================================
+ Hits        35447    35451       +4     
- Misses       7494     7496       +2     
Files Changed Coverage Δ
src/tss2-tcti/tcti-libtpms.c 90.16% <100.00%> (+0.20%) ⬆️

... and 3 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@bgermann
Copy link

bgermann commented Aug 7, 2023

This fixes #2531 in part.

@JuergenReppSIT JuergenReppSIT merged commit ede63dd into tpm2-software:master Nov 5, 2023
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.

4 participants