Commit graph

70 commits

Author SHA1 Message Date
Frans Kaashoek
a60bf178c6 Thanks segfault@github 2024-07-26 19:40:01 -04:00
RayAndrew
93c70ce0f9 Remove all files created during testing
Remove the following files to restore the state of the filesystem,
so subsequent tests don't fail unexpectedly by creating same filename.

q0             2 21 0
q?             2 22 0
q;             2 23 0
qC             2 24 0
q=             2 25 0
qA             2 26 0
q:             2 27 0
q<             2 28 0
q>             2 29 0
q@             2 30 0
qB             2 31 0
r0             2 32 0
r?             2 33 0
r;             2 34 0
rC             2 35 0
r=             2 36 0
rA             2 37 0
r:             2 38 0
r<             2 39 0
r>             2 40 0
r@             2 41 0
rB             2 42 0
s0             2 43 0
s?             2 44 0
s;             2 45 0
sC             2 46 0
s=             2 47 0
sA             2 48 0
s:             2 49 0
s<             2 50 0
s>             2 51 0
p?             2 52 0
p;             2 53 0
pC             2 54 0
p=             2 55 0
pA             2 56 0
p:             2 57 0
p<             2 58 0
p>             2 59 0
p@             2 60 0
pB             2 61 0
s@             2 62 0
sB             2 63 0
2024-07-26 19:11:05 -04:00
RayAndrew
7687b389c2 Report an error when n is not equal to MAXFILE
The variable `n` represents the number of blocks that have been read.
2024-07-26 19:10:21 -04:00
Robert Morris
5a1a4d45a4 slightly more thorough testing that one can't write invalid addresses 2024-01-01 16:10:02 -05:00
Robert Morris
fe940f4d63 fix user.ld to get read-only text with riscv64-linux-gnu-ld 2.41 2024-01-01 13:10:35 -05:00
Robert Morris
dd2574bc10 tell gcc to check printf format strings
add %ld %lld %u %lu %llu %lx %llx to kernel and user printf
2023-12-31 12:21:46 -05:00
Robert Morris
d2b2dff749 fix copyout() to refuse to write a read-only page 2022-10-04 11:52:57 -04:00
Frans Kaashoek
3d6ce9b308 Separate tests in slow and quick. The slow tests run xv6 out of
memory, out of disk space, or test big directories.

Support -q option to run only the quick tests, which saves about
7mins.

Clean up driver by removing duplicated code.
2022-08-25 09:45:35 -04:00
Robert Morris
7c1810e1ae tolerate running out of inodes 2022-08-23 12:26:26 -04:00
Frans Kaashoek
948cfbdb1f Rename test to textwrite 2022-08-23 11:21:26 -04:00
Frans Kaashoek
ccb7bd14c7 Merge branch 'riscv' into uvm-perm 2022-08-23 11:01:06 -04:00
Robert Morris
8621be8f3d tolerate out of disk when creating . and .. in mkdir() 2022-08-23 08:52:15 -04:00
Robert Morris
dc405cdb7b don't panic if out of disk space when extending a directory. 2022-08-23 08:23:12 -04:00
Frans Kaashoek
cef1b57d4a Compile user binary to map text without W and data without X
Use the flags in elf header to set vm permissions
Modify pgbug() so that usertests text segment is without W
Add test to check app cannot write text segment
2022-08-15 19:02:19 -04:00
Frans Kaashoek
2175c6b0b6 Run tests in the order in which they appear in the file 2022-08-15 19:01:34 -04:00
Robert Morris
872fa88e8a tolerate running out of disk blocks 2022-08-10 06:13:52 -04:00
Frans Kaashoek
bf4816c9c6 Delete unused code (Jude Rich <juder11@gmail.com>) 2021-09-01 07:24:07 -04:00
flespark
49f1e2f888 fix a invalid printf format string 2021-08-31 14:16:31 -04:00
FIXED-TERM Chen Ian (BT-CO/QMM5)
8d4ff0bc1e fix typos in user/usertest.c & kernel/log.c 2021-08-31 14:10:14 -04:00
Robert Morris
3b3f83f100 check that there's no panic if user process tries to write >= MAXVA 2021-08-06 11:06:24 -04:00
Robert Morris
08c9eda85f sync usertests 2021-07-02 14:24:45 -04:00
Robert Morris
1841baa3dd keep usertests.c in sync with riscv-sol-2020 2021-07-02 09:57:14 -04:00
Frans Kaashoek
60b63b9d07 x 2020-11-05 19:50:46 -05:00
Frans Kaashoek
ef97f65025 kill/status test 2020-11-05 19:50:46 -05:00
Robert Morris
aeaf610c67 avoid deadlock by disk intr acking interrupt first, then processing ring 2020-10-05 19:30:27 -04:00
Robert Morris
3c70be9070 often causes deadlock after a few minutes 2020-10-05 19:30:27 -04:00
Frans Kaashoek
8ffdfad990 Add s to many printf statements that expect it (thanks Cece Chu)
Add dirtest to the list of tests
2020-10-03 16:36:20 -04:00
Frans Kaashoek
6750608824 When either_copyin/out fails, return an error from write/read
Add a test to check that read/write return an error
2020-10-03 16:36:20 -04:00
Frans Kaashoek
de434fd933 Remove obselete ifdef that shouldn't have been there ever 2020-08-28 09:00:41 -04:00
Robert Morris
0b4e78f3a9 fix usertests to pass all the riscv-sol-fall20 solutions. 2020-08-28 09:00:41 -04:00
Robert Morris
2a4a8764a5 touch sbrk()-allocated memory to make sure it exists 2020-08-21 11:00:45 -04:00
Robert Morris
5860dcd07d usertest for exec() out of memory recovery
and fix a few exec() bugs
2020-08-21 11:00:45 -04:00
Robert Morris
8dc71a257d handle another out-of-memory in fork(). the policy here is not consistent,
since other calls (e.g. exec()) panic on out of memory.
2020-08-17 08:18:23 -04:00
Robert Morris
d8fe1773b2 test string system call arguments that cross over the end of the last page. 2020-08-10 11:19:10 -04:00
Robert Morris
76d6c57ede test copyinstr()'s handling of the terminating null 2020-08-10 11:19:10 -04:00
Robert Morris
e3b7058907 streamline copyin/copyout code in usertests
fix bugs in read/write return values when there's an error
2020-08-10 11:19:10 -04:00
Robert Morris
a93321cb25 test pointer checking in copyin, copyout, copyinstr 2020-08-10 11:19:10 -04:00
Robert Morris
7f35d7a14e modify each page in usertests countfree()
get rid of static for walk() and freewalk()
2020-08-10 11:19:10 -04:00
Robert Morris
af9eb9114c make "echo hello > x" truncate file x. 2020-08-10 11:19:10 -04:00
Robert Morris
16b3b63f06 grind: run parallel system calls forever 2019-11-06 11:18:43 -05:00
Robert Morris
9de9211b11 usertests -c to repeat tests forever
detect memory leaks
no more "already ran user tests"
2019-10-28 05:58:28 -04:00
Robert Morris
d9160fb4b9 nits 2019-10-27 08:03:19 -04:00
Robert Morris
d175beadf5 bug fix: reparent() sometimes deadlocked
bug fix: exit() sometimes released a different parent lock than it acquired
usertests
2019-09-23 06:50:25 -04:00
Frans Kaashoek
843ce77765 Stress copyin for the full allocated page (good for lazy lab). 2019-09-21 17:28:18 -04:00
Robert Morris
d940fd122d don't leak memory if exec() arguments are invalid. 2019-09-21 04:54:25 -04:00
Frans Kaashoek
6b79ee69b7 Refactor big sbrk test in smaller, easier-to-understand tests 2019-09-21 02:07:24 -04:00
Frans Kaashoek
ee67dbd211 Not much: factor sbrksimple from big sbrktest 2019-09-20 17:08:13 -04:00
Robert Morris
7c7ed20822 don't leak a file system block if the buf argument to write is invalid
and a usertest
2019-09-20 13:09:26 -04:00
Robert Morris
e1a37303c8 yet another sbrk() bug fix, and usertest 2019-09-20 12:13:57 -04:00
Robert Morris
4de161f973 don't panic if a program frees all its memory with sbrk().
if a program sbrk()'s to a non-page-boundary, don't free that page.
corresponding usertests.
2019-09-20 11:35:27 -04:00