1 /* This test checks that the stack is properly extended even if
2 the first access to a stack location occurs inside a system
9 #include "tests/vm/sample.inc"
10 #include "tests/lib.h"
11 #include "tests/main.h"
17 int slen = strlen (sample);
20 /* Write file via write(). */
21 CHECK (create ("sample.txt", slen), "create \"sample.txt\"");
22 CHECK ((handle = open ("sample.txt")) > 1, "open \"sample.txt\"");
23 CHECK (write (handle, sample, slen) == slen, "write \"sample.txt\"");
26 /* Read back via read(). */
27 CHECK ((handle = open ("sample.txt")) > 1, "2nd open \"sample.txt\"");
28 CHECK (read (handle, buf2 + 32768, slen) == slen, "read \"sample.txt\"");
30 CHECK (!memcmp (sample, buf2 + 32768, slen), "compare written data against read data");