+ok($d = PublicInbox::Msgmap->new_file($f, 1), 'idempotent DB creation');
+my ($min, $max) = $d->minmax;
+ok($min > 0, "article min OK");
+ok($max > 0 && $max < 10, "article max OK");
+ok($min < $max, "article counts OK");
+
+my $orig = $d->mid_insert('spam@1');
+$d->mid_delete('spam@1');
+is($d->mid_insert('spam@2'), 1 + $orig, "last number not recycled");
+
+my $tmp = $d->tmp_clone($tmpdir);
+is_deeply([$d->minmax], [$tmp->minmax], 'Cloned temporary DB matches');
+ok($tmp->mid_delete('spam@2'), 'temporary DB is writable');
+
+is(eval {
+ $tmp->atfork_prepare;
+ $tmp->atfork_parent;
+ 'ok'
+}, 'ok', 'atfork_* work on tmp_clone');