Disable tests with in cargo test arguments instead of using a patch

epel10
Fabio Valentini 2 years ago
parent fdc240b56c
commit 7af0c62613
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

@ -1,40 +0,0 @@
--- fallible_collections-0.4.6/src/vec.rs 2023-02-03 19:12:28.802949438 +0100
+++ fallible_collections-0.4.6/src/vec.rs 2023-02-03 19:12:28.802949438 +0100
@@ -821,22 +821,22 @@ mod tests {
assert_eq!(v.try_clone().unwrap(), v);
}
- #[test]
- fn try_clone_oom() {
- let layout = Layout::new::<u8>();
- let v =
- unsafe { Vec::<u8>::from_raw_parts(alloc(layout), core::isize::MAX as usize, core::isize::MAX as usize) };
- assert!(v.try_clone().is_err());
- }
+ // #[test]
+ // fn try_clone_oom() {
+ // let layout = Layout::new::<u8>();
+ // let v =
+ // unsafe { Vec::<u8>::from_raw_parts(alloc(layout), core::isize::MAX as usize, core::isize::MAX as usize) };
+ // assert!(v.try_clone().is_err());
+ // }
- #[test]
- fn tryvec_try_clone_oom() {
- let layout = Layout::new::<u8>();
- let inner =
- unsafe { Vec::<u8>::from_raw_parts(alloc(layout), core::isize::MAX as usize, core::isize::MAX as usize) };
- let tv = TryVec { inner };
- assert!(tv.try_clone().is_err());
- }
+ // #[test]
+ // fn tryvec_try_clone_oom() {
+ // let layout = Layout::new::<u8>();
+ // let inner =
+ // unsafe { Vec::<u8>::from_raw_parts(alloc(layout), core::isize::MAX as usize, core::isize::MAX as usize) };
+ // let tv = TryVec { inner };
+ // assert!(tv.try_clone().is_err());
+ // }
// #[test]
// fn try_out_of_mem() {

@ -14,15 +14,10 @@ License: MIT OR Apache-2.0
URL: https://crates.io/crates/fallible_collections
Source: %{crates_source}
# Deactivate some tests because they are failing -->
# https://github.com/vcombey/fallible_collections/issues/35
Patch: deactivate-improper-tests.patch
BuildRequires: rust-packaging >= 21
%global _description %{expand:
Implement Fallible collections on allocation errors, quite as describe in RFC 2116.
This was used in the turbofish OS hobby project to mitigate
the lack of faillible allocation in rust.}
Crate which adds fallible allocation api to std collections.}
%description %{_description}
@ -116,7 +111,9 @@ use the "unstable" feature of the "%{crate}" crate.
%if %{with check}
%check
%cargo_test
# * skip two tests that rely on UB and crash with recent Rust versions:
# https://github.com/vcombey/fallible_collections/issues/35
%cargo_test -- -- --skip try_clone_oom --skip tryvec_try_clone_oom
%endif
%changelog

Loading…
Cancel
Save