summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-02-17 10:05:05 -0700
committerJens Axboe <axboe@kernel.dk>2021-02-17 10:05:05 -0700
commitcb2e92ca9e165c8c26b3cc5a94e8f9c53efeeeb4 (patch)
tree7ec67700ba3f58a20dbc95c05a3503c998081bf7
parentde21cb6912f52a18a2cef92aaa01ef53f81ddd25 (diff)
downloadliburing-cb2e92ca9e165c8c26b3cc5a94e8f9c53efeeeb4.tar.gz
liburing-cb2e92ca9e165c8c26b3cc5a94e8f9c53efeeeb4.tar.bz2
test/read-write: skip too-big test on non-root
We can't reset the limits back afterwards without failing, so just skip this test for a regular user. Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--test/read-write.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/read-write.c b/test/read-write.c
index 7f33ad4..409827a 100644
--- a/test/read-write.c
+++ b/test/read-write.c
@@ -692,6 +692,11 @@ static int test_write_efbig(void)
int i, fd, ret;
loff_t off;
+ if (geteuid()) {
+ fprintf(stdout, "Not root, skipping %s\n", __FUNCTION__);
+ return 0;
+ }
+
if (getrlimit(RLIMIT_FSIZE, &old_rlim) < 0) {
perror("getrlimit");
return 1;