tune better for the raspi cpu
[AROS.git] / test / clib / lseek.c
blobbac7bbcdb43c8c8287f6d4da76de070d69e3dbc0
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <unistd.h>
7 #include <sys/stat.h>
8 #include <stdlib.h>
9 #include <stdio.h>
10 #include "test.h"
12 int fd;
14 int main()
16 struct stat buf;
17 int size = 12345;
18 fd = mkstemp("T:lseekXXXXXX");
20 TEST((lseek(fd, size, SEEK_SET) == size));
21 TEST((fstat(fd, &buf) != -1));
22 TEST((buf.st_size == size));
24 TEST((lseek(fd, 0, SEEK_SET) == 0));
25 TEST((lseek(fd, 100, SEEK_CUR) == 100));
26 TEST((lseek(fd, -100, SEEK_CUR) == 0));
28 TEST((lseek(fd, 0, SEEK_END) == size));
29 TEST((lseek(fd, -size, SEEK_END) == 0));
31 close(fd);
32 return OK;
35 void cleanup()
37 close(fd);