diff options
| author | Christian Legnitto <christian@legnitto.com> | 2023-04-11 09:01:25 -0400 |
|---|---|---|
| committer | Christian Legnitto <christian@legnitto.com> | 2023-04-11 09:07:43 -0400 |
| commit | 3bc5dab53f4260596d5ee15c6876d8637d41a7fc (patch) | |
| tree | 749fec46841341ddd3baec5f00c31a749566411e /src/tools/miri/tests | |
| parent | 2c455530e1d78036e83adbc930a799caadc90022 (diff) | |
| download | rust-3bc5dab53f4260596d5ee15c6876d8637d41a7fc.tar.gz rust-3bc5dab53f4260596d5ee15c6876d8637d41a7fc.zip | |
Add shim for SIGRTMIN
Fixes https://github.com/rust-lang/miri/issues/2832.
Diffstat (limited to 'src/tools/miri/tests')
| -rw-r--r-- | src/tools/miri/tests/pass-dep/shims/libc-misc.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tools/miri/tests/pass-dep/shims/libc-misc.rs b/src/tools/miri/tests/pass-dep/shims/libc-misc.rs index 98e1c3a0adb..b9f51a9f0a6 100644 --- a/src/tools/miri/tests/pass-dep/shims/libc-misc.rs +++ b/src/tools/miri/tests/pass-dep/shims/libc-misc.rs @@ -302,6 +302,24 @@ fn test_posix_mkstemp() { } } +#[cfg(target_os = "linux")] +fn test_sigrt() { + let min = libc::SIGRTMIN(); + let max = libc::SIGRTMAX(); + + // "The Linux kernel supports a range of 33 different real-time + // signals, numbered 32 to 64" + assert!(min >= 32); + assert!(max >= 32); + assert!(min <= 64); + assert!(max <= 64); + + // "POSIX.1-2001 requires that an implementation support at least + // _POSIX_RTSIG_MAX (8) real-time signals."" + assert!(min < max); + assert!(max - min >= 8) +} + fn main() { test_posix_gettimeofday(); test_posix_mkstemp(); @@ -319,5 +337,6 @@ fn main() { { test_posix_fadvise(); test_sync_file_range(); + test_sigrt(); } } |
