Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions .ci/boot-linux-prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ check_platform

VBLK_IMGS=(
build/disk_ext4.img
build/disk_simplefs.img
)
# FIXME: mkfs.simplefs is not compilable on macOS, thus running the
# simplefs cases on Linux runner for now
if [[ "${OS_TYPE}" == "Linux" ]]; then
VBLK_IMGS+=(build/disk_simplefs.img)
fi

which dd > /dev/null 2>&1 || {
echo "Error: dd not found"
Expand All @@ -34,7 +30,7 @@ ACTION=$1
case "$ACTION" in
setup)
# Clone simplefs to use mkfs.simplefs util and create simplefs disk image
git clone https://github.com/sysprog21/simplefs.git -b rel2025.0 --depth 1
git clone https://github.com/sysprog21/simplefs.git -b rel2026.0 --depth 1

# Setup disk images
for disk_img in "${VBLK_IMGS[@]}"; do
Expand All @@ -54,17 +50,23 @@ case "$ACTION" in
;;
Darwin)
# Setup a /dev/ block device with ext4 fs to test guestOS access to hostOS /dev/ block device
dd if=/dev/zero of=${disk_img} bs=4M count=32
$(brew --prefix e2fsprogs)/sbin/mkfs.ext4 ${disk_img}
# Write simplefs.ko BEFORE hdiutil attach (hdiutil locks the image file)
DEBUGFS_CMD="$(brew --prefix e2fsprogs)/sbin/debugfs"
if [ ! -x "${DEBUGFS_CMD}" ]; then
echo "Error: debugfs not found at ${DEBUGFS_CMD}"
exit 1
if [[ "${disk_img}" =~ ext4 ]]; then
dd if=/dev/zero of=${disk_img} bs=4M count=32
$(brew --prefix e2fsprogs)/sbin/mkfs.ext4 ${disk_img}
# Write simplefs.ko BEFORE hdiutil attach (hdiutil locks the image file)
DEBUGFS_CMD="$(brew --prefix e2fsprogs)/sbin/debugfs"
if [ ! -x "${DEBUGFS_CMD}" ]; then
echo "Error: debugfs not found at ${DEBUGFS_CMD}"
exit 1
fi
"${DEBUGFS_CMD}" -w -R \
"write build/linux-image/simplefs.ko simplefs.ko" "${disk_img}" \
|| exit 1
else
mkdir -p simplefs/build
make IMAGE=${disk_img} ${disk_img} -C simplefs
mv simplefs/${disk_img} ./build
fi
"${DEBUGFS_CMD}" -w -R \
"write build/linux-image/simplefs.ko simplefs.ko" "${disk_img}" \
|| exit 1
BLK_DEV=$(hdiutil attach -nomount ${disk_img})
;;
esac
Expand Down Expand Up @@ -108,6 +110,7 @@ case "$ACTION" in
;;
Darwin)
hdiutil detach ${BLK_DEV_EXT4}
hdiutil detach ${BLK_DEV_SIMPLEFS}
;;
esac

Expand Down
6 changes: 1 addition & 5 deletions .ci/boot-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,8 @@ HOST_UTC_YEAR=$(LC_ALL=C date -u +%Y)
ENABLE_VBLK=1
VBLK_IMGS=(
build/disk_ext4.img
build/disk_simplefs.img
)
# FIXME: mkfs.simplefs is not compilable on macOS, thus running the
# simplefs cases on Linux runner for now
if [[ "${OS_TYPE}" == "Linux" ]]; then
VBLK_IMGS+=(build/disk_simplefs.img)
fi
SIMPLEFS_KO_SRC="${VBLK_IMGS[0]}"

# If any disk image is not found in the VBLK_IMGS, skip the VBLK tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ jobs:
. \${TMP_FILE}; \
.ci/boot-linux.sh; \
EXIT_CODE=\$?; \
sudo env TMP_FILE=\${TMP_FILE} BLK_DEV_EXT4=\${BLK_DEV_EXT4} .ci/boot-linux-prepare.sh cleanup; \
sudo env TMP_FILE=\${TMP_FILE} BLK_DEV_EXT4=\${BLK_DEV_EXT4} BLK_DEV_SIMPLEFS=\${BLK_DEV_SIMPLEFS} .ci/boot-linux-prepare.sh cleanup; \
exit \${EXIT_CODE};" >> "$GITHUB_ENV"
- name: Symlink gcc-15 due to the default /usr/local/bin/gcc links to system's clang
run: |
Expand Down
4 changes: 2 additions & 2 deletions mk/external.mk
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ LINUX_DATA_SKIP_DIR_LEVEL := 1
LINUX_DATA_SHA_CMD := $(SHA256SUM)

# simplefs kernel module
SIMPLEFS_VERSION := rel2025.0
SIMPLEFS_VERSION := rel2026.0
SIMPLEFS_DATA_DEST := /tmp
SIMPLEFS_DATA := $(SIMPLEFS_DATA_DEST)/simplefs
SIMPLEFS_DATA_URL := git clone https://github.com/sysprog21/simplefs $(SIMPLEFS_DATA) -b $(SIMPLEFS_VERSION) --depth=1
Expand All @@ -164,7 +164,7 @@ SIMPLEFS_DATA_URL := git clone https://github.com/sysprog21/simplefs $(SIMPLEFS_
# xargs -0 sha1sum | \
# LC_ALL=C sort | \
# sha1sum
SIMPLEFS_DATA_SHA := 863936f72e0781b240c5ec4574510c57f0394b99
SIMPLEFS_DATA_SHA := f04a3044bc64195ae59cea064c4bf330132de269
SIMPLEFS_DATA_SHA_CMD := $(SHA1SUM)

# Download Rules Template
Expand Down
Loading