I ran the test suite on a 3A5000 desktop, a LoongArch architecture machine, using Archlinux for LoongArch distro, see https://github.com/loongarchlinux. Some software versions are: * linux 6.3.0-rc4 * gcc 13.0.1 20230312 * binutils 2.40 * qemu 7.2.0 The test results of running "make check" with qemu 7.2 are as follows: ================================= GRUB 2.11: ./test-suite.log ================================= # TOTAL: 85 # PASS: 73 # SKIP: 8 # XFAIL: 0 # FAIL: 2 # XPASS: 0 # ERROR: 2 .. contents:: :depth: 2 ERROR: f2fs_test ================ mount: /tmp/grub-fs-tester.20230418175640563815408.f2fs.UDs/f2fs_rw: unknown filesystem type 'f2fs'. dmesg(1) may have more information after failed mount system call. MOUNT FAILED. ERROR f2fs_test (exit status: 99) FAIL: hfs_test ============== recode: Request `utf8..macroman' is erroneous mkfs.hfs: name required with -v option FAIL hfs_test (exit status: 1) ERROR: zfs_test =============== zpool not installed; cannot test zfs. ERROR zfs_test (exit status: 99) SKIP: pata_test =============== SKIP pata_test (exit status: 77) SKIP: ahci_test =============== SKIP ahci_test (exit status: 77) SKIP: uhci_test =============== SKIP uhci_test (exit status: 77) SKIP: ohci_test =============== SKIP ohci_test (exit status: 77) SKIP: ehci_test =============== SKIP ehci_test (exit status: 77) SKIP: fddboot_test ================== SKIP fddboot_test (exit status: 77) SKIP: netboot_test ================== SKIP netboot_test (exit status: 77) SKIP: pseries_test ================== SKIP pseries_test (exit status: 77) FAIL: grub_func_test ==================== WARNING: Image format was not specified for '/tmp/grub-shell.HeTAD8Ty3U/grub.iso' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions. Functional test failure: shift_test: ... gfxterm_menu_640x480xi16:3 failed: 0xce34981e vs 0xd9f04953 tests/video_checksum.c:checksum:615: assert failed: 0 Checksum gfxterm_menu_640x480xi16:2 failed: 0xa8fb749d vs 0xbf3fa5d0 tests/video_checksum.c:checksum:615: assert failed: 0 Checksum gfxterm_menu_640x480xi16:1 failed: 0xce34981e vs 0xd9f04953 gfxterm_menu: FAIL ... videotest_checksum: videotest_checksum: PASS exfctest: exfctest: PASS TEST FAILURE FAIL grub_func_test (exit status: 1) We got 2 errors: * f2fs_test The kernel uses 16k pages, causing failures when loading the f2fs kernel module, see https://github.com/torvalds/linux/blob/master/fs/f2fs/super.c#L4670 This error can be ignored. * zfs_test zfs does not support the LoongArch architecture and is not compatible with the 6.3 kernel. This error can be ignored. We got 2 failures: * hfs_test I use recode 3.7.14-1 on Archlinux, running `recode -l` gives no output `MacRoman`, so we get this error. On Linux systems that support LoongArch, there is currently no need to use HFS, so this failure can be ignored. * grub_func_test I don't know the reason for this failure. I guess it may be related to qemu's edk2. In the previous review, I was told that the failure here is the expected behavior. So, we can ignore this failure. Signed-off-by: Xiaotian Wu <wuxiaotian@loongson.cn> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
57 lines
1.7 KiB
Plaintext
57 lines
1.7 KiB
Plaintext
#! @BUILD_SHEBANG@
|
|
# Copyright (C) 2013 Free Software Foundation, Inc.
|
|
#
|
|
# GRUB is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# GRUB is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
set -e
|
|
grubshell=@builddir@/grub-shell
|
|
|
|
. "@builddir@/grub-core/modinfo.sh"
|
|
|
|
case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
|
|
# PLATFORM: Don't mess with real devices when OS is active
|
|
*-emu)
|
|
exit 77;;
|
|
# FIXME: qemu gets bonito DMA wrong
|
|
mipsel-loongson)
|
|
exit 77;;
|
|
# PLATFORM: no USB on ARC and qemu-mips platforms
|
|
mips*-arc | mips*-qemu_mips)
|
|
exit 77;;
|
|
# FIXME: No native drivers are available for those
|
|
powerpc-ieee1275 | sparc64-ieee1275 | arm*-efi | loongarch64-efi)
|
|
exit 77;;
|
|
esac
|
|
|
|
imgfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
|
|
outfile="`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"`" || exit 99
|
|
|
|
echo "hello" > "$outfile"
|
|
|
|
tar cf "$imgfile" "$outfile"
|
|
|
|
v=$(echo "nativedisk; source '(usb0)/$outfile';" |
|
|
"${grubshell}" --qemu-opts="-device ich9-usb-uhci1
|
|
-drive id=my_usb_disk,file=$imgfile,if=none
|
|
-device usb-storage,drive=my_usb_disk")
|
|
v=$(echo "$v" | tail -n 1)
|
|
if [ "$v" != "Hello World" ]; then
|
|
rm "$imgfile"
|
|
rm "$outfile"
|
|
exit 1
|
|
fi
|
|
|
|
rm "$imgfile"
|
|
rm "$outfile"
|