1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-21 15:46:17 +04:00

Fix riscv32 testing

This commit is contained in:
Jiajie Chen 2019-05-03 15:17:06 +08:00
parent 7331404fc7
commit f1971c489a
5 changed files with 9 additions and 6 deletions

View File

@ -273,7 +273,7 @@ justrunui: build
-device virtio-mouse-device -device virtio-mouse-device
justruntest: build justruntest: build
@qemu-system-$(arch) $(qemu_opts) --append $(init) -serial file:../tests/stdout -monitor null @qemu-system-$(arch) $(filter-out -serial mon:stdio, $(qemu_opts)) --append $(init) -serial file:../tests/stdout -monitor null
debug: $(kernel) $(kernel_img) debug: $(kernel) $(kernel_img)
@qemu-system-$(arch) $(qemu_opts) -s -S & @qemu-system-$(arch) $(qemu_opts) -s -S &

View File

@ -45,9 +45,9 @@ pub fn add_user_shell() {
let inode = ROOT_INODE.lookup(&cmdline).unwrap(); let inode = ROOT_INODE.lookup(&cmdline).unwrap();
processor().manager().add(Thread::new_user( processor().manager().add(Thread::new_user(
&inode, &inode,
&cmdline,
cmdline.split(' ').map(|s| s.into()).collect(), cmdline.split(' ').map(|s| s.into()).collect(),
Vec::new(), Vec::new(),
Vec::new(),
)); ));
} }

1
tests/.gitignore vendored
View File

@ -1 +1,2 @@
stdout stdout
stdout.new

View File

@ -1,3 +1,3 @@
Hello Rust uCore! Hello Rust uCore!
I am process 0. I am process 0.
hello pass. hello pass.

View File

@ -13,7 +13,9 @@ do
wait $pid wait $pid
diff -I 'bbl loader' -I 'Hello RISCV! in hart' -u ${f%.cmd}.out stdout || { echo 'testing failed for' $f; exit 1; } awk 'NR > 25 { print }' < stdout > stdout.new
diff -u ${f%.cmd}.out stdout.new || { echo 'testing failed for' $f; exit 1; }
echo testing $f pass echo testing $f pass
done done