-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Test(fs): Fix test_eq_windows_file_type
for Windows 7
#141104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test(fs): Fix test_eq_windows_file_type
for Windows 7
#141104
Conversation
r? @ChrisDenton rustbot has assigned @ChrisDenton. Use |
test_eq_windows_file_type
for Windows 7
Hm, I don't feel too strongly about it but it might be better to use a drop guard here? If the assert fails for some reason then it'll panic and the readonly attribute will remain on the directory making it harder to clean up. |
Would otherwise fail on: ``` thread 'fs::tests::test_eq_windows_file_type' panicked at library/std/src/test_helpers.rs:53:20: called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: PermissionDenied, message: "Access is denied." } ``` This came from the read-only attribute set on the test file. In order to fix this, instead of simply disabling the test, the attribute is reset before the test's end so it may still run successfully. Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
f22021f
to
0dd5722
Compare
Indeed, done! I also added some |
Great, thanks! @bors r+ rollup |
…_file_type, r=ChrisDenton Test(fs): Fix `test_eq_windows_file_type` for Windows 7 Would otherwise fail on: ``` thread 'fs::tests::test_eq_windows_file_type' panicked at library/std/src/test_helpers.rs:53:20: called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: PermissionDenied, message: "Access is denied." } ``` This came from the read-only attribute set on the test file. In order to fix this, instead of simply disabling the test, the attribute is reset before the test's end so it may still run successfully. `@rustbot` label T-libs A-filesystem A-testsuite O-windows-7 O-windows-msvc
Cool, thanks! |
Rollup of 16 pull requests Successful merges: - #136429 (GCI: At their def site, actually wfcheck the where-clause & always eval free lifetime-generic constants) - #138139 (Emit warning while outputs is not exe and prints linkage info) - #141104 (Test(fs): Fix `test_eq_windows_file_type` for Windows 7) - #141477 (Path::with_extension: show that it adds an extension where one did no…) - #141533 (clean up old rintf leftovers) - #141612 (Call out possibility of invariant result in variance markers) - #141638 (Use `builtin_index` instead of hand-rolling it) - #141643 (ci: verify that codebuild jobs use ghcr.io) - #141675 (Reorder `ast::ItemKind::{Struct,Enum,Union}` fields.) - #141680 (replace TraitRef link memory.md) - #141682 (interpret/allocation: Fixup type for `alloc_bytes`) - #141683 (Handle ed2021 precise capturing of unsafe binder) - #141684 (rustbook: Bump versions of `onig` and `onig_sys`) - #141687 (core: unstably expose atomic_compare_exchange so stdarch can use it) - #141690 (Add `rustc_diagnostic_item` to `sys::Mutex` methods) - #141702 (Add eholk to compiler reviewer rotation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #141104 - PaulDance:fix-win7-test_eq_windows_file_type, r=ChrisDenton Test(fs): Fix `test_eq_windows_file_type` for Windows 7 Would otherwise fail on: ``` thread 'fs::tests::test_eq_windows_file_type' panicked at library/std/src/test_helpers.rs:53:20: called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: PermissionDenied, message: "Access is denied." } ``` This came from the read-only attribute set on the test file. In order to fix this, instead of simply disabling the test, the attribute is reset before the test's end so it may still run successfully. `@rustbot` label T-libs A-filesystem A-testsuite O-windows-7 O-windows-msvc
…_file_type, r=ChrisDenton Test(fs): Fix `test_eq_windows_file_type` for Windows 7 Would otherwise fail on: ``` thread 'fs::tests::test_eq_windows_file_type' panicked at library/std/src/test_helpers.rs:53:20: called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: PermissionDenied, message: "Access is denied." } ``` This came from the read-only attribute set on the test file. In order to fix this, instead of simply disabling the test, the attribute is reset before the test's end so it may still run successfully. `@rustbot` label T-libs A-filesystem A-testsuite O-windows-7 O-windows-msvc
Would otherwise fail on:
This came from the read-only attribute set on the test file. In order to fix this, instead of simply disabling the test, the attribute is reset before the test's end so it may still run successfully.
@rustbot label T-libs A-filesystem A-testsuite O-windows-7 O-windows-msvc