Bug 48739 - large.bin and buffer.bin laying around after test on win32 and ??
Summary: large.bin and buffer.bin laying around after test on win32 and ??
Status: NEW
Alias: None
Product: APR
Classification: Unclassified
Component: APR test (show other bugs)
Version: HEAD
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-14 04:21 UTC by Gregg L. Smith
Modified: 2010-02-14 04:23 UTC (History)
0 users



Attachments
Patch to add removing of the large files after use (778 bytes, patch)
2010-02-14 04:23 UTC, Gregg L. Smith
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gregg L. Smith 2010-02-14 04:21:09 UTC
Problem: 

My build folder is over 100 gig (didn't know why), during a backup I happened to
notice a file taking forever to copy named large.bin in the folder
apr-1.4.2/test/lfstests. I stopped the backup and investigated and found 4 such
files in the test/lfstests of APRs 1.3.11, 1.3.12 & 1.4.1 as well as 4
buffer.bin files in same said test/lfstests all totaling 64 gigs. This could eaily eat up my 200G backup drive since I am half way there now.

The files show up as 8GB on the hard drive

 Directory of E:\build\apr-1.3.12\test\lfstests

02/13/2010  02:40 AM    <DIR>          .
02/13/2010  02:40 AM    <DIR>          ..
02/13/2010  02:40 AM     8,589,934,592 buffer.bin
02/13/2010  02:40 AM     8,589,934,605 large.bin
               2 File(s) 17,179,869,197 bytes

Windows XP SP 2 & 3 
VC 6 2003R2 SDK
VC 9 Express SDK

This seems to be a problem in the Windows build system for 
testall/testdll/testlib. 

As far as I can tell a nmake clean would remove at least the lfstests\large.bin
file if done from the command line cause I see the file listed in $(CLEAN_DATA)
in makefile.win, this still seems to leave buffer.bin behind. makefile.in has 
$(CLEAN_TARGETS) targeting both, lfstests/*.bin. I however am a lazy win32
builder and use the ide which is where the problem seems to lie, the projects
seem to not clean either of these files when clean is run at the ide. In fact, nothing seems to clean out of LibR, Release and lfstests in my VC6.

Regardless of clean (at least make clean) in the build system, if 2 files 
are being generated the os thinks are 8 gig monsters each, wouldn't it be 
better being dealt with as soon as the files are done being used which is after
test_buffered on line 366 of test/testlfs.c and not be left behind to rely on
n/make clean et al to hopefully remove these files on any platform? The files 
can just be created and removed again if need be so I am proposing doing just 
that.

see attached patch, it works on Win32 in APR 1.3.12 with no warnings or
failure. Propose committing to trunk and backporting to 1.3, 1.4 & 1.5 provided
approval.

If all else fails, fix the win32 build system and I'll just have to remember 
to clean. I cannot however think of any reason to keep them around unless there
is a problem at which point comment out these two calls to apr_file_remove to
leave the files for post build inspection.


Regards,
Gregg
Comment 1 Gregg L. Smith 2010-02-14 04:23:16 UTC
Created attachment 24980 [details]
Patch to add removing of the large files after use