diff options
| author | manuel <manuel@mausz.at> | 2012-03-27 11:51:08 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2012-03-27 11:51:08 +0200 |
| commit | 4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b (patch) | |
| tree | 868c52e06f207b5ec8a3cc141f4b8b2bdfcc165c /pintos-progos/tests/filesys/extended/grow-tell.c | |
| parent | eae0bd57f0a26314a94785061888d193d186944a (diff) | |
| download | progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.tar.gz progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.tar.bz2 progos-4f670845ff9ab6c48bcb5f7bf4d4ef6dc3c3064b.zip | |
reorganize file structure to match the upstream requirements
Diffstat (limited to 'pintos-progos/tests/filesys/extended/grow-tell.c')
| -rw-r--r-- | pintos-progos/tests/filesys/extended/grow-tell.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/pintos-progos/tests/filesys/extended/grow-tell.c b/pintos-progos/tests/filesys/extended/grow-tell.c deleted file mode 100644 index 5f5da5b..0000000 --- a/pintos-progos/tests/filesys/extended/grow-tell.c +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | /* Checks that growing a file updates the file position | ||
| 2 | correctly. */ | ||
| 3 | |||
| 4 | #include <syscall.h> | ||
| 5 | #include "tests/filesys/seq-test.h" | ||
| 6 | #include "tests/lib.h" | ||
| 7 | #include "tests/main.h" | ||
| 8 | |||
| 9 | static char buf[2134]; | ||
| 10 | |||
| 11 | static size_t | ||
| 12 | return_block_size (void) | ||
| 13 | { | ||
| 14 | return 37; | ||
| 15 | } | ||
| 16 | |||
| 17 | static void | ||
| 18 | check_tell (int fd, long ofs) | ||
| 19 | { | ||
| 20 | long pos = tell (fd); | ||
| 21 | if (pos != ofs) | ||
| 22 | fail ("file position not updated properly: should be %ld, actually %ld", | ||
| 23 | ofs, pos); | ||
| 24 | } | ||
| 25 | |||
| 26 | void | ||
| 27 | test_main (void) | ||
| 28 | { | ||
| 29 | seq_test ("foobar", | ||
| 30 | buf, sizeof buf, 0, | ||
| 31 | return_block_size, check_tell); | ||
| 32 | } | ||
