Skip to content

Commit

Permalink
pure_mountpoint fixes & CI chores (#169)
Browse files Browse the repository at this point in the history
Some of the pure_mountpoint logic were missed when merging commits over, and the tests never failed due to incorrect permission bits. As well as some CI chore 

* fix: misc upperdir fixes

* fix: test bit on merge mult dirs test

* chore (tests/ci): add mergerfs to vagrantfiles

* chore (tests/ci): run merge multi dirs test in home dir

* chore (tests/ci): update fedora box ver, install mergerfs
  • Loading branch information
ezrizhu authored Aug 22, 2024
1 parent a3bcea0 commit b670fcf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/vagrant.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- debianrustup
- debianlvm
- rocky9
- fedora33
- fedora39
runs-on: self-hosted
steps:
- name: Checkout
Expand Down
16 changes: 10 additions & 6 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Vagrant.configure("2") do |config|
debian.vm.provision "file", source: "./", destination: "/home/vagrant/try"
debian.vm.provision "shell", privileged: false, inline: "
sudo apt-get update
sudo apt-get install -y git expect curl attr pandoc gcc make autoconf
sudo apt-get install -y git expect curl attr pandoc gcc make autoconf mergerfs
sudo chown -R vagrant:vagrant try
cd try
scripts/run_tests.sh
Expand Down Expand Up @@ -54,7 +54,7 @@ Vagrant.configure("2") do |config|
debianlvm.vm.provision "file", source: "./", destination: "/home/vagrant/try"
debianlvm.vm.provision "shell", privileged: false, inline: "
sudo apt-get update
sudo apt-get install -y git expect lvm2 mergerfs curl attr pandoc gcc make autoconf
sudo apt-get install -y git expect lvm2 mergerfs curl attr pandoc gcc make autoconf mergerfs
# Create an image for the lvm disk
sudo fallocate -l 2G /root/lvm_disk.img
Expand Down Expand Up @@ -95,7 +95,9 @@ Vagrant.configure("2") do |config|
rocky.vm.box = "generic/rocky9"
rocky.vm.provision "file", source: "./", destination: "/home/vagrant/try"
rocky.vm.provision "shell", privileged: false, inline: "
sudo yum install -y git expect curl attr pandoc
sudo yum install -y git expect curl attr pandoc fuse
wget https://github.com/trapexit/mergerfs/releases/download/2.40.2/mergerfs-2.40.2-1.el9.x86_64.rpm
sudo rpm -i mergerfs-2.40.2-1.el9.x86_64.rpm
sudo chown -R vagrant:vagrant try
cd try
TRY_TOP=$(pwd) scripts/run_tests.sh
Expand All @@ -107,11 +109,13 @@ Vagrant.configure("2") do |config|
end
#
# Regular rocky testing box
config.vm.define "fedora33" do |fedora|
fedora.vm.box = "generic/fedora33"
config.vm.define "fedora39" do |fedora|
fedora.vm.box = "generic/fedora39"
fedora.vm.provision "file", source: "./", destination: "/home/vagrant/try"
fedora.vm.provision "shell", privileged: false, inline: "
sudo yum install -y git expect curl attr pandoc
sudo yum install -y git expect curl attr pandoc fuse
wget https://github.com/trapexit/mergerfs/releases/download/2.40.2/mergerfs-2.40.2-1.fc39.x86_64.rpm
sudo rpm -i mergerfs-2.40.2-1.fc39.x86_64.rpm
sudo chown -R vagrant:vagrant try
cd try
TRY_TOP=$(pwd) scripts/run_tests.sh
Expand Down
3 changes: 3 additions & 0 deletions test/merge_multiple_dirs.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ cleanup() {

trap 'cleanup' EXIT

# (ezri) gh ci gid fix
cd ~ || exit 1

try_workspace="$(mktemp -d -p .)"
cp "$TRY_TOP/test/resources/file.txt.gz" "$try_workspace/"
cd "$try_workspace" || exit 1
Expand Down
7 changes: 4 additions & 3 deletions try
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ do
fi
## Symlinks
if [ -L "$mountpoint" ]
if [ -L "$pure_mountpoint" ]
then
ln -s $(readlink "$mountpoint") "$SANDBOX_DIR/temproot/$mountpoint"
ln -s $(readlink "$pure_mountpoint") "$SANDBOX_DIR/temproot/$pure_mountpoint"
continue
fi
Expand Down Expand Up @@ -289,7 +289,8 @@ EOF
chmod 755 "${SANDBOX_DIR}/temproot"
while IFS="" read -r mountpoint
do
if [ -L "$mountpoint" ]
pure_mountpoint=${mountpoint##*:}
if [ -L "$pure_mountpoint" ]
then
rm "${SANDBOX_DIR}/temproot/${mountpoint}"
fi
Expand Down

0 comments on commit b670fcf

Please sign in to comment.