xfs/133,4: make sure xfs_db sets negative i_size
authorXiao Yang <yangx.jy@cn.fujitsu.com>
Thu, 23 Feb 2017 03:35:30 +0000 (11:35 +0800)
committerEryu Guan <eguan@redhat.com>
Thu, 23 Feb 2017 03:42:10 +0000 (11:42 +0800)
commitcf895a2a0590ec6102d372cfa8850320d94ca6d5
tree91448144881b40fec7f0330d1a05e55cc56841ab
parent6e56c6b59aa7ba0c0622af4f5bf0d685ef6c523d
xfs/133,4: make sure xfs_db sets negative i_size

1) xfs/133 and xfs/134 work abnornamlly on RHEL6.8GA and RHEL6.9Beta
   because xfs_db fails to set negative i_size and reports "usage:
   write fieldname value".  The special argument "--" is only used to
   end option-scanning in getopt().  So we can run two xfs_db commands
   to set negative i_size regardless of the special argument "--" is
   needed or not.  getopt() has been produced by 'commit c9f5e3db22098
   ("xfs_db: Allow writes of corrupted data")'.

2) xfs/134 passes unexpectedly on RHEL6.8GA due to EINVAL, so we use
   touch command to create 512-aligned test file.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
tests/xfs/133
tests/xfs/134