diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2017-06-30 12:35:03 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2017-06-30 12:43:00 +0300 |
commit | b9428a1d0e0b5f0bf8f00e24e469980ab2561298 (patch) | |
tree | 40713913aea7cdfe2ef76c4110e4fd869a1f4810 /tests/rpmi.at | |
parent | cad03891be181fc9dd7fc7f56c44b3b29a786760 (diff) | |
download | rpm-b9428a1d0e0b5f0bf8f00e24e469980ab2561298.tar.gz |
Report cpio magic/header read failures as bad magic/header
Fread() returning short might be due to many reasons: actually short
file, physical IO failure or payload decompress failure at least.
We don't really know which one it is in rpmcpioHeaderRead(),
but the end result is that the magic/header will be bad, so report
that instead of the more generic read failure, whose error messages
include errno, which often is not set for these failures, generating
bogus messages.
Makes test #85 behave consistently, update the expected message.
Diffstat (limited to 'tests/rpmi.at')
-rw-r--r-- | tests/rpmi.at | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/rpmi.at b/tests/rpmi.at index 8e5038219..1d2bea164 100644 --- a/tests/rpmi.at +++ b/tests/rpmi.at @@ -168,7 +168,8 @@ error: /tmp/hello-2.0-1.x86_64-signed.rpm cannot be installed ]) AT_CLEANUP -# XXX FIXME: "File exists" error message is bogus for this failure +# This is more about documenting current behavior than what it *should* do +# when encountering corrupted payload. AT_SETUP([rpm -U <corrupted signed 3>]) AT_KEYWORDS([install]) AT_CHECK([ @@ -186,7 +187,7 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \ [1], [], [warning: /tmp/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 Signature, key ID 1964c5fc: NOKEY -error: unpacking of archive failed: cpio: read failed - File exists +error: unpacking of archive failed: cpio: Bad magic error: hello-2.0-1.x86_64: install failed ]) AT_CLEANUP |