dir: dtest should flush on error when creating directories 96/13796/6
authorMark Vitale <mvitale@sinenomine.net>
Wed, 6 Mar 2019 16:27:58 +0000 (11:27 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 8 Oct 2020 04:15:27 +0000 (00:15 -0400)
commitc5a9d4447d69d72de3304781194fa392a7c6e1d8
tree92e8c714eb15fddb0a6628ebbac174e2127e85db
parent2a1a65faab0a13083a749a63dcf3ee0879823188
dir: dtest should flush on error when creating directories

The dtest -f subcommand (CRTest()) exits immediately if there is an
error while adding files.  This may create an empty, incomplete, or
corrupt directory object on disk because we neglected to call DFlush
before exiting.

Always call DFlush from CRTest() whether it fails or succeeds.

Change-Id: Ia7b4ad00ea6f4f9f788cd75ae726bdadb60ee9c3
Reviewed-on: https://gerrit.openafs.org/13796
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/dir/test/dtest.c