diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-11-24 13:33:41 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-11-24 13:33:41 +0200 |
commit | 4662e50781d6cef4761bd34bbee7312b3012dd10 (patch) | |
tree | 14264f3b53659629512e1ddb39fe056f7bbf1384 /tests/rpmconflict.at | |
parent | f0d61e42cf69164dca0d20e48caf1643616db2f2 (diff) | |
download | rpm-4662e50781d6cef4761bd34bbee7312b3012dd10.tar.gz |
Add couple of tests for symlink <-> directory behavior
Diffstat (limited to 'tests/rpmconflict.at')
-rw-r--r-- | tests/rpmconflict.at | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/rpmconflict.at b/tests/rpmconflict.at index 9e021a262..aa30eab5c 100644 --- a/tests/rpmconflict.at +++ b/tests/rpmconflict.at @@ -80,3 +80,50 @@ runroot rpm -U \ [ignore]) AT_CLEANUP + +# ------------------------------ +# Replace directory with symlink, this is expected to fail +AT_SETUP([rpm -U replacing directory with symlink]) +AT_KEYWORDS([install]) +AT_CHECK([ +RPMDB_CLEAR +rm -rf "${TOPDIR}" +rm -rf "${RPMTEST}"/usr/{share,lib}/symlinktest* + +run rpmbuild --quiet -bb \ + --define "rel 1" --without symlink ${RPMDATA}/SPECS/symlinktest.spec +run rpmbuild --quiet -bb \ + --define "rel 2" --with symlink ${RPMDATA}/SPECS/symlinktest.spec + +runroot rpm -U "${TOPDIR}"/RPMS/noarch/symlinktest-1.0-1.noarch.rpm +runroot rpm -U "${TOPDIR}"/RPMS/noarch/symlinktest-1.0-2.noarch.rpm +], +[1], +[], +[error: unpacking of archive failed on file /usr/share/symlinktest: cpio: rename failed - Is a directory +]) +AT_CLEANUP + +# ------------------------------ +# Replace symlink with a directory - the upgrade succeeds but leaves an +# orphan directory that the symlink now points to. Should verify the +# result more carefully... +AT_SETUP([rpm -U replacing symlink with directory]) +AT_KEYWORDS([install]) +AT_CHECK([ +RPMDB_CLEAR +rm -rf "${TOPDIR}" +rm -rf "${RPMTEST}"/usr/{share,lib}/symlinktest* + +run rpmbuild --quiet -bb \ + --define "rel 1" --with symlink ${RPMDATA}/SPECS/symlinktest.spec +run rpmbuild --quiet -bb \ + --define "rel 2" --without symlink ${RPMDATA}/SPECS/symlinktest.spec + +runroot rpm -U "${TOPDIR}"/RPMS/noarch/symlinktest-1.0-1.noarch.rpm +runroot rpm -U "${TOPDIR}"/RPMS/noarch/symlinktest-1.0-2.noarch.rpm +], +[0], +[], +[]) +AT_CLEANUP |