This PR expands the e2e tests beyond testing just for web servers. The
new e2e code can run an arbitrary program, and the new testing code checks
for the exit status message at the end of the output to determine a test
success or failure. The AsyncCmdStart code has been modified to use a
CommandContext with a custom Cancel function in order to provide a
reliable timeout and process status for the command. An additional
Postrun step is added in order to handle any cleanup required after a
test is run.
The new tests include several versions of large memory allocations with
several different language packages, a test for disk full conditions and
data corruption (thanks to @rinor), and a test of some of the cloud init
functionality.
The memory allocation tests revealed two problems in out-of-memory
handling. One is fixed by touching the sigframe memory to test that
any stack expansion can be allocated, and the other is by adding some
code to test if a user program is hitting frequent repeated out of memory
page faults which will terminate the program instead of letting it spin
forever trying to allocate memory.
This PR expands the e2e tests beyond testing just for web servers. The new e2e code can run an arbitrary program, and the new testing code checks for the exit status message at the end of the output to determine a test success or failure. The AsyncCmdStart code has been modified to use a CommandContext with a custom Cancel function in order to provide a reliable timeout and process status for the command. An additional Postrun step is added in order to handle any cleanup required after a test is run.
The new tests include several versions of large memory allocations with several different language packages, a test for disk full conditions and data corruption (thanks to @rinor), and a test of some of the cloud init functionality.
The memory allocation tests revealed two problems in out-of-memory handling. One is fixed by touching the sigframe memory to test that any stack expansion can be allocated, and the other is by adding some code to test if a user program is hitting frequent repeated out of memory page faults which will terminate the program instead of letting it spin forever trying to allocate memory.