From: Eric Wong Date: 2015-12-11T07:48:34+00:00 Subject: [ruby-core:72050] Re: [ruby-cvs:60187] nobu:r53034 (trunk): test_io.rb: fix IO#advise on aarch64-linux nobu@ruby-lang.org wrote: > New Revision: 53034 > > http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53034 > > Log: > test_io.rb: fix IO#advise on aarch64-linux > > * test/ruby/test_io.rb (test_advise, test_advise_pipe): fadvise on > aarch64-linux returns ESYS. How about we hide ENOSYS from the user? IO#advise is already a no-op on systems where posix_fadvise is non-existent at build time. --- a/io.c +++ b/io.c @@ -8586,7 +8586,7 @@ do_io_advise(rb_io_t *fptr, VALUE advice, off_t offset, off_t len) ias.len = len; rv = (int)rb_thread_io_blocking_region(io_advise_internal, &ias, fptr->fd); - if (rv) { + if (rv && rv != ENOSYS) { /* posix_fadvise(2) doesn't set errno. On success it returns 0; otherwise it returns the error code. */ VALUE message = rb_sprintf("%"PRIsVALUE" "