My initial need was to see if I could in fact reuse the (generic store brand) blank a few hundred times (I quit after 400 and something, figuring I was doing more ware on the drive head than getting more useful info). Also, I found out what proportion of the time failed, to make sure my system’s setting and program parameters were acceptible (e.g. the CD autoplay feature conflicts with the recorder; can I still burn reliably with a load on the server; can I mkisofs over a network).
It ejects and reloads after each phase to make sure the verify doesn't just compare against what the OS thinks it just put on the disc, but actually re-reads the disc.
—John
#!perl -w $|=1; use strict; my $num= 0; my $CDRTools_path= 'D:\Program Files\cdrtools'; my $testdata_path1= 'D:\Program Files\cdrtools\testdata'; my $testdata_path2= 'D:\Program Files\cdrtools\testdata2'; my $drive= 'dev=1,4,0'; sub eject () { system "\"$CDRTools_path\\cdrecord.exe\" $drive -eject"; } sub load () { system "\"$CDRTools_path\\cdrecord.exe\" $drive -load"; } sub erase () { system "\"$CDRTools_path\\cdrecord.exe\" $drive -blank=fast -eject sp +eed=2"; } sub record () { my $testdata_path= ($num%2) ? $testdata_path1 : $testdata_path2; chdir $testdata_path; print "\"$CDRTools_path\\mkisofs.exe\" . | \"$CDRTools_path\\cdrecord +.exe\" $drive -eject -fs8m speed=2" , "\n"; system 'D:\work\dev\experiment\CDRW\helper.bat'; } sub compare () { my $testdata_path= ($num%2) ? $testdata_path1 : $testdata_path2; chdir $testdata_path; system "fc /b \"*\" \"h:\\*\""; } ############ one pass sub trial { print "====== Eject tray ========\n\n"; eject; print "====== Load tray ========\n\n"; load; print "====== Erase Old Contents ========\n\n"; erase; #includes eject print "====== Load Tray ========\n\n"; load; print "====== Record On Disc ========\n\n"; record; #includes eject load; compare; } ############ main program for (;;) { ++$num; print "\n####################\n## Test number $num\n############## +######\n\n"; trial; }
In reply to Stress test CDRW by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |