[PATCH] xfstests/071 FAIL with pwrite64: Invalid argument

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When offset + length is overflow of xfs_io builtin pread and pwrite in linux,
the error message should be "Invalid argument".

Signed-off-by: Peng Haitao <penght@xxxxxxxxxxxxxx>
---
 071           |    3 +
 071.out       |  107 ----------------------------------------------------
 071.out.irix  |  107 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 071.out.linux |  117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 227 insertions(+), 107 deletions(-)
 delete mode 100644 071.out
 create mode 100644 071.out.irix
 create mode 100644 071.out.linux

diff --git a/071 b/071
index be9b11b..0693bd7 100755
--- a/071
+++ b/071
@@ -91,6 +91,9 @@ _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 echo
 _scratch_mount
 
+# link correct .out file
+_link_out_file $seq.out
+
 # Okay... filesize limit depends on blocksize, bits per long and
 # also if large block device patch is enabled (can't dynamically
 # check that, so use env var USE_LBD_PATCH to override default).
diff --git a/071.out b/071.out
deleted file mode 100644
index 2ea0ef0..0000000
--- a/071.out
+++ /dev/null
@@ -1,107 +0,0 @@
-QA output created by 071
-meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
-data     = bsize=XXX blocks=XXX, imaxpct=PCT
-         = sunit=XXX swidth=XXX, unwritten=X
-naming   =VERN bsize=XXX
-log      =LDEV bsize=XXX blocks=XXX
-realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
-
-Writing 512 bytes, offset is +0 (direct=false)
-wrote 512/512 bytes at offset <OFFSET>
-Reading 512 bytes (direct=false)
-read 512/512 bytes at offset <OFFSET>
-
-Writing 512 bytes, offset is minus 1 byte (direct=false)
-wrote 512/512 bytes at offset <OFFSET>
-Reading 512 bytes (direct=false)
-read 512/512 bytes at offset <OFFSET>
-
-Writing 512 bytes, offset is minus 1FSB (direct=false)
-wrote 512/512 bytes at offset <OFFSET>
-Reading 512 bytes (direct=false)
-read 512/512 bytes at offset <OFFSET>
-
-Writing 1 bytes, offset is minus 1FSB (direct=false)
-wrote 512/512 bytes at offset <OFFSET>
-Reading 1 bytes (direct=false)
-read 1/1 bytes at offset <OFFSET>
-
-Writing 1FSB bytes, offset is +0 (direct=true)
-wrote 512/512 bytes at offset <OFFSET>
-Reading 1FSB bytes (direct=true)
-read 512/1FSB bytes at offset <OFFSET>
-
-Writing 1FSB bytes, offset is minus 1FSB (direct=true)
-wrote 512/512 bytes at offset <OFFSET>
-Reading 1FSB bytes (direct=true)
-read 513/1FSB bytes at offset <OFFSET>
-
-=== Iterating, 2 remains
-
-
-Writing 512 bytes, offset is +0 (direct=false)
-pwrite64: File too large
-Reading 512 bytes (direct=false)
-read 0/512 bytes at offset <OFFSET>
-
-Writing 512 bytes, offset is minus 1 byte (direct=false)
-pwrite64: File too large
-Reading 512 bytes (direct=false)
-read 0/512 bytes at offset <OFFSET>
-
-Writing 512 bytes, offset is minus 1FSB (direct=false)
-wrote 512/512 bytes at offset <OFFSET>
-Reading 512 bytes (direct=false)
-read 512/512 bytes at offset <OFFSET>
-
-Writing 1 bytes, offset is minus 1FSB (direct=false)
-wrote 512/512 bytes at offset <OFFSET>
-Reading 1 bytes (direct=false)
-read 1/1 bytes at offset <OFFSET>
-
-Writing 1FSB bytes, offset is +0 (direct=true)
-pwrite64: File too large
-Reading 1FSB bytes (direct=true)
-read 0/1FSB bytes at offset <OFFSET>
-
-Writing 1FSB bytes, offset is minus 1FSB (direct=true)
-pwrite64: File too large
-Reading 1FSB bytes (direct=true)
-read 0/1FSB bytes at offset <OFFSET>
-
-=== Iterating, 1 remains
-
-
-Writing 512 bytes, offset is +0 (direct=false)
-pwrite64: File too large
-Reading 512 bytes (direct=false)
-read 0/512 bytes at offset <OFFSET>
-
-Writing 512 bytes, offset is minus 1 byte (direct=false)
-pwrite64: File too large
-Reading 512 bytes (direct=false)
-read 0/512 bytes at offset <OFFSET>
-
-Writing 512 bytes, offset is minus 1FSB (direct=false)
-pwrite64: File too large
-Reading 512 bytes (direct=false)
-read 0/512 bytes at offset <OFFSET>
-
-Writing 1 bytes, offset is minus 1FSB (direct=false)
-pwrite64: File too large
-Reading 1 bytes (direct=false)
-read 0/1 bytes at offset <OFFSET>
-
-Writing 1FSB bytes, offset is +0 (direct=true)
-pwrite64: File too large
-Reading 1FSB bytes (direct=true)
-read 0/1FSB bytes at offset <OFFSET>
-
-Writing 1FSB bytes, offset is minus 1FSB (direct=true)
-pwrite64: File too large
-Reading 1FSB bytes (direct=true)
-read 0/1FSB bytes at offset <OFFSET>
-
-=== Iterating, 0 remains
-
-
diff --git a/071.out.irix b/071.out.irix
new file mode 100644
index 0000000..2ea0ef0
--- /dev/null
+++ b/071.out.irix
@@ -0,0 +1,107 @@
+QA output created by 071
+meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
+data     = bsize=XXX blocks=XXX, imaxpct=PCT
+         = sunit=XXX swidth=XXX, unwritten=X
+naming   =VERN bsize=XXX
+log      =LDEV bsize=XXX blocks=XXX
+realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
+
+Writing 512 bytes, offset is +0 (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 512 bytes (direct=false)
+read 512/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1 byte (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 512 bytes (direct=false)
+read 512/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1FSB (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 512 bytes (direct=false)
+read 512/512 bytes at offset <OFFSET>
+
+Writing 1 bytes, offset is minus 1FSB (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 1 bytes (direct=false)
+read 1/1 bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is +0 (direct=true)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 1FSB bytes (direct=true)
+read 512/1FSB bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is minus 1FSB (direct=true)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 1FSB bytes (direct=true)
+read 513/1FSB bytes at offset <OFFSET>
+
+=== Iterating, 2 remains
+
+
+Writing 512 bytes, offset is +0 (direct=false)
+pwrite64: File too large
+Reading 512 bytes (direct=false)
+read 0/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1 byte (direct=false)
+pwrite64: File too large
+Reading 512 bytes (direct=false)
+read 0/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1FSB (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 512 bytes (direct=false)
+read 512/512 bytes at offset <OFFSET>
+
+Writing 1 bytes, offset is minus 1FSB (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 1 bytes (direct=false)
+read 1/1 bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is +0 (direct=true)
+pwrite64: File too large
+Reading 1FSB bytes (direct=true)
+read 0/1FSB bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is minus 1FSB (direct=true)
+pwrite64: File too large
+Reading 1FSB bytes (direct=true)
+read 0/1FSB bytes at offset <OFFSET>
+
+=== Iterating, 1 remains
+
+
+Writing 512 bytes, offset is +0 (direct=false)
+pwrite64: File too large
+Reading 512 bytes (direct=false)
+read 0/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1 byte (direct=false)
+pwrite64: File too large
+Reading 512 bytes (direct=false)
+read 0/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1FSB (direct=false)
+pwrite64: File too large
+Reading 512 bytes (direct=false)
+read 0/512 bytes at offset <OFFSET>
+
+Writing 1 bytes, offset is minus 1FSB (direct=false)
+pwrite64: File too large
+Reading 1 bytes (direct=false)
+read 0/1 bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is +0 (direct=true)
+pwrite64: File too large
+Reading 1FSB bytes (direct=true)
+read 0/1FSB bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is minus 1FSB (direct=true)
+pwrite64: File too large
+Reading 1FSB bytes (direct=true)
+read 0/1FSB bytes at offset <OFFSET>
+
+=== Iterating, 0 remains
+
+
diff --git a/071.out.linux b/071.out.linux
new file mode 100644
index 0000000..56a7b47
--- /dev/null
+++ b/071.out.linux
@@ -0,0 +1,117 @@
+QA output created by 071
+meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
+data     = bsize=XXX blocks=XXX, imaxpct=PCT
+         = sunit=XXX swidth=XXX, unwritten=X
+naming   =VERN bsize=XXX
+log      =LDEV bsize=XXX blocks=XXX
+realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
+
+Writing 512 bytes, offset is +0 (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 512 bytes (direct=false)
+read 512/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1 byte (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 512 bytes (direct=false)
+read 512/512 bytes at offset <OFFSET>
+
+Writing 512 bytes, offset is minus 1FSB (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 512 bytes (direct=false)
+read 512/512 bytes at offset <OFFSET>
+
+Writing 1 bytes, offset is minus 1FSB (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 1 bytes (direct=false)
+read 1/1 bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is +0 (direct=true)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 1FSB bytes (direct=true)
+read 512/1FSB bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is minus 1FSB (direct=true)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 1FSB bytes (direct=true)
+read 513/1FSB bytes at offset <OFFSET>
+
+=== Iterating, 2 remains
+
+
+Writing 512 bytes, offset is +0 (direct=false)
+pwrite64: Invalid argument
+Reading 512 bytes (direct=false)
+pread64: Invalid argument
+pread64: Invalid argument
+
+Writing 512 bytes, offset is minus 1 byte (direct=false)
+pwrite64: Invalid argument
+Reading 512 bytes (direct=false)
+pread64: Invalid argument
+pread64: Invalid argument
+
+Writing 512 bytes, offset is minus 1FSB (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 512 bytes (direct=false)
+read 512/512 bytes at offset <OFFSET>
+
+Writing 1 bytes, offset is minus 1FSB (direct=false)
+wrote 512/512 bytes at offset <OFFSET>
+Reading 1 bytes (direct=false)
+read 1/1 bytes at offset <OFFSET>
+
+Writing 1FSB bytes, offset is +0 (direct=true)
+pwrite64: Invalid argument
+Reading 1FSB bytes (direct=true)
+pread64: Invalid argument
+pread64: Invalid argument
+
+Writing 1FSB bytes, offset is minus 1FSB (direct=true)
+pwrite64: Invalid argument
+Reading 1FSB bytes (direct=true)
+pread64: Invalid argument
+pread64: Invalid argument
+
+=== Iterating, 1 remains
+
+
+Writing 512 bytes, offset is +0 (direct=false)
+pwrite64: Invalid argument
+Reading 512 bytes (direct=false)
+pread64: Invalid argument
+pread64: Invalid argument
+
+Writing 512 bytes, offset is minus 1 byte (direct=false)
+pwrite64: Invalid argument
+Reading 512 bytes (direct=false)
+pread64: Invalid argument
+pread64: Invalid argument
+
+Writing 512 bytes, offset is minus 1FSB (direct=false)
+pwrite64: Invalid argument
+Reading 512 bytes (direct=false)
+pread64: Invalid argument
+pread64: Invalid argument
+
+Writing 1 bytes, offset is minus 1FSB (direct=false)
+pwrite64: Invalid argument
+Reading 1 bytes (direct=false)
+pread64: Invalid argument
+pread64: Invalid argument
+
+Writing 1FSB bytes, offset is +0 (direct=true)
+pwrite64: Invalid argument
+Reading 1FSB bytes (direct=true)
+pread64: Invalid argument
+pread64: Invalid argument
+
+Writing 1FSB bytes, offset is minus 1FSB (direct=true)
+pwrite64: Invalid argument
+Reading 1FSB bytes (direct=true)
+pread64: Invalid argument
+pread64: Invalid argument
+
+=== Iterating, 0 remains
+
+
-- 
1.7.1

-- 
Best Regards,
Peng Haitao

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux