+sub test_file {
+ my $f = $File::Find::name;
+
+ ok($f, "file $f");
+
+ return unless (-f $f);
+
+ ok(open(F, $f), "open");
+ my $tmp = '';
+ while(<F>) {
+ $tmp .= $_;
+ }
+ ok(close(F), "close");
+
+ # strip mountpoint
+ $f =~ s#^\Q$mount\E/##;
+
+ ok($file_data{$f}, "$f exists");
+
+ cmp_ok(length($file_data{$f}), '==', length($tmp), "size");
+ cmp_ok($file_data{$f}, 'eq', $tmp, "content");
+}
+
+# small delay so that filesystem could mount
+sleep(1);
+
+find({ wanted => \&test_file, no_chdir => 1 }, $mount);