38 Commits

Author SHA1 Message Date
Scott Haseley
4e93e0b105 Forkbomb changes. First, use a local success string and make sure to access it early so a page
gets allocated. Second, change the timeout for the vm stability test to 20s. It looks like some
students are right up on this boundary.
2016-04-22 14:54:10 -04:00
Scott Haseley
e21c37b14f Added a secprintf message to the beginning of forkbomb so it causes page faults
and allocates pages that we'll need later to print success.
2016-04-15 14:13:48 -04:00
Scott Haseley
105fbc5ddd Add stacktest to testbin Makefile 2016-04-15 12:09:21 -04:00
Scott Haseley
0207e6b066 More tests for ASST3.2
Added 2 new sbrktests, one to test a huge sbrk with only touch a few pages (shouldn't crash),
and another to make sure pages are getting freed when the breakpoint moves down. Also, added
a stacktest that checks that 4M stacks are supported and pages are allocated on-demand.
2016-04-14 17:47:54 -04:00
Scott Haseley
dc1a1949a6 Fix ctest compile issue 2016-04-08 15:55:48 -04:00
Scott Haseley
a56bf008ba Change forkbomb to print progress 2016-04-07 13:17:23 -04:00
Scott Haseley
fedf80f599 Userland changes for test161/assignment 3. 2016-04-06 13:53:21 -04:00
Scott Haseley
194f76ef70 The "huge positive" number being tested wasn't big enough. Now using a number that would
cause the heap to bleed into the stack.
2016-04-06 13:33:28 -04:00
Scott Haseley
b488b7dcea Added a test.h file for userland.
Currently, this file has tsay() and nsay(), which are atomic vararg print operations
that are loud or quiet (respectively) during automated testing. These are used
throughout userland when output might get intermingled.
2016-04-06 13:29:48 -04:00
Scott Haseley
922370ebd4 Changed forkbomb to only print one success message 2016-03-11 14:56:01 -05:00
Guru Prasad Srinivasa
bfa901ed0b Updated forkbomb so only the parent prints success messages 2016-03-10 19:00:31 -05:00
Guru Prasad Srinivasa
c9c9e50155 Updated forkbomb to better detect success
Previously, we were relying on subpage allocator failing to signal
that forkbomb was succeeding. However, there are cases where the
subpage allocator never fails but the test is still progressing fine.

This commit moves the secure print into forkbomb itself and changes
the test constraints to ensure that forkbomb runs for a certain amount
of time without crashing
2016-03-10 17:28:47 -05:00
Guru Prasad Srinivasa
071595b8fb Fixed badcall execv testing logic 2016-03-09 17:46:49 -05:00
Guru Prasad Srinivasa
44d53d9306 Fixed a bug in bad_waitpid.c
The comments for this particular test suggest that the parent should
attempt waiting on itself. However, the code makes the parent wait
on its child. Fixed.
2016-03-09 12:45:04 -05:00
Guru Prasad Srinivasa
eb7ad5609d Make forktest fail if waitpid() fails
Previously, forktest would only warn if the calls to waitpid()
returned errors. Now, forktest terminates on the first error.
2016-03-08 18:53:33 -05:00
Guru Prasad Srinivasa
2cb47cb4c8 Removed all instances of crash_prog()
crash_prog was introduced to force-crash a userspace program
since _exit may not yet be implemented. However, the new versions
of OS161 already have the exact same logic as crash_prog in stdlib/exit.
2016-03-07 10:55:20 -05:00
Guru Prasad Srinivasa
0cd341c248 Updated badcall tests to just print success 2016-03-01 17:47:52 -05:00
Guru Prasad Srinivasa
a9c196a1cc Fixed initialization error in bad_lseek 2016-03-01 17:24:47 -05:00
Guru Prasad Srinivasa
352e6b5b96 Progress indicators bug-fixes 2016-03-01 15:31:43 -05:00
Guru Prasad Srinivasa
b5858e4360 Added progress indicators for all tests 2016-03-01 15:19:37 -05:00
Guru Prasad Srinivasa
f6c107f839 Removed newline in consoletest secprintf 2016-03-01 14:51:41 -05:00
Guru Prasad Srinivasa
833d2b6ef7 Added progress print for randcall 2016-03-01 14:46:58 -05:00
Guru Prasad Srinivasa
eff0f9152c Updated closetest to open /bin/true instead of sys161.conf 2016-03-01 14:37:01 -05:00
Guru Prasad Srinivasa
b65a333d34 Merge branch 'master' of gitlab.ops-class.org:staff/os161 2016-03-01 02:50:11 -05:00
Guru Prasad Srinivasa
e51ebc0b1a Added function crash_prog() to userland/libc 2016-02-29 20:11:28 -05:00
Guru Prasad Srinivasa
d466eb7102 Added userland/testbin 2016-02-29 20:10:59 -05:00
Scott Haseley
e7ec655415 Removed printsf, an unused secure testing printf variant. This variant does not apply now that each test has its own secret.
Fixed unused variable in libtest161 in kernel compiles.
2016-02-29 16:43:35 -05:00
Scott Haseley
a5963a0e31 Removed secret printing in the shell 2016-02-26 11:46:35 -05:00
Scott Haseley
1b99c0e18f Refactored ksecprintf -> secprintf. Secure code is now all in common libtest161.
This library gets linked in by default in userland, and the common files are
included in the kernel.
2016-02-23 15:31:37 -05:00
Scott Haseley
a97b1c80b2 Added sha256 hash function and hmac functions (with and without salt) to the kernel
and userspace.

In userspace, this is accessed through #include <secure.h>
In the kernel, this is access through #include <kern/secure.h>

There is a unit test for this (hm1) that computes the hmac and compares it to
the known value.  The salted vesion tested offline.

-----

Also, fixed usespace compile issue with not changing KERNEL_SECRET => SECRET.
2016-02-01 01:35:53 -05:00
Scott Haseley
0ab862abfa 1) Moved tprintf and related functions to their own file in common/libc/printf/tprintf.c.
This file is included by both libc and hostcompat.

2) Changed printf -> tprintf in all testbin programs
2016-01-15 13:33:11 -05:00
Geoffrey Challen
98ff530afb Add shll testing tool. 2016-01-12 14:38:22 -05:00
Geoffrey Challen
002459aa19 Adding fileonlytest. 2016-01-11 21:09:40 -05:00
Geoffrey Challen
ac37b61ba1 Adding fileonlytest. 2016-01-11 21:09:22 -05:00
Geoffrey Challen
b66416e24f Automation testing tools. 2016-01-11 16:08:40 -05:00
Geoffrey Challen
5f05f192de Fix sprintf shell prompt. 2016-01-08 15:51:06 -05:00
Geoffrey Challen
036cae3982 Secret printing in libraries and shell and silencing randcall. 2016-01-01 11:47:43 -05:00
Geoffrey Challen
cafa9f5690 Initial Spring 2016 commit. 2015-12-23 00:50:04 +00:00