PKUOS - Pintos
Pintos source browser for PKU Operating System course
|
#include <stdbool.h>
#include "tests/arc4.h"
#include "tests/cksum.h"
#include "tests/lib.h"
#include "tests/main.h"
Go to the source code of this file.
Macros | |
#define | SIZE (128 * 1024) |
Shuffles a 128 kB data buffer 10 times, printing the checksum after each time. More... | |
Functions | |
void | test_main (void) |
tests/main.h More... | |
Variables | |
static char | buf [SIZE] |
#define SIZE (128 * 1024) |
Shuffles a 128 kB data buffer 10 times, printing the checksum after each time.
Definition at line 10 of file page-shuffle.c.
void test_main | ( | void | ) |
This must fail, because that directory is non-empty.
This must fail.
Then delete most of them, for two reasons. First, "tar" limits file names to 100 characters (which could be extended to 256 without much trouble). Second, a full disk has no room for the tar archive.
This should terminate the process with a -1 exit code.
Sets the stack pointer (esp) to an invalid value and invokes a system call, which should then terminate the process with a -1 exit code.
The second close must either fail silently or terminate with exit code -1.
This is valid, so it must succeed.
The process must be terminated with exit code -1.
The process must be terminated with -1 exit code.
Must kill process.
The exec system call must return -1.
(Pintos does not have inheritance of file handles, so this must fail.) The parent process then attempts to use the file handle, which must succeed.
The process must be terminated with -1 exit code because the argument to the system call would be above the top of the user address space.
The process must be terminated with -1 exit code.
For Project 3: The bad address lies approximately 64MB below the code segment, so there is no ambiguity that this attempt must be rejected even after stack growth is implemented. Moreover, a good stack growth heuristics should probably not grow the stack for the purpose of reading the system call number and arguments.
This must work.
This may fail or terminate the process with -1 exit code.
The first call must wait in the usual way and return the exit code. The second wait call must return -1 immediately.
Tries to write to a mapping present in the parent. The process must be terminated with -1 exit code.
Then dereferences the address that we tried to map, and the process must be terminated with -1 exit code.
Definition at line 15 of file page-shuffle.c.
References buf, cksum(), msg(), and shuffle().
|
static |
Definition at line 12 of file page-shuffle.c.
Referenced by test_main().