X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ffailtest%2Ftest%2Frun-write.c;h=6a712fec53a631ca64f34a96504751ba0af133f8;hp=9f1f1d7fc8005fdda59cbe46684157329f2469be;hb=56023cca5f66a40646a1e807c3d10af6e5913623;hpb=460f62ce63a6ef4aaa0f8840474c039f7e73399f diff --git a/ccan/failtest/test/run-write.c b/ccan/failtest/test/run-write.c index 9f1f1d7f..6a712fec 100644 --- a/ccan/failtest/test/run-write.c +++ b/ccan/failtest/test/run-write.c @@ -1,11 +1,11 @@ +/* Include the C files directly. */ +#include #include #include #include #include #include #include -/* Include the C files directly. */ -#include int main(int argc, char *argv[]) { @@ -21,7 +21,8 @@ int main(int argc, char *argv[]) /* Child will fail, ignore. */ if (fd < 0) failtest_exit(0); - write(fd, buf, strlen(buf)); + if (write(fd, buf, strlen(buf)) != strlen(buf)) + abort(); ok1(lseek(fd, 0, SEEK_CUR) == strlen(buf)); p = failtest_malloc(100, __FILE__, __LINE__);