@@ -26,6 +26,7 @@ fn poll_aio(mut aiocb: &mut AioCb) -> Result<()> {
26
26
// bindings. So it's sufficient to check that AioCb.cancel returned any
27
27
// AioCancelStat value.
28
28
#[ test]
29
+ #[ cfg_attr( all( target_env = "musl" , target_arch = "x86_64" ) , ignore) ]
29
30
fn test_cancel ( ) {
30
31
let wbuf: & ' static [ u8 ] = b"CDEF" ;
31
32
@@ -50,6 +51,7 @@ fn test_cancel() {
50
51
51
52
// Tests using aio_cancel_all for all outstanding IOs.
52
53
#[ test]
54
+ #[ cfg_attr( all( target_env = "musl" , target_arch = "x86_64" ) , ignore) ]
53
55
fn test_aio_cancel_all ( ) {
54
56
let wbuf: & ' static [ u8 ] = b"CDEF" ;
55
57
@@ -73,6 +75,7 @@ fn test_aio_cancel_all() {
73
75
}
74
76
75
77
#[ test]
78
+ #[ cfg_attr( all( target_env = "musl" , target_arch = "x86_64" ) , ignore) ]
76
79
fn test_fsync ( ) {
77
80
const INITIAL : & ' static [ u8 ] = b"abcdef123456" ;
78
81
let mut f = tempfile ( ) . unwrap ( ) ;
@@ -88,6 +91,7 @@ fn test_fsync() {
88
91
89
92
90
93
#[ test]
94
+ #[ cfg_attr( all( target_env = "musl" , target_arch = "x86_64" ) , ignore) ]
91
95
fn test_aio_suspend ( ) {
92
96
const INITIAL : & ' static [ u8 ] = b"abcdef123456" ;
93
97
const WBUF : & ' static [ u8 ] = b"CDEF" ;
@@ -129,6 +133,7 @@ fn test_aio_suspend() {
129
133
// Test a simple aio operation with no completion notification. We must poll
130
134
// for completion
131
135
#[ test]
136
+ #[ cfg_attr( all( target_env = "musl" , target_arch = "x86_64" ) , ignore) ]
132
137
fn test_read ( ) {
133
138
const INITIAL : & ' static [ u8 ] = b"abcdef123456" ;
134
139
let rbuf = Rc :: new ( vec ! [ 0 ; 4 ] . into_boxed_slice ( ) ) ;
@@ -154,6 +159,7 @@ fn test_read() {
154
159
155
160
// Tests from_mut_slice
156
161
#[ test]
162
+ #[ cfg_attr( all( target_env = "musl" , target_arch = "x86_64" ) , ignore) ]
157
163
fn test_read_into_mut_slice ( ) {
158
164
const INITIAL : & ' static [ u8 ] = b"abcdef123456" ;
159
165
let mut rbuf = vec ! [ 0 ; 4 ] ;
@@ -178,8 +184,10 @@ fn test_read_into_mut_slice() {
178
184
}
179
185
180
186
// Test reading into an immutable buffer. It should fail
187
+ // FIXME: This test fails to panic on Linux/musl
181
188
#[ test]
182
189
#[ should_panic( expected = "Can't read into an immutable buffer" ) ]
190
+ #[ cfg_attr( target_env = "musl" , ignore) ]
183
191
fn test_read_immutable_buffer ( ) {
184
192
let rbuf: & ' static [ u8 ] = b"CDEF" ;
185
193
let f = tempfile ( ) . unwrap ( ) ;
@@ -196,6 +204,7 @@ fn test_read_immutable_buffer() {
196
204
// Test a simple aio operation with no completion notification. We must poll
197
205
// for completion. Unlike test_aio_read, this test uses AioCb::from_slice
198
206
#[ test]
207
+ #[ cfg_attr( all( target_env = "musl" , target_arch = "x86_64" ) , ignore) ]
199
208
fn test_write ( ) {
200
209
const INITIAL : & ' static [ u8 ] = b"abcdef123456" ;
201
210
let wbuf = "CDEF" . to_string ( ) . into_bytes ( ) ;
@@ -233,7 +242,9 @@ extern fn sigfunc(_: c_int) {
233
242
}
234
243
235
244
// Test an aio operation with completion delivered by a signal
245
+ // FIXME: This test is ignored on mips because of failures in qemu in CI
236
246
#[ test]
247
+ #[ cfg_attr( any( all( target_env = "musl" , target_arch = "x86_64" ) , target_arch = "mips" ) , ignore) ]
237
248
fn test_write_sigev_signal ( ) {
238
249
let _ = SIGUSR2_MTX . lock ( ) . expect ( "Mutex got poisoned by another test" ) ;
239
250
let sa = SigAction :: new ( SigHandler :: Handler ( sigfunc) ,
@@ -274,6 +285,7 @@ fn test_write_sigev_signal() {
274
285
// lio_listio returns.
275
286
#[ test]
276
287
#[ cfg( not( any( target_os = "ios" , target_os = "macos" ) ) ) ]
288
+ #[ cfg_attr( all( target_env = "musl" , target_arch = "x86_64" ) , ignore) ]
277
289
fn test_lio_listio_wait ( ) {
278
290
const INITIAL : & ' static [ u8 ] = b"abcdef123456" ;
279
291
const WBUF : & ' static [ u8 ] = b"CDEF" ;
@@ -316,6 +328,7 @@ fn test_lio_listio_wait() {
316
328
// mechanism to check for the individual AioCb's completion.
317
329
#[ test]
318
330
#[ cfg( not( any( target_os = "ios" , target_os = "macos" ) ) ) ]
331
+ #[ cfg_attr( all( target_env = "musl" , target_arch = "x86_64" ) , ignore) ]
319
332
fn test_lio_listio_nowait ( ) {
320
333
const INITIAL : & ' static [ u8 ] = b"abcdef123456" ;
321
334
const WBUF : & ' static [ u8 ] = b"CDEF" ;
@@ -358,8 +371,10 @@ fn test_lio_listio_nowait() {
358
371
359
372
// Test lio_listio with LIO_NOWAIT and a SigEvent to indicate when all AioCb's
360
373
// are complete.
374
+ // FIXME: This test is ignored on mips because of failures in qemu in CI.
361
375
#[ test]
362
376
#[ cfg( not( any( target_os = "ios" , target_os = "macos" ) ) ) ]
377
+ #[ cfg_attr( any( target_arch = "mips" , target_env = "musl" ) , ignore) ]
363
378
fn test_lio_listio_signal ( ) {
364
379
let _ = SIGUSR2_MTX . lock ( ) . expect ( "Mutex got poisoned by another test" ) ;
365
380
const INITIAL : & ' static [ u8 ] = b"abcdef123456" ;
@@ -410,9 +425,11 @@ fn test_lio_listio_signal() {
410
425
}
411
426
412
427
// Try to use lio_listio to read into an immutable buffer. It should fail
428
+ // FIXME: This test fails to panic on Linux/musl
413
429
#[ test]
414
430
#[ cfg( not( any( target_os = "ios" , target_os = "macos" ) ) ) ]
415
431
#[ should_panic( expected = "Can't read into an immutable buffer" ) ]
432
+ #[ cfg_attr( target_env = "musl" , ignore) ]
416
433
fn test_lio_listio_read_immutable ( ) {
417
434
let rbuf: & ' static [ u8 ] = b"abcd" ;
418
435
let f = tempfile ( ) . unwrap ( ) ;
@@ -430,6 +447,7 @@ fn test_lio_listio_read_immutable() {
430
447
// Test dropping an AioCb that hasn't yet finished. Behind the scenes, the
431
448
// library should wait for the AioCb's completion.
432
449
#[ test]
450
+ #[ cfg_attr( all( target_env = "musl" , target_arch = "x86_64" ) , ignore) ]
433
451
fn test_drop ( ) {
434
452
const INITIAL : & ' static [ u8 ] = b"abcdef123456" ;
435
453
const WBUF : & ' static [ u8 ] = b"CDEF" ; //"CDEF".to_string().into_bytes();
0 commit comments