Arceos-monolithic / Starry

An experimental modular OS written in Rust.
http://rcore-os.cn/arceos/
Apache License 2.0
12 stars 15 forks source link

unixbench测试问题(未找到相关文件) #13

Closed apengaaa closed 6 months ago

apengaaa commented 7 months ago

在unixbench测试中部分测例可以成功运行并出现结果,但是在执行中间几条测例时出现找不到文件的问题:

       d8888                            .d88888b.   .d8888b.
      d88888                           d88P" "Y88b d88P  Y88b
     d88P888                           888     888 Y88b.
    d88P 888 888d888  .d8888b  .d88b.  888     888  "Y888b.
   d88P  888 888P"   d88P"    d8P  Y8b 888     888     "Y88b.
  d88P   888 888     888      88888888 888     888       "888
 d8888888888 888     Y88b.    Y8b.     Y88b. .d88P Y88b  d88P
d88P     888 888      "Y8888P  "Y8888   "Y88888P"   "Y8888P"

arch = riscv64
platform = riscv64-qemu-virt
target = riscv64gc-unknown-none-elf
smp = 1
build_mode = release
log_level = off

Unixbench DHRY2 test(lps): 2863009
Unixbench WHETSTONE test(MFLOPS): 72.440
Unixbench SYSCALL test(lps): 22313
Unixbench CONTEXT test(lps): 2434
Unixbench PIPE test(lps): 3376
Unixbench SPAWN test(lps): 91
Unixbench EXECL test(lps): 37
Unixbench FS_WRITE_SMALL test(KBps): 51
Unixbench FS_READ_SMALL test(KBps): 1856
Unixbench FS_COPY_SMALL test(KBps): 67
Unixbench FS_WRITE_MIDDLE test(KBps): 52
Unixbench FS_READ_MIDDLE test(KBps): 5065
Unixbench FS_COPY_MIDDLE test(KBps): 1706
Unixbench FS_WRITE_BIG test(KBps): 4044
Unixbench FS_READ_BIG test(KBps): 9171
Unixbench FS_COPY_BIG test(KBps): 2063
./tst.sh: line 17: can't open ./sort.src: no such file
Hangup
Unixbench SHELL1 test(lpm): 0
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
Unixbench SHELL8 test(lpm): 0
Hangup  // ??
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
./tst.sh: line 17: can't open ./sort.src: no such file
Unixbench SHELL16 test(lpm): 0
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
Hangup
Unixbench ARITHOH test(lps): 433680279
Unixbench SHORT test(lps): 5086051
Unixbench INT test(lps): 5062382
Unixbench LONG test(lps): 5123699
Unixbench FLOAT test(lps): 5054445
Unixbench DOUBLE test(lps): 5173903
Unixbench HANOI test(lps): 35822
Unixbench EXEC test(lps): 32

sort.src文件目前尚未找到出处

yfblock commented 6 months ago

sort.src https://github.com/oscomp/testsuits-for-oskernel/blob/pre-2024-riscv64/aarch64/x86_64/scripts/unixbench/sort.src It seems that the file was not copied during compilation.

Sorry, there was something wrong about my Chinese input method.

yfblock commented 6 months ago

UnixBench testcases on the x86_64 platform require AVX support. Compilation parameters was specific the native, so they use the CPU machine of compile machine during compilation. If it executes vmovdqa, it will have an invalid opcode (exception 6).

image

https://www.felixcloutier.com/x86/movdqa:vmovdqa32:vmovdqa64

But the default CPU in QEMU doesn't support the AVX instruction set. Therefore, we need to specify a CPU with AVX support.

Here is an example. image

yfblock commented 6 months ago

After that, open AVX extension support and modify Cr4 at boot time.

image

image

elliott10 commented 6 months ago

unixbench运行问题修复

修改的代码请见:https://github.com/oscomp/testsuits-for-oskernel/commit/c3fa3c1c24fe83c2ff295d355f83fe2525018f62