Skip to content

Commit

Permalink
ci: cover zoned test
Browse files Browse the repository at this point in the history
Zoned test needs v6.6 kernel, so far fedora doesn't support it yet.

If v6.6 is supported, use blktests/zbd for covering test.

Signed-off-by: Ming Lei <[email protected]>
  • Loading branch information
ming1 committed Oct 14, 2023
1 parent 2059a51 commit 9d0d4db
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ jobs:
mkosi ssh "ls -l /usr/share/blktests/src/miniublk"
mkosi ssh "cat /usr/share/blktests/src/miniublk"
mkosi ssh "cd /usr/share/blktests/; ./check ublk"
mkosi ssh "/usr/share/rublk/ci/ublk_zoned.sh /root/bin/rublk /usr/share/blktests/"
mkosi ssh "/root/bin/rublk list"
mkosi ssh "cat /usr/share/blktests/config"
mkosi ssh "cd /usr/share/blktests/; ./check zbd"
mkosi ssh "/root/bin/rublk del -a"
- name: "cleanup"
if: always()
Expand Down
25 changes: 25 additions & 0 deletions ci/ublk_zoned.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

RUBLK=$1
BLKTESTS_TOP=$2

modprobe ublk_drv

if `$RUBLK features | grep ZONED > /dev/null 2>&1`; then
echo "kernel support ublk-zoned"

$RUBLK del -a
$RUBLK add zoned --zone-size=4 --size=512 > /dev/null 2>&1
sleep 2

if `$RUBLK list | grep zoned > /dev/null`; then
echo "found ublk zoned"
echo "TEST_DEVS=(/dev/ublkb0)" > $BLKTESTS_TOP/config
else
echo "TEST_DEVS=()" > $BLKTESTS_TOP/config
echo "not found ublk zoned"
fi
else
echo "kernel doesn't support ublkzoned"
echo "TEST_DEVS=()" > $BLKTESTS_TOP/config
fi

0 comments on commit 9d0d4db

Please sign in to comment.