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

regression_1041: give 5 seconds for /dev/tpm0 to appear #769

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

jforissier
Copy link
Contributor

It does take some time for the kernel to probe the fTPM device, and therefore if regression_1041 is run immediately after boot it may fail. Add a 5 second timeout to make the test reliable.

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

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

Acked-by: Etienne Carriere <[email protected]>

found = true;
break;
}
(void)usleep(1000000);
Copy link
Contributor

Choose a reason for hiding this comment

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

sleep(1) without a void cast?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

}
(void)usleep(1000000);
}
if (!found) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't we record an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed. Updated.

Copy link
Contributor

@jenswi-linaro jenswi-linaro left a comment

Choose a reason for hiding this comment

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

Acked-by: Jens Wiklander <[email protected]>

It does take some time for the kernel to probe the fTPM device, and
therefore if regression_1041 is run immediately after boot it may fail.
Add a 5 second timeout to make the test reliable.

Signed-off-by: Jerome Forissier <[email protected]>
Acked-by: Etienne Carriere <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
@jforissier jforissier merged commit a1739a1 into OP-TEE:master Jan 15, 2025
1 check passed
@jforissier jforissier deleted the ftpm-timeout branch January 15, 2025 15:33
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.

3 participants