xfstests: check for valid input to _scratch_mkfs_sized
PATCH 1/1 xfstests: check for valid input to _scratch_mkfs_sized
_scratch_mkfs_sized requires an integer number of bytes as input; if it's given something else, catch it and _notrun.
---
common/rc +9 -0
@@ -569,6 +569,15 @@ _scratch_mkfs_sized() fssize=$1 blocksize=$2 [ -z "$blocksize" ] && blocksize=4096 + + re='^[0-9]+$' + if ! [[ $fssize =~ $re ]] ; then + _notrun "error: _scratch_mkfs_sized: fs size \"$fssize\" not an integer." + fi + if ! [[ $blocksize =~ $re ]] ; then + _notrun "error: _scratch_mkfs_sized: block size \"$blocksize\" not an integer." + fi + blocks=`expr $fssize / $blocksize` if [ "$HOSTOS" == "Linux" ]; then
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 5 lines · Eric Sandeen
_scratch_mkfs_sizedrequires an integer number of bytes as input; if it's given something else, catch it and_notrun.Signed-off-by Eric Sandeen<[email protected]>---
Ah, the "don't do what Mark did" patch.
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 8 lines · Mark Tinguely
Quoted 5 lines · Eric Sandeen
_scratch_mkfs_sizedrequires an integer number of bytes as input; if it's given something else, catch it and_notrun.Signed-off-by Eric Sandeen<[email protected]>---
Ah, the "don't do what Mark did" patch.
the "make life easier for future Marks" patch. ;)
Quoted 1 line
Reviewed-by Mark Tinguely <[email protected]>
Thanks!
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
This has been committed.
Thanks
--Rich
commit 969ed71b7073975ce4113e0f75d42e67c88cfcf9
Author: Eric Sandeen <[email protected]> Date: Tue Sep 17 19:30:41 2013 +0000
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs