source: trunk/packages/xen-3.1/xen-3.1/tools/libaio/harness/cases/7.t @ 34

Last change on this file since 34 was 34, checked in by hartmans, 18 years ago

Add xen and xen-common

File size: 735 bytes
Line 
1/* 7.t
2- Write overlapping the file size rlimit boundary: should be a short
3  write. (7.t)
4- Write at the file size rlimit boundary: should give EFBIG.  (I think
5  the spec requires that you do NOT deliver SIGXFSZ in this case, where
6  you would do so for sync IO.) (7.t)
7- Special case: a write of zero bytes at or beyond the file size rlimit
8  boundary must return success. (7.t)
9*/
10
11#include <sys/resource.h>
12
13void SET_RLIMIT(long long limit)
14{
15        struct rlimit rlim;
16        int res;
17
18        rlim.rlim_cur = limit;                  assert(rlim.rlim_cur == limit);
19        rlim.rlim_max = limit;                  assert(rlim.rlim_max == limit);
20
21        res = setrlimit(RLIMIT_FSIZE, &rlim);   assert(res == 0);
22}
23
24#define LIMIT   8192
25#define FILENAME        "testdir/rwfile"
26
27#include "common-7-8.h"
Note: See TracBrowser for help on using the repository browser.