aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtests/internals/test_internals_valgrind.sh10
-rwxr-xr-xtests/internals/test_rate_limiter_valgrind.sh10
-rwxr-xr-xtests/test_bindfs.rb3
-rw-r--r--vagrant/bionic64/Vagrantfile (renamed from vagrant/precise64/Vagrantfile)6
-rw-r--r--vagrant/centos6/Vagrantfile3
-rwxr-xr-xvagrant/test.rb2
6 files changed, 24 insertions, 10 deletions
diff --git a/tests/internals/test_internals_valgrind.sh b/tests/internals/test_internals_valgrind.sh
index 4511ccd..837a3cc 100755
--- a/tests/internals/test_internals_valgrind.sh
+++ b/tests/internals/test_internals_valgrind.sh
@@ -1,5 +1,11 @@
-#!/bin/sh
+#!/bin/sh -eu
if [ ! -x ./test_internals ]; then
cd `dirname "$0"`
fi
-valgrind --error-exitcode=100 ./test_internals
+
+if [ -n "`which valgrind`" ]; then
+ valgrind --error-exitcode=100 ./test_internals
+else
+ echo "Warning: valgrind not found. Running without."
+ ./test_internals
+fi
diff --git a/tests/internals/test_rate_limiter_valgrind.sh b/tests/internals/test_rate_limiter_valgrind.sh
index bf0a7cd..5958492 100755
--- a/tests/internals/test_rate_limiter_valgrind.sh
+++ b/tests/internals/test_rate_limiter_valgrind.sh
@@ -1,5 +1,11 @@
-#!/bin/sh
+#!/bin/sh -eu
if [ ! -x ./test_rate_limiter ]; then
cd `dirname "$0"`
fi
-valgrind --error-exitcode=100 ./test_rate_limiter
+
+if [ -n "`which valgrind`" ]; then
+ valgrind --error-exitcode=100 ./test_rate_limiter
+else
+ echo "Warning: valgrind not found. Running without."
+ ./test_rate_limiter
+fi
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index 9e5d381..a6ecf2c 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -764,12 +764,13 @@ end
# Pull Request #73
if `uname`.strip == 'Linux' &&
+ `uname -r`.strip =~ /^[456789]/ && # 3.x kernels used by CentOS 7 and older don't support all `unshare` options despite the userspace binary supporting them
`which unshare` != '' &&
`unshare --help`.include?("--map-root-user") &&
`unshare --help`.include?("--user")
root_testenv("--gid-offset=10000", :title => "setgid and gid-offset") do
system("chmod g+s src")
- system("unshare --map-root-user --user #{$nobody} mkdir mnt/dir")
+ system("unshare --map-root-user --user mkdir mnt/dir")
assert { File.stat("src/dir").gid == 0 }
assert { File.stat("mnt/dir").gid == 10000 }
end
diff --git a/vagrant/precise64/Vagrantfile b/vagrant/bionic64/Vagrantfile
index 22acd58..aab9518 100644
--- a/vagrant/precise64/Vagrantfile
+++ b/vagrant/bionic64/Vagrantfile
@@ -2,7 +2,7 @@
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
- config.vm.box = "ubuntu/precise64"
+ config.vm.box = "ubuntu/bionic64"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.synced_folder "../../", "/bindfs",
@@ -12,12 +12,12 @@ Vagrant.configure("2") do |config|
rsync__args: ["-av", "--delete-after"]
config.vm.provider "virtualbox" do |v|
- v.name = "bindfs-precise64"
+ v.name = "bindfs-bionic64"
end
config.vm.provision "shell", inline: <<-SHELL
apt-get update
- apt-get install -y fuse libfuse-dev build-essential pkg-config ruby1.9.3 valgrind
+ apt-get install -y fuse libfuse-dev build-essential pkg-config ruby valgrind
apt-get clean
adduser vagrant fuse
echo user_allow_other > /etc/fuse.conf
diff --git a/vagrant/centos6/Vagrantfile b/vagrant/centos6/Vagrantfile
index 7ad975e..ae291fe 100644
--- a/vagrant/centos6/Vagrantfile
+++ b/vagrant/centos6/Vagrantfile
@@ -15,8 +15,9 @@ Vagrant.configure("2") do |config|
v.name = "bindfs-centos6"
end
+ # Don't install valgrind here since it appears to be broken (2019-04-28)
config.vm.provision "shell", inline: <<-SHELL
- yum install -y fuse fuse-devel gcc make pkg-config ruby valgrind
+ yum install -y fuse fuse-devel gcc make pkg-config ruby
usermod -G fuse -a vagrant
echo user_allow_other > /etc/fuse.conf
SHELL
diff --git a/vagrant/test.rb b/vagrant/test.rb
index b8489b6..f6d068f 100755
--- a/vagrant/test.rb
+++ b/vagrant/test.rb
@@ -82,7 +82,7 @@ threads = dirs.map do |dir|
unless run_and_log.call "vagrant rsync"
raise "vagrant rsync failed"
end
- unless run_and_log.call "vagrant ssh -c 'cd /bindfs && sudo rm -Rf tests/tmp_test_bindfs && ./configure && make clean && make && make check && sudo make check'"
+ unless run_and_log.call "vagrant ssh -c 'cd /bindfs && sudo rm -Rf tests/tmp_test_bindfs && ./configure && make distclean && ./configure && make && make check && sudo make check'"
mutex.synchronize do
errors << "VM #{dir} tests failed."
end