Test_advise failure on GNU/Linux

$B:#D+!“5$$,$D$$$?$N$G$9$,!”<j85$G(B test_advise $B$,<:GT$7$^$9!#(B

% ./ruby test/runner.rb test/ruby/test_io.rb -n test_advise
Run options: -n test_advise

Running tests:

[1/1] TestIO#test_advise = 0.02 s
1) Error:
test_advise(TestIO):
Errno::EINVAL: Invalid argument - /tmp/test_io20120606-9014-1n5vh7p
/home/ruby/tcstate/ruby/test/ruby/test_io.rb:1971:in advise' /home/ruby/tcstate/ruby/test/ruby/test_io.rb:1971:inblock (3
levels) in test_advise’
/home/ruby/tcstate/ruby/test/ruby/test_io.rb:1970:in open' /home/ruby/tcstate/ruby/test/ruby/test_io.rb:1970:inblock (2
levels) in test_advise’
/home/ruby/tcstate/ruby/test/ruby/test_io.rb:1969:in each' /home/ruby/tcstate/ruby/test/ruby/test_io.rb:1969:inblock in
test_advise’
/home/ruby/tcstate/ruby/test/ruby/test_io.rb:1968:in each' /home/ruby/tcstate/ruby/test/ruby/test_io.rb:1968:intest_advise’
/home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:1075:in run' /home/ruby/tcstate/lib/ruby/2.0.0/test/unit/testcase.rb:17:inrun’
/home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:840:in block in _run_suite' /home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:832:inmap’
/home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:832:in
_run_suite' /home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:649:inblock in
_run_suites’
/home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:647:in each' /home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:647:in_run_suites’
/home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:792:in
_run_anything' /home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:981:inrun_tests’
/home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:968:in block in _run' /home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:967:ineach’
/home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:967:in _run' /home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:956:inrun’
/home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:21:in run' /home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:751:inrun’
/home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:804:in run' /home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:808:inrun’
test/runner.rb:15:in `’

Finished tests in 0.026001s, 38.4597 tests/s, 2115.2831 assertions/s.
1 tests, 55 assertions, 0 failures, 1 errors, 0 skips

ruby -v: ruby 2.0.0dev (2012-06-06 trunk 35933) [x86_64-linux]
% uname -a
Linux cirrus 3.2.0-2-amd64 #1 SMP Mon May 21 17:45:41 UTC 2012
x86_64 GNU/Linux
% lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux testing (wheezy)
Release: testing
Codename: wheezy

$B:G6a$=$N$"$?$j$OJQ$o$C$F$J$$$h$&$J!"$H;W$C$F(B strace $B$7$F$_$k$H!"(B
fadvise64 $B$,(B EINVAL $B$N$h$&$G$9!#(B

% strace -e fadvise64 ./ruby test/runner.rb test/ruby/test_io.rb -n
test_advise
Run options: -n test_advise

Running tests:

[1/1] TestIO#test_advisefadvise64(5, 0, 0, POSIX_FADV_NORMAL) = 0
fadvise64(5, 0, 20, POSIX_FADV_NORMAL) = 0
fadvise64(5, 400, 2, POSIX_FADV_NORMAL) = 0
fadvise64(5, 0, 0, POSIX_FADV_RANDOM) = 0
fadvise64(5, 0, 20, POSIX_FADV_RANDOM) = 0
fadvise64(5, 400, 2, POSIX_FADV_RANDOM) = 0
fadvise64(5, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
fadvise64(5, 0, 20, POSIX_FADV_SEQUENTIAL) = 0
fadvise64(5, 400, 2, POSIX_FADV_SEQUENTIAL) = 0
fadvise64(5, 0, 0, POSIX_FADV_WILLNEED) = -1 EINVAL (Invalid argument)
= 0.02 s
1) Error:
test_advise(TestIO):
Errno::EINVAL: Invalid argument - /tmp/test_io20120606-9033-121z14z
/home/ruby/tcstate/ruby/test/ruby/test_io.rb:1971:in advise' /home/ruby/tcstate/ruby/test/ruby/test_io.rb:1971:inblock (3
levels) in test_advise’
/home/ruby/tcstate/ruby/test/ruby/test_io.rb:1970:in open' /home/ruby/tcstate/ruby/test/ruby/test_io.rb:1970:inblock (2
levels) in test_advise’
/home/ruby/tcstate/ruby/test/ruby/test_io.rb:1969:in each' /home/ruby/tcstate/ruby/test/ruby/test_io.rb:1969:inblock in
test_advise’
/home/ruby/tcstate/ruby/test/ruby/test_io.rb:1968:in each' /home/ruby/tcstate/ruby/test/ruby/test_io.rb:1968:intest_advise’
/home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:1075:in run' /home/ruby/tcstate/lib/ruby/2.0.0/test/unit/testcase.rb:17:inrun’
/home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:840:in block in _run_suite' /home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:832:inmap’
/home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:832:in
_run_suite' /home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:649:inblock in
_run_suites’
/home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:647:in each' /home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:647:in_run_suites’
/home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:792:in
_run_anything' /home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:981:inrun_tests’
/home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:968:in block in _run' /home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:967:ineach’
/home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:967:in _run' /home/ruby/tcstate/lib/ruby/2.0.0/minitest/unit.rb:956:inrun’
/home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:21:in run' /home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:751:inrun’
/home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:804:in run' /home/ruby/tcstate/lib/ruby/2.0.0/test/unit.rb:808:inrun’
test/runner.rb:15:in `’

Finished tests in 0.032192s, 31.0636 tests/s, 1708.4977 assertions/s.
1 tests, 55 assertions, 0 failures, 1 errors, 0 skips

ruby -v: ruby 2.0.0dev (2012-06-06 trunk 35933) [x86_64-linux]

SUSv4 $B$N(B posix_fadvice $B$N(B EINVAL $B$N$H$3$m$K$O(B advice
$B$,$*$+$7$$$+!"(B
len $B$,Ii$N$H$-!"$H$"$k$N$G$9$,!"(B
fadvise64(5, 0, 0, POSIX_FADV_WILLNEED) $B$H$$$&$N$O(B
$B$I$A$i$N>r7o$b30$l$F$$$k$h$&$K;W$($^$9!#(B

$B$U$H;W$$$D$$$F!"(B/tmp
$B$8$c$J$/$F%+%l%s%H%G%#%l%/%H%j$K%F%s%]%i%j%G%#%l%/%H%j$r:n$k$H!"$&$^$/$$$-$^$9!#(B

% mkdir zd
% TMPDIR=zd ./ruby test/runner.rb test/ruby/test_io.rb -n test_advise
Run options: -n test_advise

Running tests:

Finished tests in 0.049990s, 20.0039 tests/s, 2180.4283 assertions/s.
1 tests, 109 assertions, 0 failures, 0 errors, 0 skips

ruby -v: ruby 2.0.0dev (2012-06-06 trunk 35933) [x86_64-linux]
% df /tmp .
$B%U%!%$%k%7%9(B
1K-$B%V%m%C%/(B $B;HMQ(B
$B;HMQ2D(B $B;HMQ(B% $B%^%&%s%H0LCV(B
tmpfs 788348
1296 787052 1% /tmp
/dev/disk/by-uuid/deba395d-7518-4814-a884-313e25a47d54 300088912
57330904 227514388 21% /

/tmp $B$O(B tmpfs $B$G!"%+%l%s%H%G%#%l%/%H%j$O(B ext3 $B$J$N$G$9$,!"(B
$B$=$l$,4X78$"$k$N$+$b$7$l$^$;$s!#(B

$B860x$,$I$3$K$"$k$K$;$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4?7^$7$^$9!#(B

2012$BG/(B6$B7n(B7$BF|(B 5:24 KOSAKI Motohiro
[email protected]:

$BJ}?K$H$7$F$O(BLinux$B$N(Btmpfs$B$rD>$9$D$b$j$G$9!J(BEric
Wong$B$,%Q%C%A(BLKML$B$K0JA0Ej$2$F$?$1$I(B
$B$J$s$+:#$O%Z%s%G%#%s%0$7$F$k$_$?$$$J$N$G;~4V8+$FJ|$j9~$s$G$*$/M=Dj!K(B
$B$G!“$3$l$,$”$k$N$G!“@-G=2~A1$N$?$a$KN”$G$3$C$=$j(B
advise$B$rM?$($k7O$N%Q%C%A$O(B2.0$B$G$O(B

$BA4It(Breject$B$9$kM=Dj!#(B3.0$B$G9M$(D>$9!#!J8E$$%+!<%M%k$GF0$+$92DG=@-$,$"$k$+$i==J,;~4V:9$,(B

$B$$$k!K(B

$B$J$k$[$I!#N;2r$7$^$7$?!#(B

Linux$B$N=$@5$K4X$7$F$O(B-stable$B$K$5$($V$A9~$a$P(Bdebian$B$^$GMn$A$F$$$/$HF’$s$G$$$/$N$G!"(B

test_advise$B$K$D$$$F$OL$=$@5$G9M$($F$$$^$9$,!“$^$@7hDj$G$O$”$j$^$;$s!#(B

Debian Wheezy $B$O:#7n(B freeze
$B$i$7$/!“$=$l$K4V$K9g$&$+$I$&$+$O$h$/$o$+$j$^$;$s$,!”(B
$B>u67$r8+$F9M$($F$$$1$P$$$$$s$G$O$J$$$+$H;W$$$^$9!#(B
http://lists.debian.org/debian-devel-announce/2011/06/msg00003.html

Debian Wheezy $B$O:#7n(B freeze
$B$i$7$/!“$=$l$K4V$K9g$&$+$I$&$+$O$h$/$o$+$j$^$;$s$,!”(B
$B>u67$r8+$F9M$($F$$$1$P$$$$$s$G$O$J$$$+$H;W$$$^$9!#(B
Bits from the Release Team - minutes (pt 1), retrospective, time based freezes and more!

$B$$$^$^$G$O(B
-stable$B$K$$$l$F$$1$P!"(BABI$BJQ$o$C$F$kJ0J30$O%P%C%/%]!<%H$5$l$F$?$s$G$9$,J}?KJQ99$H$+$"$j$^$7$?!)(B

debian$B$N1?1D%k!<%k$H$+$h$/CN$i$J$$$G$9(B

$B$$$k!K(B
$B:#F|%+!<%M%k%Q%C%A$,(B-mm$B$KF~$C$?$N$GH>G/8e!"(B3.7$B$0$i$$$K$O<h$j9~$^$l$k$O$:!#(Bupstream
$B$X$N%^!<%8$,=*$o$C$?$0$i$$$K$^$?AjCL$K;G$&$N$G!"(Bdebian$B%f!<%6!<$J$R$H$,(Bdebian
BTS$B$K(B
$B%A%1%C%H@Z$C$FLc$($k$H$"$j$,$?$/!#(B

2012$BG/(B6$B7n(B7$BF|(B 10:43 KOSAKI Motohiro
[email protected]:

$B$$$^$^$G$O(B
-stable$B$K$$$l$F$$1$P!"(BABI$BJQ$o$C$F$kJ0J30$O%P%C%/%]!<%H$5$l$F$?$s$G$9$,J}?KJQ99$H$+$"$j$^$7$?!)(B

debian$B$N1?1D%k!<%k$H$+$h$/CN$i$J$$$G$9(B

$B$o$?$7$b$h$/CN$i$J$/$F!"(Bfreeze
$B$H$$$&8@MU$N%$%a!<%8$@$1$G8@$C$F$7$^$$$^$7$?!#(B

$BJ}?KJQ99$H$+$O$7$i$J$$$N$G!"LdBj$J$$$J$iLdBj$J$$$s$8$c$J$$$+$H;W$$$^$9!#(B

2012/6/22 Tanaka A. [email protected]:

2012$BG/(B6$B7n(B22$BF|(B 16:42 KOSAKI Motohiro [email protected]:

$B:#F|%+!<%M%k%Q%C%A$,(B-mm$B$KF~$C$?$N$GH>G/8e!"(B3.7$B$0$i$$$K$O<h$j9~$^$l$k$O$:!#(Bupstream

$B$X$N%^!<%8$,=*$o$C$?$0$i$$$K$^$?AjCL$K;G$&$N$G!"(Bdebian$B%f!<%6!<$J$R$H$,(Bdebian
BTS$B$K(B

$B%A%1%C%H@Z$C$FLc$($k$H$"$j$,$?$/!#(B

$B$(!<$H!"$=$NF~$C$?$b$N$O$I$3$+$G;2>H$G$-$^$9$+$M!#(B

Debian BTS $B$KEPO?$9$k;~$K!"(BURL
$B$r$D$1$F$*$/$H$h$$$N$G$O$J$$$+$H;W$&$N$G$9$,!#(B

Linus tree$B$KF~$C$?8e!"$=$3$G3NDj$7$?(B git commit id
$B$rJL%a!<%k$GO"Mm$9$kM=Dj!#%+!<%M%k%Q%C%1!<%8(B
$B%a%s%F%JE*$K$O(BURL$B$h$j$b$=$A$i$N$[$&$,D>@(B apply
$B$G$-$FJXMx$J$O$:$J$N$G(B

$B:#F|%+!<%M%k%Q%C%A$,(B-mm$B$KF~$C$?$N$GH>G/8e!"(B3.7$B$0$i$$$K$O<h$j9~$^$l$k$O$:!#(Bupstream

$B$X$N%^!<%8$,=*$o$C$?$0$i$$$K$^$?AjCL$K;G$&$N$G!"(Bdebian$B%f!<%6!<$J$R$H$,(Bdebian
BTS$B$K(B

$B%A%1%C%H@Z$C$FLc$($k$H$"$j$,$?$/!#(B

$B$(!<$H!"$=$NF~$C$?$b$N$O$I$3$+$G;2>H$G$-$^$9$+$M!#(B

Debian BTS $B$KEPO?$9$k;~$K!"(BURL
$B$r$D$1$F$*$/$H$h$$$N$G$O$J$$$+$H;W$&$N$G$9$,!#(B

Linus tree$B$KF~$C$?8e!"$=$3$G3NDj$7$?(B git commit id
$B$rJL%a!<%k$GO"Mm$9$kM=Dj!#%+!<%M%k%Q%C%1!<%8(B
$B%a%s%F%JE*$K$O(BURL$B$h$j$b$=$A$i$N$[$&$,D>@(B apply
$B$G$-$FJXMx$J$O$:$J$N$G(B

$B$9$$$^$;$s!“$3$A$i$N%U%)%m!<%”%C%W$rK:$l$F$$j$^$7$?!#(B3.6-rc1
$B0J9_$G0J2<$N%Q%C%A$GD>$C$F$
$j$^$9!#(B

commit 3d3727cdb07ff17ddc3c551ef8d03d37b60a0372
Author: KOSAKI Motohiro [email protected]
Date: Tue Jul 31 16:42:50 2012 -0700

mm, fadvise: don't return -EINVAL when filesystem cannot implement 

fadvise()

URL$B$@$H0J2<$+$J(B
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3d3727cdb07ff17ddc3c551ef8d03d37b60a0372

2012$BG/(B10$B7n(B24$BF|(B 3:14 KOSAKI Motohiro
[email protected]:

$B$9$$$^$;$s!“$3$A$i$N%U%)%m!<%”%C%W$rK:$l$F$$j$^$7$?!#(B3.6-rc1
$B0J9_$G0J2<$N%Q%C%A$GD>$C$F$
$j$^$9!#(B

commit 3d3727cdb07ff17ddc3c551ef8d03d37b60a0372
Author: KOSAKI Motohiro [email protected]
Date: Tue Jul 31 16:42:50 2012 -0700

mm, fadvise: don't return -EINVAL when filesystem cannot implement fadvise()

URL$B$@$H0J2<$+$J(B
kernel/git/torvalds/linux.git - Linux kernel source tree

Debian GNU/Linux testing (wheezy) $B$O!“$9$G$K(B /tmp $B$,(B tmpfs
$B$G$O(B
$B$J$/$J$C$F$$$F!”(B
$B$3$l$O$b$O$d$"$^$jBg$-$JLdBj$G$O$J$/$J$C$F$7$^$C$?46$8$G$9!#(B

$B$A$J$_$K!“$3$N7o$K4X$7$F$O(B debian-devel $B$H$$$&(B ML $B$GD9Bg$J(B
$B5DO@$,$”$C$?$h$&$G!"%5%^%j$,=P$F$$$^$9!#(B
Summary: Moving /tmp to tmpfs makes it useless
http://lists.debian.org/debian-devel/2012/06/msg00311.html

Debian BTS $B$N%(%s%H%j$H$7$F$O!“$?$V$s!”(B
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630615
$B$“$?$j$G$9$+$M$'!#B>$K$b$$$/$D$+$”$k$h$&$G$9$,!#(B

$B$J$*!“$=$l$O$=$l$H$7$F!”(BFedora 18 $B$O(B /tmp $B$r(B tmpfs
$B$K$9$k$i$7$$$G$9!#(B
http://lists.fedoraproject.org/pipermail/devel/2012-April/165177.html

$B$^$!!“(BFedora 18 Alpha $B$O(B Linux kernel 3.6 RC2 $B$i$7$$$N$G!”(B
test_advice $B$,<:GT$9$k$3$H$O$J$$$+$J!#$?$V$s!#(B

2012$BG/(B6$B7n(B22$BF|(B 16:42 KOSAKI Motohiro
[email protected]:

$B:#F|%+!<%M%k%Q%C%A$,(B-mm$B$KF~$C$?$N$GH>G/8e!"(B3.7$B$0$i$$$K$O<h$j9~$^$l$k$O$:!#(Bupstream

$B$X$N%^!<%8$,=*$o$C$?$0$i$$$K$^$?AjCL$K;G$&$N$G!"(Bdebian$B%f!<%6!<$J$R$H$,(Bdebian
BTS$B$K(B

$B%A%1%C%H@Z$C$FLc$($k$H$"$j$,$?$/!#(B

$B$(!<$H!"$=$NF~$C$?$b$N$O$I$3$+$G;2>H$G$-$^$9$+$M!#(B

Debian BTS $B$KEPO?$9$k;~$K!"(BURL
$B$r$D$1$F$*$/$H$h$$$N$G$O$J$$$+$H;W$&$N$G$9$,!#(B

2012/10/24 Tanaka A. [email protected]:

URL$B$@$H0J2<$+$J(B
kernel/git/torvalds/linux.git - Linux kernel source tree

Debian GNU/Linux testing (wheezy) $B$O!“$9$G$K(B /tmp $B$,(B tmpfs $B$G$O(B
$B$J$/$J$C$F$$$F!”(B
$B$3$l$O$b$O$d$"$^$jBg$-$JLdBj$G$O$J$/$J$C$F$7$^$C$?46$8$G$9!#(B

$B$X!<!#$J$k$[$I(B

Summary/Minutes for today's FESCo meeting (2012-04-02)

$B$^$!!“(BFedora 18 Alpha $B$O(B Linux kernel 3.6 RC2 $B$i$7$$$N$G!”(B
test_advice $B$,<:GT$9$k$3$H$O$J$$$+$J!#$?$V$s!#(B

Fedora$B$O$^$“$$$$$d!#$”$l$O?MCl@lMQ$@$7!#(BRHEL$B$K1F6A$G$=$&$J$i(B
$BJLESBP:v9M$($^$9(B