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

BM/tdx-guest/tdx_mem_test.sh, in function memory_accepted_time() $actual_time is always 0? #325

Open
monokuma-zhuo opened this issue Jul 16, 2024 · 2 comments

Comments

@monokuma-zhuo
Copy link

BM/tdx-guest/tdx_mem_test.sh, in function memory_accepted_time(). It seems that $actual_time is always 0?
$SECONDS is 0, so that $actual_time is always 0.
Is this a bug for this testcase ?
image

@ysun
Copy link
Contributor

ysun commented Aug 21, 2024

@hongyuni Any comments ?

@hongyuni
Copy link
Contributor

Thanks for your query @monokuma-zhuo

$SECONDS is a special built-in variable that keeps track of the number of seconds that have elapsed since the shell was started (here SECONDS=0 reset it, then we can call it as the start point), so actual_time=$SECONDS got a real number of seconds when meet the above if condition. In short, I don't see a bug here and it works well in my regular regression test.

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

No branches or pull requests

3 participants