From 404c8261e978215dd224a4152b333938e868c4f0 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Tue, 3 May 2022 15:50:18 -0700 Subject: [PATCH] cros_async: ignore punch_hole tests on wine Wine does not support the FSCTL_SET_ZERO_DATA request: fixme:ntdll:server_ioctl_file Unsupported ioctl 980c8 (device=9 access=2 func=32 method=0) So ignore the tests that require it when using the mingw toolchain, which we assume means testing in wine for now. BUG=None TEST=tools/dev_container ./tools/run_tests --target=host --arch=win64 Change-Id: I351758fac3b3e1eb44545bb1d2340ddec4461120 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3626021 Reviewed-by: Noah Gold Commit-Queue: Daniel Verkamp Tested-by: kokoro Reviewed-by: Anton Romanov --- cros_async/src/sys/windows/handle_source.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cros_async/src/sys/windows/handle_source.rs b/cros_async/src/sys/windows/handle_source.rs index c40f884376..61aebeae8a 100644 --- a/cros_async/src/sys/windows/handle_source.rs +++ b/cros_async/src/sys/windows/handle_source.rs @@ -535,6 +535,7 @@ mod tests { assert_eq!(std::str::from_utf8(buf.as_slice()).unwrap(), "data"); } + #[cfg_attr(all(target_os = "windows", target_env = "gnu"), ignore)] #[test] fn test_punch_holes() { let mut temp_file = NamedTempFile::new().unwrap(); @@ -568,6 +569,7 @@ mod tests { } /// Test should fail because punch hole should not be allowed to allocate more memory + #[cfg_attr(all(target_os = "windows", target_env = "gnu"), ignore)] #[test] fn test_punch_holes_fail_out_of_bounds() { let mut temp_file = NamedTempFile::new().unwrap();