mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-09-20 13:30:46 +02:00
* ci: restore the setuid bit on a shadowed fusermount3 Newer ubuntu-22.04 runner images carry a source-built fusermount3 in /usr/local/bin that shadows the distro one in PATH and is not setuid root. go-fuse looks the helper up through PATH, so every unprivileged mount fails with "mount failed: Operation not permitted". * test: fail a fuse test as soon as its mount process dies A mount that cannot mount at all exits within a second, but the harness still waited out the 30s readiness timeout and then reported "mount point not ready within timeout", leaving the real cause buried in the log tail. Watch the child processes and report their exit instead. * mount: report a failed mount without a goroutine dump A mount failure is an environment problem - no /dev/fuse, fusermount not setuid, stale mount point - and the all-goroutine stack dump Fatalf adds buries the one line that says so.
94 lines
2.7 KiB
YAML
94 lines
2.7 KiB
YAML
name: "FUSE Integration Tests"
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, main ]
|
|
paths:
|
|
- 'weed/**'
|
|
- 'test/fuse_integration/**'
|
|
- '.github/workflows/fuse-integration.yml'
|
|
pull_request:
|
|
branches: [ master, main ]
|
|
paths:
|
|
- 'weed/**'
|
|
- 'test/fuse_integration/**'
|
|
- '.github/workflows/fuse-integration.yml'
|
|
|
|
concurrency:
|
|
group: ${{ github.head_ref }}/fuse-integration
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
fuse-integration:
|
|
name: FUSE Integration Testing
|
|
runs-on: ubuntu-22.04
|
|
timeout-minutes: 50
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v7
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Install FUSE and dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
# fuse3 is pre-installed on ubuntu-22.04 runners and conflicts
|
|
# with the legacy fuse package, so only install the dev headers.
|
|
sudo apt-get install -y libfuse3-dev
|
|
# Allow non-root FUSE mounts with allow_other
|
|
echo 'user_allow_other' | sudo tee -a /etc/fuse.conf
|
|
sudo chmod 644 /etc/fuse.conf
|
|
# Some runner images carry a second, source-built fusermount3 in
|
|
# /usr/local/bin that shadows the distro one in PATH without its setuid
|
|
# bit, and every unprivileged mount then fails with EPERM. go-fuse takes
|
|
# the first fusermount3 in PATH, so repair that one.
|
|
fusermount_bin=$(command -v fusermount3 || true)
|
|
if [ -n "$fusermount_bin" ]; then
|
|
if [ ! -u "$fusermount_bin" ]; then
|
|
sudo chown root:root "$fusermount_bin"
|
|
sudo chmod u+s "$fusermount_bin"
|
|
fi
|
|
ls -l "$fusermount_bin"
|
|
fi
|
|
# Verify FUSE installation
|
|
fusermount3 --version || fusermount --version || true
|
|
ls -la /dev/fuse
|
|
|
|
- name: Build SeaweedFS
|
|
run: |
|
|
cd weed
|
|
go build -tags "elastic gocdk sqlite ydb tarantool tikv rclone" -o weed .
|
|
chmod +x weed
|
|
./weed version
|
|
# Make weed binary available in PATH for the test framework
|
|
sudo cp weed /usr/local/bin/weed
|
|
|
|
- name: Install test dependencies
|
|
run: |
|
|
cd test/fuse_integration
|
|
go mod download
|
|
|
|
- name: Run FUSE Integration Tests
|
|
run: |
|
|
set -o pipefail
|
|
cd test/fuse_integration
|
|
echo "Running full FUSE integration test suite..."
|
|
go test -v -count=1 -timeout=45m ./... 2>&1 | tee /tmp/fuse-test-output.log
|
|
|
|
- name: Upload Test Logs
|
|
if: always()
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: fuse-integration-test-results
|
|
path: |
|
|
/tmp/fuse-test-output.log
|
|
/tmp/seaweedfs-fuse-logs/
|
|
retention-days: 7
|