]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfsqa: reduce error output on 229
authorDave Chinner <dchinner@redhat.com>
Fri, 15 Apr 2011 06:48:32 +0000 (16:48 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 15 Apr 2011 06:48:32 +0000 (16:48 +1000)
Once we get one short write, we know the test has failed. We don't
ened to keep writing and getting more short writes and spewing
thousands of errors to the console.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
src/t_holes.c

index eba310a239a82b1f0e24cc2c633765c878a1ec25..4424335a9c7c7e77216f435b91e5ee6abe28b13f 100644 (file)
  * along with this program; if not, write the Free Software Foundation,
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
+#include <stdio.h>
+#include <stdlib.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/types.h>
-#include <stdio.h>
 
 int main(int argc, char **argv)
 {
@@ -29,8 +30,10 @@ int main(int argc, char **argv)
                for (j = 0; j < 1024; j++)
                        buf[j]  = i | i << 5;
 
-               if (write(fd,buf,253*4*sizeof(int))!= 253*4*sizeof(int))
+               if (write(fd,buf,253*4*sizeof(int))!= 253*4*sizeof(int)) {
                        printf("Write did not return correct amount\n");
+                       exit(EXIT_FAILURE);
+               }
 
                if ((i % 9) == 0 && i < 9001)
                        lseek(fd, 4096 * 110,SEEK_CUR);