From: Dave Chinner Date: Fri, 15 Apr 2011 06:48:32 +0000 (+1000) Subject: xfsqa: reduce error output on 229 X-Git-Tag: v1.1.0~72 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=3a4b6e0192805845b88adb63d25b0899fa0e2ad6;p=users%2Fhch%2Fxfstests-dev.git xfsqa: reduce error output on 229 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 Reviewed-by: Eric Sandeen --- diff --git a/src/t_holes.c b/src/t_holes.c index eba310a23..4424335a9 100644 --- a/src/t_holes.c +++ b/src/t_holes.c @@ -14,10 +14,11 @@ * along with this program; if not, write the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#include +#include #include #include #include -#include 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);