According to fcntl(2), Linux will round up pipe sizes lower than a
page to a whole page. Additionally, the kernel may use a larger size
in general, "if that is convenient for the implementation". The
actual size of the pipe is returned from fcntl, so the test should use
that return value, rather than assuming the size requested was
accepted exactly. This fixes the test on my system with 16K pages.
my $imported;
for my $out ([], [qw(-f mboxcl2)], [qw(-f text)]) {
pipe(my $r, my $w);
- my $size = $F_SETPIPE_SZ && fcntl($w, $F_SETPIPE_SZ, 4096) ?
- 4096 : 65536;
+ my $size = ($F_SETPIPE_SZ && fcntl($w, $F_SETPIPE_SZ, 4096)) ||
+ 65536;
unless (-f $f) {
my $fh = write_file '>', $f, <<'EOM';
From: big@example.com