RustForge

rust-kernel

Rustbelt: a hobby x86_64 kernel written in Rust

rust-kernel / disk / scripts / selftest.sh
2118 bytes ยท raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Rustbelt shell self-test: `cargo run --features headless` runs this with
# `sh /mnt/disk0/scripts/selftest.sh` (B:/scripts/selftest.sh) and scripts/run-headless.sh checks the output.
ver
drives
pwd
cd B:
ls
ls -l notes
type B:/readme.txt
cat b:notes/todo.txt | grep -i EXT | wc -l
dir bin | wc -l
echo first line > A:/tmp/out.txt
echo second line >> /tmp/out.txt
cat < /tmp/out.txt
md /tmp/work
copy B:/notes/todo.txt /tmp/work
touch /tmp/work/empty.txt
ls -l A:/tmp/work
del /tmp/work/todo.txt /tmp/work/empty.txt /tmp/work
grep "B:" readme.txt
alias ll="ls -l"
ll A:/tmp
run --trace cat B:/notes/todo.txt
start sleep 1
jobs
wait
cd C:
ls
cat hello-link
grep "line 12345" big.txt
cp B:/notes/todo.txt C:/todo.txt
cat C:/todo.txt | grep -i ext2
md C:/made-here
echo written by Rustbelt > C:/made-here/note.txt
type C:/made-here/note.txt
ls -l C:/
cd D:
ls
cat "long file name with spaces.txt"
cp B:/notes/todo.txt D:/
cp C:/hello.txt "Copied From Ext2.txt"
cp mixedcase.txt C:/from-exfat.txt
cat C:/from-exfat.txt
md "New Folder"
echo hi from exFAT > "New Folder/Note.txt"
type "new folder/NOTE.TXT"
ls -l D:/
cd E:
ls -l
cat hello.txt
cat hello-link
cat docs/btrfs/cow.txt
wc big.txt
grep "line 119999" big.txt
cat projects/rustbelt/stage10.txt
cp docs/btrfs/cow.txt D:/cow.txt
type D:/COW.TXT | wc -l
cp docs/btrfs/chunks.txt C:/chunks.txt
cat C:/chunks.txt | wc -l
echo hi > new.txt
rm hello.txt
mkdir newdir
run evil
# Stage 11: a stack overflow hits the guard zone and is killed cleanly;
# then two CPU hogs in the background, and sysinfo shows the load per CPU.
run overflow
start spin
start spin
sysinfo
wait
# Stage 12: networking. DHCP gave us an address; ping QEMU's gateway; fetch
# from the test web server QEMU runs for 10.0.2.100 (guestfwd), and save a
# 108 KB file to D:; look up a name (only works if the host has DNS); then
# serve one request with httpd (run-headless.sh curls it through hostfwd).
ifconfig
ping -c 3 -i 200 10.0.2.2
fetch http://10.0.2.100/
wget -o D:/seq.txt http://10.0.2.100/big
cat D:/seq.txt | wc -l
host example.com
httpd -n 1 -t 20
nosuchprogram
cd Q:
cd A:/tmp
pwd
exit 0