test-all: test test32 test-mem
test-zstd: zstd datagen
+ @echo "*** zstd cli write error test ***"
+ echo foo | ./zstd > /dev/full; if [ $$? -eq 0 ] ; then echo "write error not detected!"; false; fi
+ @echo "*** zstd round-trip tests *** "
./datagen | ./zstd -v | ./zstd -d > $(VOID)
./datagen -g256MB | ./zstd -v | ./zstd -d > $(VOID)
./datagen -g6GB -P99 | ./zstd -vq | ./zstd -d > $(VOID)
#include <stdlib.h> /* malloc, free */
#include <string.h> /* strcmp, strlen */
#include <time.h> /* clock */
+#include <errno.h> /* errno */
#include "fileio.h"
#include "zstd_static.h"
/* clean */
free(inBuff);
free(outBuff);
- fclose(finput);
- fclose(foutput);
ZSTD_freeCCtx(ctx);
+ fclose(finput);
+ if (fclose(foutput)) EXM_THROW(28, "Write error : cannot properly close output");
return compressedfilesize;
}