Skip to contentSkip to conversation

xfsqa: reduce error output on 229

PATCH In review Dave Chinner 2 participants 2 messages Apr 15, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfsqa: reduce error output on 229

From: Dave Chinner <[email protected]>

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.

---
 src/t_holes.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
src/t_holes.c +3 -1
index eba310a..b111baf 100644
@@ -29,8 +29,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);
Signature · 6 lines
1.7.2.3

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Dave Chinner

From: Dave Chinner <[email protected]>

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.

Quoted 10 lines
---
 src/t_holes.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
src/t_holes.c +0 -0
index eba310a..b111baf 100644
@@ -29,8 +29,10 @@ int main(int argc, char **argv)
 		for (j = 0; j < 1024; j++)

src/t_holes.c int main(int argc, char **argv) · line 38

Quoted 10 lines
src/t_holes.c +3 -1
 			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);

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