File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,11 @@ use std::io::Write;
55
66#[ test]
77fn test_seals ( ) {
8- let fd = memfd_create ( "test" , MemfdFlags :: CLOEXEC | MemfdFlags :: ALLOW_SEALING ) . unwrap ( ) ;
8+ let fd = match memfd_create ( "test" , MemfdFlags :: CLOEXEC | MemfdFlags :: ALLOW_SEALING ) {
9+ Ok ( fd) => fd,
10+ Err ( rustix:: io:: Error :: NOSYS ) => return ,
11+ Err ( err) => Err ( err) . unwrap ( ) ,
12+ } ;
913 let mut file = File :: from_fd ( fd. into ( ) ) ;
1014
1115 writeln ! ( & mut file, "Hello!" ) . unwrap ( ) ;
Original file line number Diff line number Diff line change @@ -26,7 +26,11 @@ fn test_prlimit() {
2626
2727 let first = rustix:: process:: getrlimit ( Resource :: Core ) ;
2828
29- let old = rustix:: process:: prlimit ( None , Resource :: Core , new. clone ( ) ) . unwrap ( ) ;
29+ let old = match rustix:: process:: prlimit ( None , Resource :: Core , new. clone ( ) ) {
30+ Ok ( rlimit) => rlimit,
31+ Err ( rustix:: io:: Error :: NOSYS ) => return ,
32+ Err ( e) => Err ( e) . unwrap ( ) ,
33+ } ;
3034
3135 assert_eq ! ( first, old) ;
3236
You can’t perform that action at this time.
0 commit comments