diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2012-08-07 12:52:29 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-08-07 12:52:29 +0300 |
commit | 4e221afaa20015de97c7ebb44769772502eb9999 (patch) | |
tree | 3cb100e32e06fd97937e2cde92e0248a30139560 /tests | |
parent | 227654f30c099bfb1e631fd200f10576b3f58def (diff) | |
download | rpm-4e221afaa20015de97c7ebb44769772502eb9999.tar.gz rpm-4e221afaa20015de97c7ebb44769772502eb9999.tar.bz2 rpm-4e221afaa20015de97c7ebb44769772502eb9999.zip |
Add test for file verification from originating package
Diffstat (limited to 'tests')
-rw-r--r-- | tests/rpmverify.at | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/tests/rpmverify.at b/tests/rpmverify.at index 77d6bfe00..f86312175 100644 --- a/tests/rpmverify.at +++ b/tests/rpmverify.at @@ -64,7 +64,7 @@ runroot rpm -Vva --nodeps --nouser --nogroup AT_CLEANUP # Test file verify after mutilating the files a bit. -AT_SETUP([verify files with problems present]) +AT_SETUP([verify from db, with problems present]) AT_KEYWORDS([verify]) AT_CHECK([ RPMDB_CLEAR @@ -85,6 +85,28 @@ missing d /usr/share/doc/hello-1.0/FAQ []) AT_CLEANUP +# Test file verify from original package after mutilating the files a bit. +AT_SETUP([verify from package, with problems present]) +AT_KEYWORDS([verify]) +AT_CHECK([ +RPMDB_CLEAR +RPMDB_INIT + +runroot rpm -U --nodeps --noscripts --ignorearch --ignoreos \ + /data/RPMS/hello-1.0-1.i386.rpm +rm -f "${RPMTEST}"/usr/share/doc/hello-1.0/FAQ +chmod u-x "${RPMTEST}"/usr/local/bin/hello +dd if=/dev/zero of="${RPMTEST}"/usr/local/bin/hello \ + conv=notrunc bs=1 seek=5 count=6 2> /dev/null +runroot rpm -Vp --nodeps --nouser --nogroup /data/RPMS/hello-1.0-1.i386.rpm +], +[1], +[.M5....T. /usr/local/bin/hello +missing d /usr/share/doc/hello-1.0/FAQ +], +[]) +AT_CLEANUP + # Test verify script success & failure behavior # Ignoring stderr spew for now AT_SETUP([verifyscript failure]) |