Vytautas Astrauskas
48da0cf489
Fix prctl SET_NAME and GET_NAME behaviour.
2020-04-30 08:35:59 -07:00
Vytautas Astrauskas
3b5854191c
Fix MacOS and Windows builds.
2020-04-27 15:21:01 -07:00
Vytautas Astrauskas
331dbd1469
Add a test for joining in a destructor.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
39efdf31cf
Move prctl test to the same file as other libc tests.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
feb188360e
Unify TLS dtors; move stepping outside.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
8240ed26a9
Change the test not to rely on internals.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
cc9248a7c8
Ignore prctl test on MacOS because it does not support it.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
8a7dbde372
Check prctl argument types and fix the test.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
40e50bf58b
Clarify test comments.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
9a01c3fa3e
Clarify comments about TLS destructor handling in Windows, add a test for TLS destructors.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
80459bbf77
Improve concurrency tests.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
75e6549c11
Improve prctl, add a test.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
421be273cc
Add concurrency tests.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
d9ec0f2b36
Add a missing newline in the test.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
325c31e578
Address some of the reviewers comments.
2020-04-27 14:26:36 -07:00
Vytautas Astrauskas
1c8a59c691
Rebase on PR 1157.
2020-04-27 14:23:32 -07:00
Vytautas Astrauskas
b04bf8a514
Rustfmt the test.
2020-04-27 14:23:32 -07:00
Vytautas Astrauskas
aef4c95599
Fix the problem of sending pointed to thread local statics. Add a regression test.
2020-04-27 14:23:32 -07:00
Vytautas Astrauskas
92946b5a9c
Add a test for thread locals.
2020-04-27 14:23:32 -07:00
Vytautas Astrauskas
82f17ab917
Implement basic support for concurrency (Linux only).
2020-04-27 14:23:32 -07:00
Ralf Jung
a5ddaa07eb
rename tests: undefined -> uninit
2020-04-27 12:32:03 +02:00
bors
26baf87e43
Auto merge of #1348 - RalfJung:raw-addr-of-align, r=RalfJung
...
Stacked Borrows: alignment does not matter
Fixes https://github.com/rust-lang/miri/issues/1339
Requires https://github.com/rust-lang/rust/pull/71280
2020-04-22 21:44:14 +00:00
Ralf Jung
270adbc7c6
Stacked Borrows: alignment does not matter
2020-04-22 23:32:19 +02:00
David Cook
54897f66f8
Implement ftruncate64/ftruncate for File::set_len
2020-04-21 21:17:54 -05:00
bors
763782aa08
Auto merge of #1342 - divergentdave:pause-instruction, r=RalfJung
...
Handle std::sync::atomic::spin_loop_hint()
This PR adds support for `std::sync::atomic::spin_loop_hint()` by implementing the `llvm.x86.sse2.pause` intrinsic when the target is x86-based. It appears this is the first LLVM intrinsic in foreign_items, so I added a couple match blocks to handle it or fall through to the different OS-specific methods. I added a basic smoke test to `tests/run-pass/sync.rs`. I came across this by way of `crossbeam::utils::Backoff::spin()`, FWIW.
2020-04-19 14:53:02 +00:00
Ralf Jung
fbf47d1784
note source of test values
2020-04-19 09:21:00 +02:00
David Cook
7b69a6271e
Add support for std: 🧵 :yield_now
2020-04-18 19:31:02 -05:00
Ralf Jung
699685c07c
rename test_cast -> test_both_cast to make purpose clearer
2020-04-18 13:07:50 +02:00
bors
45113eb6a4
Auto merge of #1325 - RalfJung:float_to_int_unchecked, r=RalfJung
...
implement float_to_int_unchecked
@hanna-kruppe would be great if you could have a look at this.
`float.rs` tests legal casts. `test_cast` checks that both `as` casts and unchecked casts work (i.e., these are not saturating). The `compile-fail` tests should ensure that illegal casts via the intrinsic are detected as such.
Fixes https://github.com/rust-lang/miri/issues/1264
2020-04-18 08:13:24 +00:00
Ralf Jung
6a81014ae9
test #[derive] on packed struct
2020-04-17 11:04:48 +02:00
David Cook
57c7119315
Handle std::sync::atomic::spin_loop_hint()
2020-04-16 23:24:57 -05:00
Ralf Jung
3e3613f2e2
merge packed_static and packed_struct
2020-04-16 09:33:22 +02:00
Ralf Jung
974f9c3023
avoid test-wide allowance of unused/dead code
2020-04-16 09:25:12 +02:00
Ralf Jung
b0fe99e81d
consolidate ptr tests in fewer files
2020-04-16 09:06:21 +02:00
Ralf Jung
07c696e27e
test some so-far untested intrinsics
2020-04-15 18:00:16 +02:00
Ralf Jung
a85dab42ea
tighten Instance sanity check
2020-04-15 13:13:17 +02:00
bors
669191bca9
Auto merge of #1331 - samrat:macos-mach-timebase-info, r=RalfJung
...
Implement `mach_timebase_info` for macOS
Since we return nanoseceonds instead of ticks from `mach_absolute_time`, we don't need to scale the absolute time
Fixes #1288
2020-04-14 09:30:22 +00:00
Samrat Man Singh
f6bb8111f2
Use pre-defined u32 layout
...
Also fix typo and remove newline
2020-04-14 09:40:40 +05:30
Ralf Jung
fd8beaf5c4
add option to disable alignment checks
2020-04-13 17:58:03 +02:00
Samrat Man Singh
5f6d250b30
[macOS] Implement mach_timebase_info
...
Since we return nanoseceonds instead of ticks from
`mach_absolute_time`, we don't need to scale the absolute time
2020-04-13 21:18:34 +05:30
Ralf Jung
25c71e5c0e
test some more corner cases in happy float casts
2020-04-12 12:01:20 +02:00
Ralf Jung
78ce616490
implement float_to_int_unchecked
2020-04-12 12:01:20 +02:00
Ralf Jung
8d1f5336c2
also test unsafe cast intrinsic (happy cases)
2020-04-12 12:01:20 +02:00
Ralf Jung
e5e0ced87e
smoketest f32 fast-math intrinsics
2020-04-11 11:37:26 +02:00
Ralf Jung
faff175f3e
some some int-to-float and float-to-float cast tests from wasm test suite
2020-04-11 11:37:26 +02:00
Ralf Jung
5db01f7371
copy lots of float-to-int cast tests from wasm test suite
2020-04-11 11:37:26 +02:00
Ralf Jung
c63c413331
a few more inf/nan/negz tests
2020-04-11 11:37:26 +02:00
bors
325682ad56
Auto merge of #1301 - RalfJung:global-leaks, r=RalfJung
...
memory reachable through globals is not a leak
Blocked on https://github.com/rust-lang/rust/pull/70762
Fixes https://github.com/rust-lang/miri/issues/940
2020-04-07 17:33:24 +00:00
Ralf Jung
f462b4c257
memory reachable through globals is not a leak any more; adjust for better memory dumping
2020-04-07 19:03:41 +02:00
bors
3342f155e1
Auto merge of #1310 - RalfJung:float-assoc, r=RalfJung
...
prefer float assoc consts over std module
2020-04-07 14:42:34 +00:00