()
| 154 | } |
| 155 | |
| 156 | fn main() { |
| 157 | let mut args = env::args(); |
| 158 | let prog = args.next().unwrap(); |
| 159 | let arg = if let Some(arg) = args.next() { |
| 160 | arg |
| 161 | } else { |
| 162 | eprintln!("usage: {prog} <scratch directory>"); |
| 163 | process::exit(1); |
| 164 | }; |
| 165 | |
| 166 | // Open scratch directory |
| 167 | let dir_fd = match open_scratch_directory(&arg) { |
| 168 | Ok(dir_fd) => dir_fd, |
| 169 | Err(err) => { |
| 170 | eprintln!("{err}"); |
| 171 | process::exit(1) |
| 172 | } |
| 173 | }; |
| 174 | |
| 175 | // Run the tests. |
| 176 | unsafe { |
| 177 | test_path_open_read_write(dir_fd, BlockingMode::Blocking); |
| 178 | test_path_open_read_write(dir_fd, BlockingMode::NonBlocking); |
| 179 | } |
| 180 | } |
nothing calls this directly
no test coverage detected