1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-06-01 07:16:33 +02:00

* tests/rm/fail-eperm: Report failure also if rm is terminated by

a signal.
This commit is contained in:
Jim Meyering
2006-10-03 13:57:26 +00:00
parent 41011fa81d
commit 184dcf2caf
2 changed files with 17 additions and 4 deletions
+3
View File
@@ -1,5 +1,8 @@
2006-10-03 Jim Meyering <jim@meyering.net>
* tests/rm/fail-eperm: Report failure also if rm is terminated by
a signal.
* src/c99-to-c89.diff: Convert two c99'isms -- one in remove.c
and one in shred.c -- that were added before coreutils-6.3.
Reported by Michael Deutschmann.
+14 -4
View File
@@ -103,10 +103,20 @@ foreach my $dir (@dir_list)
my $line = <RM>;
close RM;
my $status = $? >> 8;
$status == 1
or die "$ME: unexpected exit status from `$cmd';\n"
. " got $status, expected 1\n";
my $rc = $?;
if (0x80 < $rc)
{
my $status = $rc >> 8;
$status == 1
or die "$ME: unexpected exit status from `$cmd';\n"
. " got $status, expected 1\n";
}
else
{
# Terminated by a signal.
my $sig_num = $rc & 0x7F;
die "$ME: command `$cmd' died with signal $sig_num\n";
}
my $exp = "$rm: cannot remove `$target_file':";
$line