ref: 1105a2798417c31322a705ed9d2e8d3f956a4c0b
parent: d135e1151bd61112b106f5eb3e12058f1aa85a00
author: gkostka <kostka.grzegorz@gmail.com>
date: Thu Dec 31 07:01:32 EST 2015
test_lwext4: add error printf when file/dir remove fails
--- a/fs_test/common/test_lwext4.c
+++ b/fs_test/common/test_lwext4.c
@@ -289,17 +289,27 @@
long int start;
long int stop;
long int diff;
+ int r;
printf("\ncleanup:\n");
- ext4_fremove("/mp/hello.txt");
+ r = ext4_fremove("/mp/hello.txt");
+ if (r != EOK && r != ENOENT) {
+ printf("ext4_fremove error: rc = %d\n", r);
+ }
printf("remove /mp/test1\n");
- ext4_fremove("/mp/test1");
+ r = ext4_fremove("/mp/test1");
+ if (r != EOK && r != ENOENT) {
+ printf("ext4_fremove error: rc = %d\n", r);
+ }
printf("remove /mp/dir1\n");
io_timings_clear();
start = get_ms();
- ext4_dir_rm("/mp/dir1");
+ r = ext4_dir_rm("/mp/dir1");
+ if (r != EOK && r != ENOENT) {
+ printf("ext4_fremove ext4_dir_rm: rc = %d\n", r);
+ }
stop = get_ms();
diff = stop - start;
printf("cleanup: time: %d ms\n", (int)diff);