-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
busybox的ls(存在显示bug,不能显示出全部文件) #11
Comments
还有目前busybox支持的命令与测例中测试的busybox命令还不完全统一 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
sh: can't access tty; job control turned off
/E # help
Built-in commands:
------------------
. : [ [[ alias bg break cd chdir command continue echo eval exec
exit export false fg getopts hash help history jobs kill let
local printf pwd read readonly return set shift source test times
trap true type ulimit umask unalias unset wait
/E # ps
sh: ps: not found
/E # clear
sh: clear: not found
/E # date
sh: date: not found
/E # dmesg
sh: dmesg: not found 以下是测例中测试的命令: echo "#### independent command test"
ash -c exit
sh -c exit
basename /aaa/bbb
cal
clear
date
df
dirname /aaa/bbb
dmesg
du
expr 1 + 1
false
true
which ls
uname
uptime
printf "abc\n"
ps
pwd
free
hwclock
kill 10
ls
sleep 1
echo "#### file opration test"
touch test.txt
echo "hello world" > test.txt
cat test.txt
cut -c 3 test.txt
od test.txt
head test.txt
tail test.txt
hexdump -C test.txt
md5sum test.txt
echo "ccccccc" >> test.txt
echo "bbbbbbb" >> test.txt
echo "aaaaaaa" >> test.txt
echo "2222222" >> test.txt
echo "1111111" >> test.txt
echo "bbbbbbb" >> test.txt
sort test.txt | ./busybox uniq
stat test.txt
strings test.txt
wc test.txt
[ -f test.txt ]
more test.txt
rm test.txt
mkdir test_dir
mv test_dir test
rmdir test
grep hello busybox_cmd.txt
cp busybox_cmd.txt busybox_cmd.bak
rm busybox_cmd.bak
find -name "busybox_cmd.txt" |
关于 ls 的问题这个问题被修复过,只是之前训练营被用来出题了( https://scpointer.github.io/rcore2oscomp/docs/lab3/ls.html ),所以暂时没实装到内核代码中。本周我会加进来。 |
关于命令列表单纯输入 目前测试的命令不是所有命令,只是个别常用命令,并且这些命令的输出不一定都正确。 Starry 没有完成全部所需功能。换句话说,测试的有些命令输出不正确是符合预期的,但我们仍然需要这一测试来方便后续的工作。 执行 busybox 命令的方式应该加 / # ./busybox ps
PID USER TIME COMMAND
/ # ./busybox date
Thu Jan 1 00:01:26 UTC 1970 简单介绍一下这类程序执行的原理:
create_link(
&(FilePath::new("/sbin/busybox").unwrap()),
&(FilePath::new("busybox").unwrap()),
);
create_link(
&(FilePath::new("/sbin/ls").unwrap()),
&(FilePath::new("busybox").unwrap()),
);
create_link(
&(FilePath::new("/ls").unwrap()),
&(FilePath::new("/busybox").unwrap()),
);
create_link(
&(FilePath::new("/sh").unwrap()),
&(FilePath::new("/busybox").unwrap()),
);
......
目前仍然存在的问题上面的运行方式没放到 README 里,需要加几行说明一下。至于真正支持 busybox 的所有命令,短时间内还做不到 对测试的需求如果能区分 busybox 没有命令和内核没有实现的情况更好。例如:
|
宏内核的busybox终端ls命令无法显示出全部文件
The text was updated successfully, but these errors were encountered: