summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Scherle2024-04-23 10:45:55 +0200
committerSimon Rettberg2024-05-13 18:26:42 +0200
commit22dd7620ebe14d776312bbe60c312efe64fee560 (patch)
tree09f8d238df46dc05c0e1148bc421501adacee494
parent[FUSE] Move curl reset to start of function (diff)
downloaddnbd3-22dd7620ebe14d776312bbe60c312efe64fee560.tar.gz
dnbd3-22dd7620ebe14d776312bbe60c312efe64fee560.tar.xz
dnbd3-22dd7620ebe14d776312bbe60c312efe64fee560.zip
github: update fuse tests
-rw-r--r--.github/workflows/test-cow-fuse.yml79
1 files changed, 33 insertions, 46 deletions
diff --git a/.github/workflows/test-cow-fuse.yml b/.github/workflows/test-cow-fuse.yml
index 6828d3a..a8f5f1b 100644
--- a/.github/workflows/test-cow-fuse.yml
+++ b/.github/workflows/test-cow-fuse.yml
@@ -4,16 +4,15 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Setup dotnet
- uses: actions/setup-dotnet@v2
+ uses: actions/setup-dotnet@v4
with:
- dotnet-version: '6.x.x'
-
+ dotnet-version: '8.x.x'
- name: Install dnbd3 dependencies
working-directory: ${{ github.workspace }}
run: |
- sudo apt-get update -y -qq
+ sudo apt-get update -y -qq
sudo apt-get install -y -qq make \
clang-format \
linux-headers-generic \
@@ -45,16 +44,16 @@ jobs:
run: git clone --depth 1 --branch "master" "https://github.com/z0Kng/cow_merger_service.git" "../cow_server"
- name: Build cow_merger_service
working-directory: ${{ github.workspace }}/../cow_server/cow_merger_service
- run: dotnet publish -c Release -o publish -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:PublishTrimmed=True -p:PublishReadyToRunShowWarnings=true --self-contained true --runtime linux-x64
+ run: dotnet publish -c Release -o publish -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:PublishReadyToRunShowWarnings=true --self-contained true --runtime linux-x64
- name: Setup cow_merger_service
working-directory: ${{ github.workspace }}/../cow_server/
run: |
- mkdir /home/runner/work/WorkingDirectory
- mkdir /home/runner/work/OriginalImageDirectory
+ mkdir /home/runner/work/WorkingDirectory
+ mkdir /home/runner/work/OriginalImageDirectory
mkdir /home/runner/work/Output
sed -i 's/^ "WorkingDirectory":.*/ "WorkingDirectory": "\/home\/runner\/work\/WorkingDirectory",/g' cow_merger_service/publish/appsettings.json
sed -i 's/^ "OriginalImageDirectory":.*/ "OriginalImageDirectory": "\/home\/runner\/work\/OriginalImageDirectory",/g' cow_merger_service/publish/appsettings.json
- sed -i 's/^ "DestinationDirectory":.*/ "DestinationDirectory": "\/home\/runner\/work\/Output",/g' cow_merger_service/publish/appsettings.json
+ sed -i 's/^ "DestinationDirectory":.*/ "DestinationDirectory": "\/home\/runner\/work\/Output",/g' cow_merger_service/publish/appsettings.json
while read line; do echo $line; done < cow_merger_service/publish/appsettings.json
cd cow_merger_service/publish/
FILENAME=cow_merger_service
@@ -69,31 +68,32 @@ jobs:
run: |
mkdir /home/runner/work/dnbd3-server-config/
cp pkg/config/server.conf /home/runner/work/dnbd3-server-config/
- sed -i "s/^basePath=.*/basePath=\/home\/runner\/work\/OriginalImageDirectory/g" /home/runner/work/dnbd3-server-config/server.conf
+ sed -i "s/^basePath=.*/basePath=\/home\/runner\/work\/OriginalImageDirectory/g" /home/runner/work/dnbd3-server-config/server.conf
cd build/src/server
./dnbd3-server --config /home/runner/work/dnbd3-server-config/
sleep 5
- name: Run standard test
working-directory: ${{ github.workspace }}/build/src
run: |
- mkdir /home/runner/work/mount
- mkdir /home/runner/work/tmp
- ./fuse/dnbd3-fuse "/home/runner/work/mount" -f -h localhost -i test -c "/home/runner/work/tmp" -C localhost:5000 --cow-stats-stdout --cow-stats-file 2>&1 > /home/runner/work/tmp/standardLog1.out &
+ mkdir /home/runner/work/mount
+ mkdir /home/runner/work/tmp
+ mkdir /home/runner/work/logs
+ ./fuse/dnbd3-fuse "/home/runner/work/mount" -f -h localhost -i test -c "/home/runner/work/tmp" -C localhost:5000 --cow-stats-stdout --cow-stats-file 2>&1 > /home/runner/work/logs/standardLog1.out &
PID=$!
sleep 5
echo PID: $PID
- ./cowtest/dnbd3-fuse-cow-test -t "/home/runner/work/mount/img"
+ ./cowtest/dnbd3-fuse-cow-test -t "/home/runner/work/mount/img"
echo unmounting: $PID
sudo umount /home/runner/work/mount
wait $PID
echo unmounted
- ./fuse/dnbd3-fuse "/home/runner/work/mount" -f -h localhost -i test -L "/home/runner/work/tmp" -C localhost:5000 --merge --cow-stats-stdout --cow-stats-file 2>&1 > /home/runner/work/tmp/standardLog2.out &
+ ./fuse/dnbd3-fuse "/home/runner/work/mount" -f -h localhost -i test -L "/home/runner/work/tmp" -C localhost:5000 --merge --cow-stats-stdout --cow-stats-file 2>&1 > /home/runner/work/logs/standardLog2.out &
PID=$!
sleep 5
echo PID: $PID
- ./cowtest/dnbd3-fuse-cow-test -v "/home/runner/work/mount/img"
+ ./cowtest/dnbd3-fuse-cow-test -v "/home/runner/work/mount/img"
echo unmounting: $PID
- sudo umount /home/runner/work/mount
+ sudo umount /home/runner/work/mount
wait $PID
echo unmounted
sleep 30
@@ -103,11 +103,13 @@ jobs:
working-directory: ${{ github.workspace }}/build/src
run: |
cp /home/runner/work/OriginalImageDirectory/test.r1 /home/runner/work/
- ./fuse/dnbd3-fuse "/home/runner/work/mount" -f -h localhost -i test -c "/home/runner/work/tmp" -C localhost:5000 --cow-stats-stdout --cow-stats-file 2>&1 > /home/runner/work/tmp/randomLog1.out &
+ rm -rf /home/runner/work/tmp
+ mkdir /home/runner/work/tmp
+ ./fuse/dnbd3-fuse "/home/runner/work/mount" -f -h localhost -i test -c "/home/runner/work/tmp" -C localhost:5000 --cow-stats-stdout --cow-stats-file 2>&1 > /home/runner/work/logs/randomLog1.out &
PIDFUSE=$!
sleep 5
echo PIDFUSE : $PIDFUSE
- ./cowtest/dnbd3-fuse-cow-test --randomTest "/home/runner/work/mount/img" "/home/runner/work/test.r1" 2>&1 > /home/runner/work/tmp/randomTestLog.out &
+ ./cowtest/dnbd3-fuse-cow-test --randomTest "/home/runner/work/mount/img" "/home/runner/work/test.r1" 2>&1 > /home/runner/work/logs/randomTestLog1.out &
PIDTEST=$!
sleep 60
echo "stopping test"
@@ -118,11 +120,11 @@ jobs:
sudo umount /home/runner/work/mount
echo unmounted
wait $PIDFUSE
- ./fuse/dnbd3-fuse "/home/runner/work/mount" -f -h localhost -i test -L "/home/runner/work/tmp" -C localhost:5000 --merge --cow-stats-stdout --cow-stats-file 2>&1 > /home/runner/work/tmp/randomLog2.out &
+ ./fuse/dnbd3-fuse "/home/runner/work/mount" -f -h localhost -i test -L "/home/runner/work/tmp" -C localhost:5000 --merge --cow-stats-stdout --cow-stats-file 2>&1 > /home/runner/work/logs/randomLog2.out &
PIDFUSE=$!
sleep 5
echo PIDFUSE : $PIDFUSE
- ./cowtest/dnbd3-fuse-cow-test --compare "/home/runner/work/mount/img" "/home/runner/work/test.r1"
+ ./cowtest/dnbd3-fuse-cow-test --compare "/home/runner/work/mount/img" "/home/runner/work/test.r1" 2>&1 > /home/runner/work/logs/randomTestLog2.out &
echo unmounting: $PIDFUSE
sudo umount /home/runner/work/mount
echo unmounted
@@ -133,28 +135,13 @@ jobs:
- name: Print logs
if: always()
run: |
- echo "====fuse-client status.txt===="
- while read line; do echo $line; done < /home/runner/work/tmp/status.txt
- echo
- echo "====fuse-client standardLog1.out===="
- while read line; do echo $line; done < /home/runner/work/tmp/standardLog1.out
- echo
- echo "====fuse-client standardLog2.out===="
- while read line; do echo $line; done < /home/runner/work/tmp/standardLog2.out
- echo
- echo "====fuse-client randomLog1.out===="
- while read line; do echo $line; done < /home/runner/work/tmp/randomLog1.out
- echo
- echo "====fuse-client randomLog2.out===="
- while read line; do echo $line; done < /home/runner/work/tmp/randomLog2.out
- echo
- echo "====fuse-client randomTestLog.out===="
- while read line; do echo $line; done < /home/runner/work/tmp/randomTestLog.out
- echo
- echo "====dnbd3-server===="
- while read line; do echo $line; done < ${{ github.workspace }}/build/src/server/dnbd3.log
- echo
- echo "====cow_merger_service===="
- while read line; do echo $line; done < ${{ github.workspace }}/../cow_server/cow_merger_service/publish/log.out
-
-
+ tail -n+0 2>&1 \
+ /home/runner/work/logs/standardLog1.out \
+ /home/runner/work/logs/standardLog2.out \
+ /home/runner/work/logs/randomLog1.out \
+ /home/runner/work/logs/randomTestLog1.out \
+ /home/runner/work/logs/randomLog2.out \
+ /home/runner/work/logs/randomTestLog2.out \
+ /home/runner/work/tmp/status.txt \
+ ${{ github.workspace }}/build/src/server/dnbd3.log \
+ ${{ github.workspace }}/../cow_server/cow_merger_service/publish/log.out