Changeset 152
- Timestamp:
- 05/23/07 18:34:29 (3 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 modified
-
Changes (modified) (1 diff)
-
TODO (modified) (1 diff)
-
lib/Brackup/Test.pm (modified) (5 diffs)
-
lib/Brackup/Util.pm (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Changes
r150 r152 3 3 chunks (once a command exists to delete a brackup file from a target) 4 4 5 - stop leaking some temp files during restores5 - stop leaking temp files 6 6 7 7 - doc fixes/additions -
trunk/TODO
r151 r152 36 36 -- ionice stuff. network nice stuff. 37 37 38 -- leaking 3 /tmp files after each run?39 40 38 -- make tests pass without 'noatime' mount option 41 39 -
trunk/lib/Brackup/Test.pm
r151 r152 23 23 if ($$ == $par_pid) { 24 24 my $rv = unlink @to_unlink; 25 temp_audit();26 25 } 27 }28 29 my $start_temps;30 sub num_temps {31 opendir(my $dh, "/tmp") or return 0;32 my @items = readdir($dh);33 return scalar @items;34 }35 sub temp_audit {36 my $now = num_temps();37 $start_temps ||= $now;38 unless ($now == $start_temps) {39 print "# temp files changed: $start_temps -> $now\n";40 }41 }42 43 BEGIN {44 temp_audit();45 26 } 46 27 … … 51 32 die if %opts; 52 33 53 temp_audit();54 34 my $initer = shift; 55 35 … … 96 76 ok(-s $meta_filename, "backup file has size"); 97 77 98 temp_audit();99 78 return wantarray ? ($meta_filename, $backup) : $meta_filename; 100 79 } … … 103 82 my $backup_file = shift; 104 83 my $restore_dir = tempdir( CLEANUP => 1 ); 105 temp_audit();106 84 ok_dir_empty($restore_dir); 107 85 … … 114 92 ok(eval { $restore->restore; }, "did the restore") 115 93 or die "restore failed: $@"; 116 temp_audit();117 94 return $restore_dir; 118 95 }
