File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed
Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Test Timeout on macOS
2+
3+ on :
4+ push :
5+ branches :
6+ - fix-timeout-performance
7+ workflow_dispatch :
8+
9+ jobs :
10+ test-macos :
11+ runs-on : macos-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+
15+ - name : Install Rust
16+ uses : dtolnay/rust-toolchain@stable
17+
18+ - name : Build timeout
19+ run : cargo build --release -p uu_timeout
20+
21+ - name : Run timeout tests
22+ run : cargo test --test tests test_timeout -- --nocapture
23+
24+ - name : Test overflow case directly
25+ run : |
26+ ./target/release/timeout 9223372036854775808d sleep 0
27+ echo "Exit code: $?"
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ impl Config {
105105 } ;
106106
107107 if num > max_safe as u128 {
108- Duration :: from_secs ( i64 :: MAX as u64 )
108+ Duration :: from_secs ( libc :: time_t :: MAX as u64 )
109109 } else {
110110 let secs = ( num as u64 ) * multiplier;
111111 Duration :: from_secs ( secs)
You can’t perform that action at this time.
0 commit comments