Add sync_writes option to flush every commit to object storage before… #280
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: xfstests-9p | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| xfstests: | |
| name: Run xfstests 9P Test Suite | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: df -h | |
| - name: "Disk space cleanup" | |
| run: | | |
| sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL | |
| sudo docker image prune --all --force | |
| sudo docker builder prune -a | |
| - run: df -h | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y acl attr automake bc dbench dump e2fsprogs fio gawk \ | |
| gcc git indent libacl1-dev libaio-dev libcap-dev libgdbm-dev libtool \ | |
| libtool-bin liburing-dev libuuid1 lvm2 make psmisc python3 quota sed \ | |
| uuid-dev uuid-runtime xfsprogs linux-headers-$(uname -r) sqlite3 \ | |
| libgdbm-compat-dev | |
| sudo apt-get install -y exfatprogs f2fs-tools ocfs2-tools udftools xfsdump \ | |
| xfslibs-dev || true | |
| sudo apt-get install -y systemd-coredump systemd jq pkg-config | |
| # Load 9p kernel modules | |
| sudo modprobe 9p | |
| sudo modprobe 9pnet | |
| sudo modprobe 9pnet_virtio || true | |
| - name: Clone xfstests | |
| run: | | |
| git clone https://github.com/Barre/xfstests.git /tmp/xfstests | |
| - name: Build xfstests | |
| working-directory: /tmp/xfstests | |
| run: | | |
| make | |
| sudo make install | |
| - name: Build ZeroFS | |
| working-directory: zerofs | |
| run: cargo build --profile ci | |
| - name: Create ZeroFS data directories | |
| run: | | |
| mkdir -p ${{ github.workspace }}/zerofs-test-data | |
| mkdir -p ${{ github.workspace }}/zerofs-scratch-data | |
| mkdir -p /tmp/zerofs-cache-test | |
| mkdir -p /tmp/zerofs-cache-scratch | |
| - name: Start ZeroFS (TEST instance) | |
| working-directory: zerofs | |
| run: | | |
| # Create ZeroFS configuration for TEST | |
| cat > zerofs-test.toml << EOF | |
| [cache] | |
| dir = "/tmp/zerofs-cache-test" | |
| disk_size_gb = 1.0 | |
| memory_size_gb = 1.0 | |
| [storage] | |
| url = "file://${{ github.workspace }}/zerofs-test-data" | |
| encryption_password = "test-password-123" | |
| [servers.ninep] | |
| unix_socket = "/tmp/zerofs-test.9p.sock" | |
| [telemetry] | |
| enabled = false | |
| EOF | |
| # Start ZeroFS in the background | |
| ./target/ci/zerofs run -c zerofs-test.toml & | |
| echo $! > /tmp/zerofs-test.pid | |
| # Wait for ZeroFS to start | |
| echo "Waiting for ZeroFS TEST instance to start..." | |
| for i in {1..30}; do | |
| if [ -S /tmp/zerofs-test.9p.sock ]; then | |
| echo "ZeroFS TEST instance is ready" | |
| break | |
| fi | |
| sleep 1 | |
| done | |
| if [ ! -S /tmp/zerofs-test.9p.sock ]; then | |
| echo "ZeroFS TEST instance failed to start" | |
| exit 1 | |
| fi | |
| - name: Start ZeroFS (SCRATCH instance) | |
| working-directory: zerofs | |
| run: | | |
| # Create ZeroFS configuration for SCRATCH | |
| cat > zerofs-scratch.toml << EOF | |
| [cache] | |
| dir = "/tmp/zerofs-cache-scratch" | |
| disk_size_gb = 1.0 | |
| memory_size_gb = 1.0 | |
| [storage] | |
| url = "file://${{ github.workspace }}/zerofs-scratch-data" | |
| encryption_password = "test-password-123" | |
| [servers.ninep] | |
| unix_socket = "/tmp/zerofs-scratch.9p.sock" | |
| [telemetry] | |
| enabled = false | |
| EOF | |
| # Start ZeroFS in the background | |
| ./target/ci/zerofs run -c zerofs-scratch.toml & | |
| echo $! > /tmp/zerofs-scratch.pid | |
| # Wait for ZeroFS to start | |
| echo "Waiting for ZeroFS SCRATCH instance to start..." | |
| for i in {1..30}; do | |
| if [ -S /tmp/zerofs-scratch.9p.sock ]; then | |
| echo "ZeroFS SCRATCH instance is ready" | |
| break | |
| fi | |
| sleep 1 | |
| done | |
| if [ ! -S /tmp/zerofs-scratch.9p.sock ]; then | |
| echo "ZeroFS SCRATCH instance failed to start" | |
| exit 1 | |
| fi | |
| - name: Create mount points | |
| run: | | |
| sudo mkdir -p /mnt/test | |
| sudo mkdir -p /mnt/scratch | |
| - name: Mount 9P filesystems | |
| run: | | |
| # Mount TEST filesystem | |
| sudo mount -t 9p -o trans=unix,version=9p2000.L,cache=mmap,access=user /tmp/zerofs-test.9p.sock /mnt/test | |
| # Mount SCRATCH filesystem | |
| sudo mount -t 9p -o trans=unix,version=9p2000.L,cache=mmap,access=user /tmp/zerofs-scratch.9p.sock /mnt/scratch | |
| # Verify mounts | |
| mount | grep 9p | |
| - name: Configure xfstests | |
| working-directory: /tmp/xfstests | |
| run: | | |
| cat > local.config << 'EOF' | |
| export FSTYP=9p | |
| export TEST_DIR=/mnt/test | |
| export SCRATCH_MNT=/mnt/scratch | |
| export TEST_DEV=/tmp/zerofs-test.9p.sock | |
| export SCRATCH_DEV=/tmp/zerofs-scratch.9p.sock | |
| export PLAN9_MOUNT_OPTIONS="-o trans=unix,version=9p2000.L,cache=mmap,access=user" | |
| EOF | |
| cat > excludes << 'EOF' | |
| generic/035 | |
| generic/126 | |
| generic/394 | |
| generic/467 | |
| generic/263 | |
| generic/736 | |
| generic/759 | |
| generic/760 | |
| generic/477 | |
| generic/564 | |
| generic/633 | |
| generic/696 | |
| generic/591 | |
| generic/615 | |
| generic/525 | |
| generic/003 | |
| generic/087 | |
| generic/258 | |
| generic/637 | |
| generic/676 | |
| EOF | |
| - name: Run xfstests | |
| working-directory: /tmp/xfstests | |
| run: | | |
| sudo ./check -g quick -E excludes | |
| - name: Cleanup | |
| if: always() | |
| run: | | |
| # Unmount filesystems | |
| sudo umount /mnt/test || true | |
| sudo umount /mnt/scratch || true | |
| # Kill ZeroFS instances | |
| if [ -f /tmp/zerofs-test.pid ]; then | |
| kill $(cat /tmp/zerofs-test.pid) || true | |
| fi | |
| if [ -f /tmp/zerofs-scratch.pid ]; then | |
| kill $(cat /tmp/zerofs-scratch.pid) || true | |
| fi | |
| pkill -f "zerofs-test.toml" || true | |
| pkill -f "zerofs-scratch.toml" || true |