]> www.infradead.org Git - mtd-utils.git/commitdiff
fs-tests: make integrity test shrink faster
authorAdrian Hunter <ext-adrian.hunter@nokia.com>
Fri, 6 Jun 2008 10:41:51 +0000 (13:41 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Mon, 16 Jun 2008 15:02:31 +0000 (18:02 +0300)
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
tests/fs-tests/integrity/integck.c

index 1919034bdedcbe8f41ec46ce50a691feb2202c38..238a71d528a3ad48717a0aa691007194be686fc9 100644 (file)
@@ -1251,6 +1251,8 @@ static void operate_on_entry(struct dir_entry_info *entry)
        /* If shrinking, 1 time in 10, remove a file */
        if (entry->type == 'f') {
                if (shrink && tests_random_no(10) == 0) {
+                       while (entry->entry.file->fds)
+                               file_close(entry->entry.file->fds);
                        file_delete(entry->entry.file);
                        return;
                }