Skip to contentSkip to conversation

xfstests: introduce 279 for SEEK_DATA/SEEK_HOLE sanity test

PATCH In review Jeff Liu 3 participants 4 messages Feb 19, 2012 – May 11, 2012

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

PATCH v3 1/2 xfstests: introduce 279 for SEEK_DATA/SEEK_HOLE sanity test

Introduce 279 for SEEK_DATA/SEEK_HOLE sanity tests.

Changes to v3:
--------------
* Redirect seek sanity test run log to 279.full.

---
 279                    |   58 ++++
 279.full               |  116 ++++++++
 279.out                |    1 +
 group                  |    1 +
 src/Makefile           |    2 +-
 src/seek_sanity_test.c |  683 ++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 860 insertions(+), 1 deletions(-)
 create mode 100755 279
 create mode 100644 279.full
 create mode 100644 279.out
 create mode 100644 src/seek_sanity_test.c
279 new file +58 -0
new file mode 100755
index 0000000..b9e9cc3
@@ -0,0 +1,58 @@
+#! /bin/bash
+# FS QA Test No. 279
+#
+# SEEK_DATA/SEEK_HOLE sanity tests.
+#
+# Improved by [email protected]
+# Creater: [email protected]
+#
+#-----------------------------------------------------------------------
+# Copyright (c) 2011 Oracle Inc.  All Rights Reserved.
+# Copyright (c) 2011 Red Hat.  All Rights Reserved.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it would be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write the Free Software Foundation,
+# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+#-----------------------------------------------------------------------
+#
+# creator
[email protected]
+
+seq=`basename $0`
+echo "QA output created by $seq"
+
+here=`pwd`
+status=1	# failure is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+_supported_fs generic
+_supported_os Linux
+
+BASE_TEST_FILE=$TEST_DIR/seek_sanity_testfile
+
+[ -x $here/src/seek_sanity_test ] || _notrun "seek_sanitfy_tester not built"
+
+_cleanup()
+{
+	eval "rm -f $BASE_TEST_FILE.*"
+}
+
+$here/src/seek_sanity_test $BASE_TEST_FILE > $seq.full 2>&1 ||
+	_fail "seek sanity check failed!"
+
+# success, all done
+status=0
+exit
279.full new file +116 -0

116 lines not on this page · raw message

279.out new file +1 -0
new file mode 100644
index 0000000..4f954fd
@@ -0,0 +1 @@
+QA output created by 279
group +1 -0
index 08d999a..02c6743 100644
@@ -389,3 +389,4 @@ deprecated
 273 auto rw
 274 auto rw
 275 auto rw
+279 auto rw
src/Makefile +1 -1
index 67250ee..1c6e717 100644
@@ -17,7 +17,7 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
 	preallo_rw_pattern_writer ftrunc trunc fs_perms testx looptest \
 	locktest unwritten_mmap bulkstat_unlink_test t_stripealign \
 	bulkstat_unlink_test_modified t_dir_offset t_futimens t_immutable \
-	stale_handle pwrite_mmap_blocked fstrim t_dir_offset2
+	stale_handle pwrite_mmap_blocked fstrim t_dir_offset2 seek_sanity_test
 
 SUBDIRS =
 
src/seek_sanity_test.c new file +683 -0

683 lines not on this page · raw message

Signature · 6 lines
1.7.9

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v3 1/2
#1 lore raw
Quoted 27 lines · Jeff Liu

Introduce 279 for SEEK_DATA/SEEK_HOLE sanity tests.

Changes to v3:
--------------
* Redirect seek sanity test run log to 279.full.

---
  279                    |   58 ++++
  279.full               |  116 ++++++++
  279.out                |    1 +
  group                  |    1 +
  src/Makefile           |    2 +-
  src/seek_sanity_test.c |  683 ++++++++++++++++++++++++++++++++++++++++++++++++
  6 files changed, 860 insertions(+), 1 deletions(-)

create mode 100755 279
create mode 100644 279.full
create mode 100644 279.out
create mode 100644 src/seek_sanity_test.c

279 new file +0 -0
new file mode 100755
index 0000000..b9e9cc3

279 line 8

Quoted 8 lines
279 new file +8 -0
@@ -0,0 +1,58 @@
+#! /bin/bash
+# FS QA Test No. 279
+#
+# SEEK_DATA/SEEK_HOLE sanity tests.
+#
+# Improved by [email protected]
+# Creater: [email protected]
+#

The first open test is 285 now.

It is is a good start of a XFS SEEK_DATA/SEEK_HOLE test.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw
In reply to Jeff Liu
Quoted 7 lines · Jeff Liu

Introduce 279 for SEEK_DATA/SEEK_HOLE sanity tests.

Changes to v3:
--------------
* Redirect seek sanity test run log to 279.full.

...

Quoted 6 lines
src/seek_sanity_test.c new file +0 -0
new file mode 100644
index 0000000..8f36dee
@@ -0,0 +1,683 @@

...

src/seek_sanity_test.c line 46

Quoted 6 lines
src/seek_sanity_test.c new file +6 -0
+static void get_file_system(int fd)
+{
+	struct statfs buf;
+
+	if (!fstatfs(fd, &buf))
+		fprintf(stdout, "File system magic#: 0x%x\n", buf.f_type);

Hrm...

# make
Building include
Building lib
Building ltp
Building src
[DEP]
[CC]    seek_sanity_test
seek_sanity_test.c: In function 'get_file_system':
seek_sanity_test.c:46: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'long int'
Building aio-dio-regress
Building m4

I'll fix that up for you.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

author
#3 lore raw
Quoted 41 lines · Ben Myers
Quoted 7 lines · Jeff Liu

Introduce 279 for SEEK_DATA/SEEK_HOLE sanity tests.

Changes to v3:
--------------
* Redirect seek sanity test run log to 279.full.

...

Quoted 6 lines
src/seek_sanity_test.c new file +0 -0
new file mode 100644
index 0000000..8f36dee
@@ -0,0 +1,683 @@

...

src/seek_sanity_test.c line 46

Quoted 6 lines
src/seek_sanity_test.c new file +6 -0
+static void get_file_system(int fd)
+{
+	struct statfs buf;
+
+	if (!fstatfs(fd, &buf))
+		fprintf(stdout, "File system magic#: 0x%x\n", buf.f_type);

Hrm...

# make
Building include
Building lib
Building ltp
Building src
[DEP]
[CC]    seek_sanity_test
seek_sanity_test.c: In function 'get_file_system':
seek_sanity_test.c:46: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'long int'
Building aio-dio-regress
Building m4
Quoted 1 line

I'll fix that up for you.

Thanks a lot!

-Jeff

Quoted 5 lines

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs