Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Test both fast memory and slower disk mounted filesystem #13927

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 23 additions & 3 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
fail-fast: false
matrix:
target:
- linux-amd64-e2e
- linux-amd64-e2e-release
- linux-amd64-e2e-ramfs
- linux-amd64-e2e-ext4
- linux-386-e2e
steps:
- uses: actions/checkout@v2
Expand All @@ -20,14 +22,32 @@ jobs:
run: |
echo "${TARGET}"
case "${TARGET}" in
linux-amd64-e2e)
linux-amd64-e2e-release)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it worth to maintain the 'release', that seems to be just 'unopinionated' variant of the same tasts as ramfs vs. ext4.

PASSES='build release e2e' MANUAL_VER=v3.5.0 CPU='4' EXPECT_DEBUG='true' COVER='false' RACE='true' ./scripts/test.sh 2>&1 | tee test.log
! egrep "(--- FAIL:|FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test.log
;;
linux-386-e2e)
GOARCH=386 PASSES='build e2e' CPU='4' EXPECT_DEBUG='true' COVER='false' RACE='true' ./scripts/test.sh 2>&1 | tee test.log
! egrep "(--- FAIL:|FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test.log
;;
linux-amd64-e2e-ramfs)
TESTDIR=${PWD}/ramfs
mkdir ${TESTDIR}
sudo mount -t ramfs -o size=2048m none ${TESTDIR}
sudo chmod 777 ${TESTDIR}
TMPDIR=${TESTDIR} PASSES='build e2e' CPU='4' EXPECT_DEBUG='true' COVER='false' RACE='true' ./scripts/test.sh 2>&1 | tee test.log
! egrep "(--- FAIL:|FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test.log
;;
linux-amd64-e2e-ext4)
TESTDIR=${PWD}/ext4
dd if=/dev/zero of=ext4.img bs=1M count=2048
mkfs.ext4 ext4.img
mkdir ${TESTDIR}
sudo mount -t ext4 -o loop ext4.img ${TESTDIR}
sudo chmod 777 ${TESTDIR}
TMPDIR=${TESTDIR} PASSES='build e2e' CPU='4' EXPECT_DEBUG='true' COVER='false' RACE='true' ./scripts/test.sh 2>&1 | tee test.log
! egrep "(--- FAIL:|FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test.log
;;
*)
echo "Failed to find target"
exit 1
Expand Down
24 changes: 20 additions & 4 deletions .github/workflows/functional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
fail-fast: false
matrix:
target:
- linux-amd64-functional
- linux-amd64-functional-ramfs
- linux-amd64-functional-ext4
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
Expand All @@ -19,8 +20,23 @@ jobs:
run: |
echo "${TARGET}"
case "${TARGET}" in
linux-amd64-functional)
GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh && GOARCH=amd64 PASSES='functional' ./scripts/test.sh
linux-amd64-functional-ramfs)
GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh
TESTDIR=${PWD}/ramfs
mkdir ${TESTDIR}
sudo mount -t ramfs -o size=2048m none ${TESTDIR}
sudo chmod 777 ${TESTDIR}
TMPDIR=${TESTDIR} GOARCH=amd64 PASSES='functional' ./scripts/test.sh
;;
linux-amd64-functional-ext4)
GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh
TESTDIR=${PWD}/ext4
dd if=/dev/zero of=ext4.img bs=1M count=2048
mkfs.ext4 ext4.img
mkdir ${TESTDIR}
sudo mount -t ext4 -o loop ext4.img ${TESTDIR}
sudo chmod 777 ${TESTDIR}
TMPDIR=${TESTDIR} GOARCH=amd64 PASSES='functional' ./scripts/test.sh
;;
*)
echo "Failed to find target"
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
- linux-amd64-integration-1-cpu
- linux-amd64-integration-2-cpu
- linux-amd64-integration-4-cpu
- linux-amd64-integration-ramfs
- linux-amd64-integration-ext4
- linux-amd64-unit-4-cpu-race
- linux-386-unit-1-cpu
steps:
Expand All @@ -33,6 +35,24 @@ jobs:
linux-amd64-integration-4-cpu)
GOARCH=amd64 CPU=4 PASSES='integration' RACE='false' ./scripts/test.sh
;;
linux-amd64-integration-ramfs)
GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh
TESTDIR=${PWD}/ramfs
mkdir ${TESTDIR}
sudo mount -t ramfs -o size=2048m none ${TESTDIR}
sudo chmod 777 ${TESTDIR}
TMPDIR=${TESTDIR} GOARCH=amd64 PASSES='integration' RACE='false' ./scripts/test.sh
;;
linux-amd64-integration-ext4)
GO_BUILD_FLAGS='-v -mod=readonly' ./scripts/build.sh
TESTDIR=${PWD}/ext4
dd if=/dev/zero of=ext4.img bs=1M count=2048
mkfs.ext4 ext4.img
mkdir ${TESTDIR}
sudo mount -t ext4 -o loop ext4.img ${TESTDIR}
sudo chmod 777 ${TESTDIR}
TMPDIR=${TESTDIR} GOARCH=amd64 PASSES='integration' RACE='false' ./scripts/test.sh
;;
linux-amd64-unit-4-cpu-race)
GOARCH=amd64 PASSES='unit' RACE='true' CPU='4' ./scripts/test.sh -p=2
;;
Expand Down