Sender: rich AT phekda DOT freeserve DOT co DOT uk Message-ID: <3D05CF74.1D9EA9D6@phekda.freeserve.co.uk> Date: Tue, 11 Jun 2002 11:22:44 +0100 From: Richard Dawe X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586) X-Accept-Language: de,fr MIME-Version: 1.0 To: Jim Meyering CC: djgpp-workers AT delorie DOT com, Eli Zaretskii Subject: Re: Fileutils 4.1 alpha 1 uploaded References: <87k7r7hnlj DOT fsf AT pixie DOT eng DOT ascend DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Hello. Jim Meyering wrote: > > Eli Zaretskii wrote: [snip] > > That rings a bell: DOS and some versions of Windows won't let you delete > > the directory that's the current directory on some drive, even if you do > > that from another drive. The trick to overcome that is to chdir to the > > root directory on that drive before removing the temporary directory. [snip] > That's why newer tests should all have code like this: > > pwd=`pwd` > tmp=FIXME.$$ > trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 > trap '(exit $?); exit' 1 2 13 15 > > framework_failure=0 > mkdir $tmp || framework_failure=1 > cd $tmp || framework_failure=1 > > ... > > (exit $fail); exit > > I'm sure some of the older test scripts don't do it right. > If you find some, please let me know. Here's a list of tests that don't have this trap magic in fileutils-4.1.8: cp/backup-1 cp/backup-is-src cp/no-deref-link1 cp/no-deref-link2 cp/no-deref-link3 cp/symlink-slash dd/misc ln/sf-1 ls/symlink-slash ls/time-1 mkdir/p-1 mkdir/p-2 mv/hard-link-1 mv/into-self mv/into-self-3 rm/deep-1 rm/f-1 rm/i-1 rm/ir-1 rm/r-3 rm/sunos-1 touch/fifo Bye, Rich =] -- Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]