aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_file_exhaustive.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/test/ruby/test_file_exhaustive.rb b/test/ruby/test_file_exhaustive.rb
index 2664f95ba9..54b3244eba 100644
--- a/test/ruby/test_file_exhaustive.rb
+++ b/test/ruby/test_file_exhaustive.rb
@@ -160,11 +160,7 @@ class TestFileExhaustive < Test::Unit::TestCase
def blockdev
return @blockdev if defined? @blockdev
if /linux/ =~ RUBY_PLATFORM
- if File.exist? '/dev/loop0'
- @blockdev = '/dev/loop0'
- elsif File.exist? '/dev/sda'
- @blockdev = '/dev/sda'
- end
+ @blockdev = %w[/dev/loop0 /dev/sda /dev/vda /dev/xvda1].find {|f| File.exist? f }
else
@blockdev = nil
end