Skip to contentSkip to conversation

xfstests: test pipe resizing

PATCH In review Eric Sandeen 2 participants 2 messages Apr 24, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: test pipe resizing

Add a simple test to exercise the pipe resize fcntls, F_SETPIPE_SZ and F_GETPIPE_SZ.

This doesn't do a whole lot, but does some pipe reading and writing, some pipe resizing and checking, validates that we get EBUSY if we try to resize below the current size of buffers in the pipe, that the minimum is limited to PAGE_SIZE, etc.

The piperesize.c is based on an old test written by Miklos which used to be at

http://www.kernel.org/pub/linux/kernel/people/mszeredi/piperesize/piperesize.c

Cc Miklos Szeredi <[email protected]>

---

src/Makefile +1 -1
index d754048..7f403d8 100644
@@ -19,7 +19,7 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize preallo_rw_pattern_reader \
 	bulkstat_unlink_test_modified t_dir_offset t_futimens t_immutable \
 	stale_handle pwrite_mmap_blocked t_dir_offset2 seek_sanity_test \
 	seek_copy_test t_readdir_1 t_readdir_2 fsync-tester nsexec cloner \
-	renameat2
+	renameat2 piperesize
 
 SUBDIRS =
 
src/piperesize.c new file +133 -0

133 lines not on this page · raw message

tests/generic/026 new file +55 -0

55 lines not on this page · raw message

tests/generic/026.out new file +122 -0

122 lines not on this page · raw message

tests/generic/group +1 -0
index 60d6066..a6eabbf 100644
@@ -28,6 +28,7 @@
 023 auto quick
 024 auto quick
 025 auto quick
+026 auto quick
 053 acl repair auto quick
 062 attr udf auto quick
 068 other auto freeze dangerous stress

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

#1 lore raw
Quoted 8 lines · Eric Sandeen

Add a simple test to exercise the pipe resize fcntls, F_SETPIPE_SZ and F_GETPIPE_SZ.

This doesn't do a whole lot, but does some pipe reading and writing, some pipe resizing and checking, validates that we get EBUSY if we try to resize below the current size of buffers in the pipe, that the minimum is limited to PAGE_SIZE, etc.

How is this a filesystem issue? I think this belongs into ltp.

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