-
Notifications
You must be signed in to change notification settings - Fork 4
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 panicking::panic_count
to mc-sgx-panic
#31
Conversation
cf501b9
to
b4249a1
Compare
6b9ea87
to
156d939
Compare
Moved back to a draft, with the failures on, https://github.com/mobilecoinfoundation/sgx-std/actions/runs/3887979469/jobs/6634849726, it seems pretty clear that the value is not being thread local ---- panicking::test::decrementing_one_at_a_time stdout ----
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `5`,
right: `4`', panic/src/panicking.rs:100:9
---- panicking::test::incrementing_one_at_a_time stdout ----
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `6`,
right: `1`', panic/src/panicking.rs:88:9
---- panicking::test::initialized_to_0 stdout ----
thread 'main' panicked at 'assertion failed: `(left == right)`
left: `6`,
right: `0`', panic/src/panicking.rs:68:9 |
Doing some debugging have the side by side of what rust std does and what is being attempted in this PR https://godbolt.org/z/r3c37Tqxh |
156d939
to
a0e6386
Compare
a0e6386
to
b3ecd3a
Compare
moved out of draft, found problem that was causing llvm-cov to fail, added explanation in code at https://github.com/mobilecoinfoundation/sgx-std/pull/31/files#diff-0ce129c061b49b04073e4988bbaca5999d4b7148812aff7489623ab6f53edad8R66 /// By default each test runs in a separate thread thus having their own
/// thread local copy of `LOCAL_PANIC_COUNT`. However per
/// https://github.com/rust-lang/rust/issues/58907 when running single
/// threaded the thread is re-used for each test execution so the value
/// should be reset to a known value on each test. This also means that
/// there isn't a reliable way to test that 0 is the true initial value.
|
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
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.
Note: intel/linux-sgx#283
I looked through the current doc, https://download.01.org/intel-sgx/sgx-linux/2.18/docs/Intel_SGX_Developer_Reference_Linux_2.18_Open_Source.pdf trying to get a feel of how the threading worked, but wasn't able to piece it together. |
b4249a1
to
ad10063
Compare
b3ecd3a
to
804e883
Compare
Codecov Report
@@ Coverage Diff @@
## main #31 +/- ##
==========================================
+ Coverage 88.09% 91.71% +3.61%
==========================================
Files 5 6 +1
Lines 126 181 +55
==========================================
+ Hits 111 166 +55
Misses 15 15
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
804e883
to
d5adfa7
Compare
d5adfa7
to
388167b
Compare
388167b
to
c93e6bf
Compare
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.
This looks good to me.
✅ This pull request merged successfully as part of a Graphite job |
No description provided.