From 7016277b54b144514824cfd9d30adcf32bfbfe67 Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Sat, 12 Apr 2025 22:15:00 +0300 Subject: Updated Vagrant test setup --- tests/test_bindfs.rb | 4 ++-- vagrant/centos8/Vagrantfile | 30 ------------------------------ vagrant/debian10/Vagrantfile | 4 ++-- vagrant/debian11/Vagrantfile | 4 ++-- vagrant/rockylinux9/Vagrantfile | 25 +++++++++++++++++++++++++ vagrant/test.rb | 2 +- vagrant/ubuntu1804/Vagrantfile | 28 ---------------------------- vagrant/ubuntu2004/Vagrantfile | 4 ++-- vagrant/ubuntu2204/Vagrantfile | 4 ++-- vagrant/ubuntu2404/Vagrantfile | 28 ++++++++++++++++++++++++++++ 10 files changed, 64 insertions(+), 69 deletions(-) delete mode 100644 vagrant/centos8/Vagrantfile create mode 100644 vagrant/rockylinux9/Vagrantfile delete mode 100644 vagrant/ubuntu1804/Vagrantfile create mode 100644 vagrant/ubuntu2404/Vagrantfile diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb index 46c6101..d5af03b 100755 --- a/tests/test_bindfs.rb +++ b/tests/test_bindfs.rb @@ -185,7 +185,7 @@ testenv("--ctime-from-mtime") do sleep(1.1) chmod(0777, mf) - # to_i gives us prceision of 1 sec + # to_i gives us precision of 1 sec assert { File.stat(mf).ctime.to_i == File.stat(mf).mtime.to_i } assert { File.stat(sf).ctime > File.stat(sf).mtime } end @@ -522,7 +522,7 @@ testenv("", :title => "preserves inode numbers") do assert { File.stat('mnt/dir').ino == File.stat('src/dir').ino } end -unless $have_fuse_3_readdir_bug # https://github.com/libfuse/libfuse/issues/583 +if $have_fuse3 && !$have_fuse_3_readdir_bug # https://github.com/libfuse/libfuse/issues/583 testenv("", :title => "preserves readdir inode numbers") do touch('src/file') mkdir('src/dir') diff --git a/vagrant/centos8/Vagrantfile b/vagrant/centos8/Vagrantfile deleted file mode 100644 index 1793dd6..0000000 --- a/vagrant/centos8/Vagrantfile +++ /dev/null @@ -1,30 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.configure("2") do |config| - config.vm.box = "roboxes/centos8" - - config.vm.synced_folder ".", "/vagrant", disabled: true - config.vm.synced_folder "../../", "/bindfs", - type: "rsync", - rsync__auto: false, - rsync__exclude: ["vagrant"], - rsync__args: ["-av", "--delete-after"] - - config.vm.provider "virtualbox" do |v| - v.name = "bindfs-centos8" - end - config.vm.provider "libvirt" do |v| - v.driver = if File.exist?('/dev/kvm') then 'kvm' else 'qemu' end - end - - config.vm.provision "shell", inline: <<-SHELL - # CentOS 8 is EOL - # https://www.cyberithub.com/solved-failed-to-download-metadata-for-repo-appstream/ - sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* - sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* - - yum install -y fuse fuse-devel gcc make pkg-config ruby valgrind - echo user_allow_other > /etc/fuse.conf - SHELL -end diff --git a/vagrant/debian10/Vagrantfile b/vagrant/debian10/Vagrantfile index f42dbab..62104c4 100644 --- a/vagrant/debian10/Vagrantfile +++ b/vagrant/debian10/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure("2") do |config| - config.vm.box = "roboxes/debian10" + config.vm.box = "boxen/debian-10" config.vm.synced_folder ".", "/vagrant", disabled: true config.vm.synced_folder "../../", "/bindfs", @@ -21,7 +21,7 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", reboot: true, inline: <<-SHELL export DEBIAN_FRONTEND='noninteractive' apt-get update - apt-get install -y fuse3 libfuse3-dev build-essential pkg-config ruby valgrind + apt-get install -y fuse3 libfuse3-dev build-essential automake autoconf libtool pkg-config ruby valgrind apt-get clean echo user_allow_other > /etc/fuse.conf SHELL diff --git a/vagrant/debian11/Vagrantfile b/vagrant/debian11/Vagrantfile index 61c3298..c179c53 100644 --- a/vagrant/debian11/Vagrantfile +++ b/vagrant/debian11/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure("2") do |config| - config.vm.box = "roboxes/debian11" + config.vm.box = "boxen/debian-11" config.vm.synced_folder ".", "/vagrant", disabled: true config.vm.synced_folder "../../", "/bindfs", @@ -21,7 +21,7 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", reboot: true, inline: <<-SHELL export DEBIAN_FRONTEND='noninteractive' apt-get update - apt-get install -y fuse3 libfuse3-dev build-essential pkg-config ruby valgrind + apt-get install -y fuse3 libfuse3-dev build-essential automake autoconf libtool pkg-config ruby valgrind apt-get clean echo user_allow_other > /etc/fuse.conf SHELL diff --git a/vagrant/rockylinux9/Vagrantfile b/vagrant/rockylinux9/Vagrantfile new file mode 100644 index 0000000..e59d100 --- /dev/null +++ b/vagrant/rockylinux9/Vagrantfile @@ -0,0 +1,25 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "boxen/rockylinux-9" + + config.vm.synced_folder ".", "/vagrant", disabled: true + config.vm.synced_folder "../../", "/bindfs", + type: "rsync", + rsync__auto: false, + rsync__exclude: ["vagrant"], + rsync__args: ["-av", "--delete-after"] + + config.vm.provider "virtualbox" do |v| + v.name = "bindfs-rockylinux9" + end + config.vm.provider "libvirt" do |v| + v.driver = if File.exist?('/dev/kvm') then 'kvm' else 'qemu' end + end + + config.vm.provision "shell", inline: <<-SHELL + yum install -y fuse3 fuse3-devel gcc make automake autoconf libtool pkg-config ruby valgrind + echo user_allow_other > /etc/fuse.conf + SHELL +end diff --git a/vagrant/test.rb b/vagrant/test.rb index e7a08f6..5d6f43f 100755 --- a/vagrant/test.rb +++ b/vagrant/test.rb @@ -86,7 +86,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 distclean && ./configure && make && make check && sudo make check'" + unless run_and_log.call "vagrant ssh -c 'cd /bindfs && sudo rm -Rf tests/tmp_test_bindfs && ./autogen.sh && ./configure && make distclean && ./configure && make && make check && sudo make check'" mutex.synchronize do errors << "VM #{dir} tests failed." end diff --git a/vagrant/ubuntu1804/Vagrantfile b/vagrant/ubuntu1804/Vagrantfile deleted file mode 100644 index 6626a1c..0000000 --- a/vagrant/ubuntu1804/Vagrantfile +++ /dev/null @@ -1,28 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : - -Vagrant.configure("2") do |config| - config.vm.box = "roboxes/ubuntu1804" - - config.vm.synced_folder ".", "/vagrant", disabled: true - config.vm.synced_folder "../../", "/bindfs", - type: "rsync", - rsync__auto: false, - rsync__exclude: ["vagrant"], - rsync__args: ["-av", "--delete-after"] - - config.vm.provider "virtualbox" do |v| - v.name = "bindfs-ubuntu1804" - end - config.vm.provider "libvirt" do |v| - v.driver = if File.exist?('/dev/kvm') then 'kvm' else 'qemu' end - end - - config.vm.provision "shell", inline: <<-SHELL - apt-get update - 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 - SHELL -end diff --git a/vagrant/ubuntu2004/Vagrantfile b/vagrant/ubuntu2004/Vagrantfile index c37e5be..48a94d7 100644 --- a/vagrant/ubuntu2004/Vagrantfile +++ b/vagrant/ubuntu2004/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure("2") do |config| - config.vm.box = "roboxes/ubuntu2004" + config.vm.box = "boxen/ubuntu-20.04" config.vm.synced_folder ".", "/vagrant", disabled: true config.vm.synced_folder "../../", "/bindfs", @@ -20,7 +20,7 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", inline: <<-SHELL apt-get update - apt-get install -y fuse libfuse-dev build-essential pkg-config ruby valgrind + apt-get install -y fuse libfuse-dev build-essential automake autoconf libtool pkg-config ruby valgrind apt-get clean adduser vagrant fuse echo user_allow_other > /etc/fuse.conf diff --git a/vagrant/ubuntu2204/Vagrantfile b/vagrant/ubuntu2204/Vagrantfile index 06be5fd..7d30cd8 100644 --- a/vagrant/ubuntu2204/Vagrantfile +++ b/vagrant/ubuntu2204/Vagrantfile @@ -2,7 +2,7 @@ # vi: set ft=ruby : Vagrant.configure("2") do |config| - config.vm.box = "roboxes/ubuntu2204" + config.vm.box = "boxen/ubuntu-22.04" config.vm.synced_folder ".", "/vagrant", disabled: true config.vm.synced_folder "../../", "/bindfs", @@ -20,7 +20,7 @@ Vagrant.configure("2") do |config| config.vm.provision "shell", inline: <<-SHELL apt-get update - apt-get install -y fuse libfuse-dev build-essential pkg-config ruby valgrind + apt-get install -y fuse libfuse-dev build-essential automake autoconf libtool pkg-config ruby valgrind apt-get clean adduser vagrant fuse echo user_allow_other > /etc/fuse.conf diff --git a/vagrant/ubuntu2404/Vagrantfile b/vagrant/ubuntu2404/Vagrantfile new file mode 100644 index 0000000..23ae419 --- /dev/null +++ b/vagrant/ubuntu2404/Vagrantfile @@ -0,0 +1,28 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +Vagrant.configure("2") do |config| + config.vm.box = "boxen/ubuntu-24.04" + + config.vm.synced_folder ".", "/vagrant", disabled: true + config.vm.synced_folder "../../", "/bindfs", + type: "rsync", + rsync__auto: false, + rsync__exclude: ["vagrant"], + rsync__args: ["-av", "--delete-after"] + + config.vm.provider "virtualbox" do |v| + v.name = "bindfs-ubuntu2404" + end + config.vm.provider "libvirt" do |v| + v.driver = if File.exist?('/dev/kvm') then 'kvm' else 'qemu' end + end + + config.vm.provision "shell", inline: <<-SHELL + apt-get update + apt-get install -y fuse3 libfuse3-dev build-essential automake autoconf libtool pkg-config ruby valgrind + apt-get clean + adduser vagrant fuse + echo user_allow_other > /etc/fuse.conf + SHELL +end -- cgit v1.2.3