diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-05-20 20:40:01 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2008-05-20 20:40:01 +0000 |
commit | 15ae0bae2914ab1e43f08e888bdcf187c66a6b2d (patch) | |
tree | 7fb229ad3c494fc2f3e8fd26cbc161c667176d89 /tests | |
parent | 7a223d97ef540684abd8bf1b6a818397dad15b2f (diff) | |
download | paxutils-15ae0bae2914ab1e43f08e888bdcf187c66a6b2d.tar.gz |
(verify_file): Improve error diagnostics.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/genfile.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/genfile.c b/tests/genfile.c index 91cf5b4..1b338bc 100644 --- a/tests/genfile.c +++ b/tests/genfile.c @@ -261,13 +261,11 @@ verify_file (char *file_name) error (0, errno, _("stat(%s) failed"), file_name); if (st.st_size != file_length + seek_offset) - { - printf ("%lu %lu\n", (unsigned long)st.st_size , (unsigned long)file_length); - exit (1); - } + error (1, 0, _("requested file length %lu, actual %lu"), + (unsigned long)st.st_size, (unsigned long)file_length); if (mode == mode_sparse && !ST_IS_SPARSE (st)) - exit (1); + error (1, 0, _("created file is not sparse")); } } |