Replace AT_CHECK and AT_CLEANUP with RPMTEST_*

We're going to do some stuff before and after these macros in the next
commits/PRs so better do this beforehand.
This commit is contained in:
Michal Domonkos 2023-06-12 16:30:33 +02:00 committed by Panu Matilainen
parent 2d68e5feda
commit adafe8d047
25 changed files with 1048 additions and 1036 deletions

View File

@ -32,9 +32,21 @@ EOF
${PYTHON} test.py
]])
m4_define([RPMTEST_CHECK],[
AT_CHECK($@)
])
m4_define([RPMTEST_CHECK_UNQUOTED],[
AT_CHECK_UNQUOTED($@)
])
m4_define([RPMTEST_CLEANUP],[
AT_CLEANUP
])
m4_define([RPMPY_CHECK],[
AT_SKIP_IF([$PYTHON_DISABLED])
AT_CHECK([RPMPY_RUN([$1])], [], [$2], [$3])
RPMTEST_CHECK([RPMPY_RUN([$1])], [], [$2], [$3])
])
m4_define([RPMPY_TEST],[
@ -42,7 +54,7 @@ AT_SETUP([$1])
AT_KEYWORDS([python])
RPMDB_INIT
RPMPY_CHECK([$2], [$3], [$4])
AT_CLEANUP
RPMTEST_CLEANUP
])
# Enable colored test output if available

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@ AT_BANNER([RPM buildid tests])
AT_SETUP([rpmbuild buildid none])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Build, contains one ELF which should have a buildid.
@ -46,7 +46,7 @@ runroot rpm -ql -p /build/RPMS/*/hello-debuginfo-1.0-1.*.rpm \
hello debuginfo build-id files: 0
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check if rpmbuild "alldebug" generates debuginfo buildid symlinks.
@ -54,7 +54,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid alldebug])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Build, contains one ELF which should have a buildid.
@ -135,7 +135,7 @@ test "$canon_debug_file" = "$canon_debug_id_file" \
hello debuginfo build-id files: 3
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check if rpmbuild "alldebug" generates debuginfo buildid symlinks.
@ -143,7 +143,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid alldebug unique debug names])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Build, contains one ELF which should have a buildid.
@ -223,7 +223,7 @@ test "$canon_debug_file" = "$canon_debug_id_file" \
hello debuginfo build-id files: 3
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check if rpmbuild "separate" generates main and debuginfo buildid symlinks
@ -231,7 +231,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid separate])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Build, contains one ELF which should have a buildid.
@ -311,7 +311,7 @@ test "$canon_debug_file" = "$canon_debug_id_file" \
hello debuginfo build-id files: 2
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check if rpmbuild "separate" generates main and debuginfo buildid symlinks
@ -319,7 +319,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid separate unique debug names])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Build, contains one ELF which should have a buildid.
@ -398,7 +398,7 @@ test "$canon_debug_file" = "$canon_debug_id_file" \
hello debuginfo build-id files: 2
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check if rpmbuild "compat" generates main and debuginfo buildid symlinks
@ -406,7 +406,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid compat])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Build, contains one ELF which should have a buildid.
@ -499,7 +499,7 @@ test "$canon_compat_file" = "$canon_main_file" \
hello debuginfo build-id files: 3
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check if rpmbuild "compat" generates main and debuginfo buildid symlinks
@ -507,7 +507,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid compat unique debug names])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Build, contains one ELF which should have a buildid.
@ -599,7 +599,7 @@ test "$canon_compat_file" = "$canon_main_file" \
hello debuginfo build-id files: 3
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check that (copied) files with duplicate build-ids are handled correctly.
@ -608,7 +608,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid duplicate alldebug])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Should create two warnings
rundebug rpmbuild --quiet \
@ -663,7 +663,7 @@ debug id in debug package
debug dup id in debug package
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check that hard linked files are handled correctly.
@ -673,7 +673,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid hardlink alldebug])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# No warnings for hard links
rundebug rpmbuild --quiet \
@ -726,7 +726,7 @@ debug id in debug package
debug dup id in debug package
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check that (copied) files with duplicate build-ids are handled correctly.
@ -735,7 +735,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid duplicate separate])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Should create two warnings
rundebug rpmbuild --quiet \
@ -787,7 +787,7 @@ debug id in debug package
debug dup id in debug package
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check that hard linked files are handled correctly.
@ -797,7 +797,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid hardlink separate])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# No warnings for hard links
rundebug rpmbuild --quiet \
@ -847,7 +847,7 @@ debug id in debug package
debug dup id in debug package
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check that (copied) files with duplicate build-ids are handled correctly.
@ -856,7 +856,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid duplicate compat])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Should create two warnings
rundebug rpmbuild --quiet \
@ -920,7 +920,7 @@ debug id in debug package
debug dup id in debug package
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check that hard linked files are handled correctly.
@ -930,7 +930,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid hardlink compat])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# No warnings for hard links
rundebug rpmbuild --quiet \
@ -992,7 +992,7 @@ debug id in debug package
debug dup id in debug package
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check build-ids are recomputed with unique_build_ids,
@ -1000,7 +1000,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid recompute])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Make sure we get debuginfo
export CFLAGS="-g"
@ -1103,7 +1103,7 @@ no-recompute unique unequal
no-recomputes equal
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check build-ids are unique between versions/releases
@ -1111,7 +1111,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid unique r1 r2])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# No warnings for hard links
rundebug rpmbuild --quiet \
@ -1148,7 +1148,7 @@ if test "$id1" == "$id2"; then echo "equal $id1"; else echo "unequal"; fi
[unequal
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check build-ids are non-unique between versions/releases
@ -1156,7 +1156,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid non-unique r1 r2])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# No warnings for hard links
rundebug rpmbuild --quiet \
@ -1197,7 +1197,7 @@ if test "$id1" == "$id2"; then echo "equal"; else echo "unequal $id1 $id2"; fi
[equal
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check that build-id directories are created with the right permissions
@ -1205,7 +1205,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid attrs])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Build, contains one ELF which should have a buildid.
@ -1228,7 +1228,7 @@ runroot rpm -qp --qf "[[%{filenames} %{filemodes:perms}\n]]" \
/usr/lib/debug/.build-id drwxr-xr-x
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check that build-id directories are created with the right attributes
@ -1236,7 +1236,7 @@ AT_CLEANUP
AT_SETUP([rpmbuild buildid config attrs])
AT_KEYWORDS([build] [debuginfo] [buildid])
AT_SKIP_IF([$DEBUGINFO_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# Build, contains one ELF which should have a buildid.
@ -1255,4 +1255,4 @@ runroot rpm -c -qp /build/RPMS/*/test-debuginfo-1.0-1*rpm
[/etc/config.file
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -13,7 +13,7 @@ for v in "1.0" "2.0"; do
done
# Install over existing config file
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -32,7 +32,7 @@ otherstuff
)
# Install over existing identical config file, no backup needed
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -49,7 +49,7 @@ test ! -f "${cf}"
[])
# Erase unmodified config file, no backup here
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -65,7 +65,7 @@ test ! -f "${cf}"
[])
# Erase modified config file
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -85,7 +85,7 @@ otherstuff
)
# Upgrade package with config file, no backup here
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -102,7 +102,7 @@ foo
[])
# Upgrade package with config file, no backup here
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -117,7 +117,7 @@ grep -c "touch" output.txt
[])
# Upgrade package with locally modified config file, unchanged in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -135,7 +135,7 @@ otherstuff
otherstuff
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([config(noreplace) file install/upgrade/erase])
@ -149,7 +149,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/configtest.spec
# Install over existing config file
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -172,7 +172,7 @@ warning: /etc/my.conf saved as /etc/my.conf.rpmsave]
)
# Erase modified config(noreplace) file
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -190,7 +190,7 @@ otherstuff
],
[warning: /etc/my.conf saved as /etc/my.conf.rpmsave]
)
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([upgrade changing config])
@ -205,7 +205,7 @@ for v in "1.0" "2.0"; do
done
# Upgrade package with unmodified config file, changed in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -224,7 +224,7 @@ foo-2.0
# ------------------------------
# Upgrade package with locally modified config file, changed in pkg
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -248,7 +248,7 @@ otherstuff
# ------------------------------
# Modified config file matches the content from new package.
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -266,7 +266,7 @@ foo-2.0
foo-2.0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# config(noreplace) variants of the same cases.
# ------------------------------
@ -283,7 +283,7 @@ for v in "1.0" "2.0"; do
done
#
# Upgrade package with config file, no backup here
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -300,7 +300,7 @@ foo
[])
# Upgrade package with locally modified config file, unchanged in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -318,7 +318,7 @@ otherstuff
otherstuff
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# noreplace variants of the same
@ -334,7 +334,7 @@ for v in "1.0" "2.0"; do
done
# Upgrade package with unmodified config file, changed in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -351,7 +351,7 @@ foo-2.0
[])
# Upgrade package with locally modified config file, changed in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -374,7 +374,7 @@ foo-2.0
)
# Modified config file matches the content from new package.
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -392,7 +392,7 @@ foo-2.0
foo-2.0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Shared config file variants of the same cases
# ------------------------------
@ -410,7 +410,7 @@ for s in "A" "B"; do
done
# Upgrade package with config file, no backup here
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -431,7 +431,7 @@ foo
[])
# Upgrade package with locally modified config file, unchanged in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -453,7 +453,7 @@ otherstuff
otherstuff
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([upgrade changing shared config])
@ -470,7 +470,7 @@ for s in "A" "B"; do
done
# Upgrade package with unmodified config file, changed in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -491,7 +491,7 @@ foo-2.0
[])
# Upgrade package with locally modified config file, changed in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -518,7 +518,7 @@ otherstuff
)
# Modified config file matches the content from new package.
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -540,7 +540,7 @@ foo-2.0
foo-2.0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Shared config(noreplace) variants of the more interesting cases
# ------------------------------
@ -560,7 +560,7 @@ for s in "A" "B"; do
done
done
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -588,7 +588,7 @@ foo-2.0
# ------------------------------
# Modified config file matches the content from new package.
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -610,13 +610,13 @@ foo-2.0
foo-2.0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
---------
# Test pre-existing and post-install config ghost survival and erasure
AT_SETUP([ghost config])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -661,4 +661,4 @@ buster
buster
],
[])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -15,7 +15,7 @@ for v in "1.0" "2.0"; do
done
# Install over existing config file
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -34,7 +34,7 @@ otherstuff
)
# Install over existing identical config link, no backup needed
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -53,7 +53,7 @@ foo
[])
# Erase unmodified config link, no backup here
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -69,7 +69,7 @@ test ! -L "${cf}"
[])
# Erase modified config link
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -88,7 +88,7 @@ otherstuff
)
# Upgrade package with config link, no backup here
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -106,7 +106,7 @@ foo
#
# Upgrade package with config link, no backup here
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -121,7 +121,7 @@ grep -c "touch" output.txt
[])
# Upgrade package with modified config link, unchanged in pkg. No backup.
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -139,7 +139,7 @@ otherstuff
otherstuff
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([changing config symlinks])
@ -154,7 +154,7 @@ for v in "1.0" "2.0"; do
done
# Upgrade package with unmodified config link, changed in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -171,7 +171,7 @@ foo-2.0
[])
# Upgrade package with locally modified config link, changed in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -194,7 +194,7 @@ otherstuff
)
# Modified config link matches the content from new package.
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -212,7 +212,7 @@ foo-2.0
foo-2.0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# config(noreplace) variants of the same cases.
#
@ -230,7 +230,7 @@ for v in "1.0" "2.0"; do
done
# Upgrade package with config file, no backup here
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -247,7 +247,7 @@ foo
[])
# Upgrade package with locally modified config file, unchanged in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -265,7 +265,7 @@ otherstuff
otherstuff
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([upgrade changing config(noreplace) links])
@ -281,7 +281,7 @@ for v in "1.0" "2.0"; do
/data/SPECS/configtest.spec
done
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -299,7 +299,7 @@ foo-2.0
[])
# Upgrade package with locally modified config file, changed in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -322,7 +322,7 @@ foo-2.0
)
# Modified config link matches the content from new package.
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -341,7 +341,7 @@ foo-2.0
foo-2.0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Shared config link variants of the same cases
# ------------------------------
@ -361,7 +361,7 @@ for s in "A" "B"; do
done
# Upgrade package with config file, no backup here
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -382,7 +382,7 @@ foo
[])
# Upgrade package with locally modified config file, unchanged in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -404,7 +404,7 @@ otherstuff
otherstuff
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([upgrade changing shared config links])
@ -423,7 +423,7 @@ for s in "A" "B"; do
done
# Upgrade package with unmodified config file, changed in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -444,7 +444,7 @@ foo-2.0
[])
# Upgrade package with locally modified config file, changed in pkg
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -471,7 +471,7 @@ otherstuff
)
# Modified config link matches the content from new package.
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -493,7 +493,7 @@ foo-2.0
foo-2.0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Shared config(noreplace) variants of the more interesting cases
# ------------------------------
@ -514,7 +514,7 @@ for s in "A" "B"; do
done
# Upgrade package with locally modified config file, changed in pkg.
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -541,7 +541,7 @@ foo-2.0
)
# Modified config link matches the content from new package.
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -564,4 +564,4 @@ foo-2.0
foo-2.0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -20,7 +20,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/configtest.spec
# non-modified config changes to non-config and back, no backups
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}" "${cf}".rpm*
@ -40,7 +40,7 @@ foo
[])
# modified config changes to non-config and back, back up on first upgrade
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -66,7 +66,7 @@ foo
)
# modified config changes to identical non-config and back, no backups
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -87,7 +87,7 @@ bar
foo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade config to/from config link])
AT_KEYWORDS([install])
@ -106,7 +106,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/configtest.spec
# non-modified config file changes to config symlink and back, no backups
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}" "${cf}".rpm*
@ -126,7 +126,7 @@ foo
[])
# Modified config changes to config symlink
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}" "${cf}".rpm*
@ -147,12 +147,12 @@ otherstuff
],
[warning: /etc/my.conf saved as /etc/my.conf.rpmsave]
)
AT_CLEANUP
RPMTEST_CLEANUP
# Modified config link changes to config file
AT_SETUP([upgrade modified config link to config])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}" "${cf}".rpm*
@ -185,7 +185,7 @@ otherstuff
],
[warning: /etc/my.conf saved as /etc/my.conf.rpmsave]
)
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade config to directory])
AT_KEYWORDS([install])
@ -203,7 +203,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/configtest.spec
# Non-modified config file changes to directory.
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -219,7 +219,7 @@ test -d "${cf}"
[])
# Modified config changes to directory
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cf="${RPMTEST}"/etc/my.conf
rm -rf "${cf}"*
@ -239,4 +239,4 @@ otherstuff
],
[warning: /etc/my.conf saved as /etc/my.conf.rpmsave]
)
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -14,7 +14,7 @@ for p in "one" "two"; do
/data/SPECS/conflicttest.spec
done
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# (Build and) install conflicting package (should fail)
runroot rpm -U /build/RPMS/noarch/conflictone-1.0-1.noarch.rpm
@ -25,7 +25,7 @@ runroot rpm -U /build/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
[ignore])
# Install conflicting packages in same transaction (should fail)
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U \
@ -35,7 +35,7 @@ runroot rpm -U \
[2],
[ignore],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([shareable files])
@ -50,7 +50,7 @@ for p in "one" "two"; do
done
# (Build and) install package with shareable file
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/conflictone-1.0-1.noarch.rpm
runroot rpm -U /build/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
@ -60,7 +60,7 @@ runroot rpm -U /build/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
[ignore])
# Install packages with shareable file in same transaction
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U \
@ -70,13 +70,13 @@ runroot rpm -U \
[0],
[ignore],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# (Build and) install package with identical basename in different directories
AT_SETUP([non-conflicting identical basenames])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/selfconflict.spec
@ -86,13 +86,13 @@ runroot rpm -U /build/RPMS/noarch/selfconflict-1.0-1.noarch.rpm
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# (Build and) install package with a self-conflict due to directory symlinks
AT_SETUP([conflicting identical basenames])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/selfconflict.spec
@ -105,12 +105,12 @@ runroot rpm -U /build/RPMS/noarch/selfconflict-1.0-1.noarch.rpm
[],
[ file /opt/mydir/two/somefile conflicts between attempted installs of selfconflict-1.0-1.noarch and selfconflict-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# File conflict between colored files, prefer 64bit
AT_SETUP([multilib elf conflict, prefer 64bit 1])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignoreos --ignorearch --nodeps \
@ -125,13 +125,13 @@ runroot rpm -q --qf "[[%{filestates:fstate},]]\n" hello.i686 hello.x86_64
normal,normal,normal,normal,normal,
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# File conflict between colored files, prefer 64bit
AT_SETUP([multilib elf conflict, prefer 64bit 2])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignoreos --ignorearch --nodeps \
@ -151,13 +151,13 @@ wrong color,normal,normal,normal,normal,
normal,normal,normal,normal,normal,
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# File conflict between colored files, prefer 64bit
AT_SETUP([multilib elf conflict, prefer 64bit 3])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignoreos --ignorearch --nodeps \
@ -177,13 +177,13 @@ wrong color,normal,normal,normal,normal,
normal,normal,normal,normal,normal,
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# File conflict between colored files, prefer 32bit
AT_SETUP([multilib elf conflict, prefer 32bit 1])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignoreos --ignorearch --nodeps \
@ -198,13 +198,13 @@ runroot rpm -q --qf "[[%{filestates:fstate},]]\n" hello.i686 hello.x86_64
wrong color,normal,normal,normal,normal,
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# File conflict between colored files, prefer 32bit
AT_SETUP([multilib elf conflict, prefer 32bit 2])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignoreos --ignorearch --nodeps \
@ -224,13 +224,13 @@ normal,normal,normal,normal,normal,
wrong color,normal,normal,normal,normal,
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# File conflict between colored files, prefer 32bit
AT_SETUP([multilib elf conflict, prefer 32bit 3])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignoreos --ignorearch --nodeps \
@ -250,13 +250,13 @@ normal,normal,normal,normal,normal,
wrong color,normal,normal,normal,normal,
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# File conflict between colored and non-colored file 1
AT_SETUP([multilib elf vs non-elf file conflict 1])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec
@ -271,12 +271,12 @@ runroot rpm -U --ignoreos --ignorearch --nodeps \
[],
[ file /usr/bin/hello conflicts between attempted installs of hello-2.0-1.x86_64 and hello-script-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
# File conflict between colored and non-colored file 2
AT_SETUP([multilib elf vs non-elf file conflict 2])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec
@ -295,12 +295,12 @@ runroot rpm -U --ignoreos --ignorearch --nodeps \
[],
[ file /usr/bin/hello from install of hello-script-1.0-1.noarch conflicts with file from package hello-2.0-1.x86_64
])
AT_CLEANUP
RPMTEST_CLEANUP
# File conflict between colored and non-colored file 3
AT_SETUP([multilib elf vs non-elf file conflict 3])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec
@ -319,13 +319,13 @@ runroot rpm -U --ignoreos --ignorearch --nodeps \
[],
[ file /usr/bin/hello from install of hello-2.0-1.x86_64 conflicts with file from package hello-script-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Removal conflict on directory -> symlink change
AT_SETUP([replacing directory with symlink])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
rm -rf "${RPMTEST}"/usr/{share,lib}/symlinktest*
@ -341,13 +341,13 @@ runroot rpm -U /build/RPMS/noarch/symlinktest-1.0-2.noarch.rpm
[],
[ file /usr/share/symlinktest from install of symlinktest-1.0-2.noarch conflicts with file from package symlinktest-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Replace symlink with a directory
AT_SETUP([replacing symlink with directory])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
rm -rf "${RPMTEST}"/usr/{share,lib}/symlinktest*
@ -363,14 +363,14 @@ runroot rpm -U /build/RPMS/noarch/symlinktest-1.0-2.noarch.rpm
[],
[ file /usr/share/symlinktest from install of symlinktest-1.0-2.noarch conflicts with file from package symlinktest-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Regular file shared with a ghost, does not conflict
# Regular file should be created and not removed when the ghost is removed
AT_SETUP([real file with shared ghost])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
fn="${RPMTEST}"/usr/share/my.version
@ -398,5 +398,5 @@ one
OK
],
[])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -22,30 +22,30 @@ AT_BANNER([RPM database access])
# Attempt to initialize a rpmdb
AT_SETUP([rpm --initdb])
AT_KEYWORDS([rpmdb])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
],
[0],
[ignore],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Run rpm -qa on an empty rpmdb
AT_SETUP([rpm -qa 1])
AT_KEYWORDS([rpmdb query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
-qa
],
[0])
AT_CLEANUP
RPMTEST_CLEANUP
# Run rpm -qa on a non-existent rpmdb
AT_SETUP([rpm -qa 2])
AT_KEYWORDS([rpmdb query])
AT_CHECK([
RPMTEST_CHECK([
RPMTEST_SETUP
runroot rpm \
-qa
@ -53,13 +53,13 @@ runroot rpm \
[0],
[],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -qa 3])
AT_KEYWORDS([rpmdb query])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U --nodeps --ignorearch --ignoreos --nosignature \
/data/RPMS/foo-1.0-1.noarch.rpm \
/data/RPMS/hello-2.0-1.x86_64-signed.rpm
@ -71,7 +71,7 @@ hello-2.0-1.x86_64
],
[])
AT_CHECK([
RPMTEST_CHECK([
runroot rpmkeys --import /data/keys/rpm.org-rsa-2048-test.pub
runroot rpm -qa | sort
],
@ -81,13 +81,13 @@ gpg-pubkey-1964c5fc-58e63918
hello-2.0-1.x86_64
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Run rpm -q <package> where <package> exists in the db.
AT_SETUP([rpm -q foo])
AT_KEYWORDS([rpmdb query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i \
@ -100,13 +100,13 @@ runroot rpm -q foo
[foo-1.0-1.noarch
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Run rpm -q <package>- where <package> exists in the db.
AT_SETUP([rpm -q foo-])
AT_KEYWORDS([rpmdb query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i \
@ -119,11 +119,11 @@ runroot rpm -q foo-
[package foo- is not installed
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmdb header numbering])
AT_KEYWORDS([rpmdb])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
for i in 1 2 3; do
@ -139,11 +139,11 @@ done
3 foo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -q --querybynumber])
AT_KEYWORDS([rpmdb query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i \
@ -154,7 +154,7 @@ runroot rpm -i \
[],
[])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -q --querybynumber 1
],
[0],
@ -162,14 +162,14 @@ runroot rpm -q --querybynumber 1
],
[])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -q --querybynumber 999
],
[1],
[],
[error: record 999 could not be read
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# install a noarch package into a local rpmdb without --relocate and --nodeps
@ -177,7 +177,7 @@ AT_CLEANUP
AT_SETUP([rpm -i *.noarch.rpm])
AT_KEYWORDS([rpmdb install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i \
@ -185,14 +185,14 @@ runroot rpm -i \
],
[0])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# reinstall a noarch package (with no files)
AT_SETUP([rpm -U --replacepkgs 1])
AT_KEYWORDS([rpmdb install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tpkg="/data/RPMS/foo-1.0-1.noarch.rpm"
@ -206,14 +206,14 @@ runroot rpm -i "${tpkg}" &&
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# reinstall a package with different file policies
AT_SETUP([rpm -U --replacepkgs 2])
AT_KEYWORDS([rpmdb install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tpkg="/data/RPMS/hello-2.0-1.i686.rpm"
@ -226,14 +226,14 @@ test -d "${RPMTEST}"/usr/share/doc/hello-2.0
[1],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# reinstall a package with different file policies
AT_SETUP([rpm --reinstall 1])
AT_KEYWORDS([rpmdb install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tpkg="/data/RPMS/hello-2.0-1.i686.rpm"
@ -246,7 +246,7 @@ test -d "${RPMTEST}"/usr/share/doc/hello-2.0
[1],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# install a package into a local rpmdb
@ -254,7 +254,7 @@ AT_CLEANUP
# * Use --ignorearch because we don't know the arch
AT_SETUP([rpm -i --relocate=.. *.i386.rpm])
AT_KEYWORDS([rpmdb install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i \
@ -263,7 +263,7 @@ runroot rpm -i \
],
[0])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
@ -272,7 +272,7 @@ AT_CLEANUP
# * Use --ignorearch because we don't know the arch
AT_SETUP([rpm -i --relocate=.. *.ppc64.rpm])
AT_KEYWORDS([rpmdb install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i \
@ -283,11 +283,11 @@ runroot rpm -i \
[ignore],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmdb --rebuilddb])
AT_KEYWORDS([rpmdb])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --noscripts --nodeps --ignorearch \
@ -305,13 +305,13 @@ hello-2.0-1.i686 2
hello-2.0-1.i686 1
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Attempt to initialize, rebuild and verify a db
AT_SETUP([rpmdb --rebuilddb and verify empty database])
AT_KEYWORDS([rpmdb])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmdb --rebuilddb
runroot rpmdb --verifydb
@ -319,13 +319,13 @@ runroot rpmdb --verifydb
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Install and verify status
AT_SETUP([rpm -U and verify status])
AT_KEYWORDS([install rpmdb query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -340,13 +340,13 @@ runroot rpm -qls conflictstatus
[normal /usr/share/my.version
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Install and verify status
AT_SETUP([rpm -U with _install_lang and verify status])
AT_KEYWORDS([install rpmdb query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -364,7 +364,7 @@ normal /usr/share/flangtest/none.txt
not installed /usr/share/flangtest/pl.txt
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([rpmdb query special chars])
@ -376,7 +376,7 @@ for v in "1.0+2" "1.0^2" "1.0~2"; do
/data/SPECS/versiontest.spec
done
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U '/build/RPMS/noarch/versiontest-1.0+2-1.noarch.rpm'
runroot rpm -q 'versiontest-1.0+2-1'
@ -386,7 +386,7 @@ runroot rpm -q 'versiontest-1.0+2-1'
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U '/build/RPMS/noarch/versiontest-1.0^2-1.noarch.rpm'
runroot rpm -q 'versiontest-1.0^2-1'
@ -396,7 +396,7 @@ runroot rpm -q 'versiontest-1.0^2-1'
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U '/build/RPMS/noarch/versiontest-1.0~2-1.noarch.rpm'
runroot rpm -q 'versiontest-1.0~2-1'
@ -406,4 +406,4 @@ runroot rpm -q 'versiontest-1.0~2-1'
],
[])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -18,7 +18,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/deptest.spec
# missing dependency
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
@ -30,7 +30,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
])
# cross-depending packages
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -38,13 +38,13 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
AT_SETUP([unsatisfied versioned require])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -72,13 +72,13 @@ echo $?
[error: Failed dependencies:
deptest-two >= 2.0 is needed by deptest-one-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
AT_SETUP([satisfied versioned require])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -96,7 +96,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
@ -114,7 +114,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/deptest.spec
# versioned conflict in transaction
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -126,7 +126,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
])
# versioned conflict in database
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
@ -137,11 +137,11 @@ runroot rpm -U /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
[error: Failed dependencies:
deptest-two < 2.0 conflicts with (installed) deptest-one-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([install and verify self-conflicting package])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -156,12 +156,12 @@ runroot rpm -V --nofiles deptest-one
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# explicit file conflicts
AT_SETUP([explicit file conflicts])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -193,12 +193,12 @@ error: Failed dependencies:
error: Failed dependencies:
/opt/bar conflicts with deptest-one-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
AT_SETUP([erase to break dependencies])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -219,12 +219,12 @@ runroot rpm -e deptest-two
[error: Failed dependencies:
deptest-foo >= 2.0 is needed by (installed) deptest-one-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([erase to break colored file dependency])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -246,12 +246,12 @@ runroot rpm -e hello.x86_64
[error: Failed dependencies:
/usr/bin/hello is needed by (installed) deptest-hello-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([erase on wrong-colored file dependency])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -271,7 +271,7 @@ runroot rpm -e hello.i686
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
@ -295,7 +295,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/deptest.spec
# unsatisfied WITH require in transaction
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm
@ -307,7 +307,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
])
# unsatisfied WITH require in rpmdb
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm
@ -319,7 +319,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
[error: Failed dependencies:
(deptest-two with flavor = dekstop) is needed by deptest-one-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([satisfied WITH requires])
AT_KEYWORDS([install, boolean])
@ -336,7 +336,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/deptest.spec
# satisfied WITH require in transaction
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
],
@ -345,7 +345,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[])
# satisfied WITH require in rpmdb
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -365,7 +365,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
@ -384,7 +384,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/deptest.spec
# unsatisfied WITHOUT require in transaction
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -396,7 +396,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
])
# unsatisfied WITHOUT require in rpmdb
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -408,7 +408,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
[error: Failed dependencies:
(deptest-two without flavor) is needed by deptest-one-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([satisfied WITHOUT requires])
AT_KEYWORDS([install, boolean])
@ -424,7 +424,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/deptest.spec
# satisfied WITHOUT require in transaction
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -434,7 +434,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[])
# satisfied WITHOUT require in rpmdb
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -444,7 +444,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
@ -463,7 +463,7 @@ for pkg in two three; do
/data/SPECS/deptest.spec
done
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# unsatisfied AND require - all missing
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
@ -475,7 +475,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
])
# unsatisfied AND require - first is missing
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm
@ -487,7 +487,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
])
# unsatisfied AND require - second is missing
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -499,7 +499,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
])
# satisfied AND require
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm
@ -507,7 +507,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
@ -527,7 +527,7 @@ for pkg in two three; do
done
# unsatisfied OR require - all missing
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
],
@ -538,7 +538,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
])
# satisfied OR require - first is missing
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm
@ -548,7 +548,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[])
# satisfied OR require - second is missing
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -558,7 +558,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[])
# satisfied OR require - both present
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm
@ -566,7 +566,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
@ -586,7 +586,7 @@ for pkg in two three; do
done
# unsatisfied IF require
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm
@ -598,7 +598,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
])
# satisfied IF require
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -606,7 +606,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([IF-ELSE requires])
AT_KEYWORDS([install, boolean])
@ -624,7 +624,7 @@ for pkg in two three four; do
done
# unsatisfied IF-ELSE require
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
@ -636,7 +636,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
])
# satisfied IF-ELSE require - right clause
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-four-1.0-1.noarch.rpm
@ -646,7 +646,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[])
# satisfied IF-ELSE require - left clause
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -654,7 +654,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
@ -673,7 +673,7 @@ for pkg in two three; do
/data/SPECS/deptest.spec
done
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# unsatisfied nested AND-OR require
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -685,7 +685,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
])
# satisfied nested AND-OR require
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm
@ -693,7 +693,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
@ -713,7 +713,7 @@ for pkg in two three four; do
done
# satisfied nested AND-IF require - without right clause
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -723,7 +723,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[])
# satisfied nested AND-IF require - with right clause
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-four-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm
@ -731,7 +731,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarc
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
@ -755,7 +755,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/deptest.spec
# installed conflict with "or" clause
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm
@ -768,7 +768,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm
])
# installed requires with "if" clause
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
@ -779,7 +779,7 @@ runroot rpm -U /build/RPMS/noarch/deptest-four-1.0-1.noarch.rpm
[error: Failed dependencies:
(deptest-five if deptest-four) is needed by (installed) deptest-two-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
@ -806,7 +806,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/deptest.spec
# installed requires with "or" clause
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-one-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-three-1.0-1.noarch.rpm
@ -819,7 +819,7 @@ runroot rpm -e deptest-three
])
# installed conflicts with "unless" clause
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-four-1.0-1.noarch.rpm /build/RPMS/noarch/deptest-five-1.0-1.noarch.rpm
@ -830,4 +830,4 @@ runroot rpm -e deptest-four
[error: Failed dependencies:
(deptest-five unless deptest-four) conflicts with (installed) deptest-two-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -3,7 +3,7 @@ AT_SETUP([rpm -e and verify files removed])
AT_KEYWORDS([install erase rpmdb])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U --ignoreos --ignorearch --nodeps \
/data/RPMS/hello-2.0-1.x86_64.rpm
runroot rpm -Vv --nodeps --nogroup --nouser hello
@ -23,12 +23,12 @@ missing d /usr/share/doc/hello-2.0/FAQ
missing d /usr/share/doc/hello-2.0/README
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm reinstall with shared files])
AT_KEYWORDS([install erase update rpmdb])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U --ignoreos --ignorearch --nodeps \
--define "_transaction_color 3" \
--define "_prefer_color 2" \
@ -66,12 +66,12 @@ runroot rpm -Vv --nodeps --nogroup --nouser hello.i686 hello.x86_64
......... d /usr/share/doc/hello-2.0/README
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -e and shared files removed 1.1])
AT_KEYWORDS([install erase rpmdb])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U --ignoreos --ignorearch --nodeps \
--define "_transaction_color 3" \
--define "_prefer_color 2" \
@ -111,12 +111,12 @@ missing /usr/bin/hello
......... d /usr/share/doc/hello-2.0/README
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -e and shared files removed 1.2])
AT_KEYWORDS([install erase rpmdb])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U --ignoreos --ignorearch --nodeps \
--define "_transaction_color 3" \
--define "_prefer_color 2" \
@ -157,12 +157,12 @@ missing d /usr/share/doc/hello-2.0/README
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Test that removing shared or wrong colored files has no effect
AT_SETUP([rpm -e and verify colored files removed 1.1])
AT_KEYWORDS([install erase rpmdb])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U --ignoreos --ignorearch --nodeps \
--define "_transaction_color 3" \
@ -180,7 +180,7 @@ runroot rpm -Vv --nodeps --nogroup --nouser hello
......... d /usr/share/doc/hello-2.0/README
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# XXX This is wrong really, rpm shouldn't let the real provider of
# a shared file get removed - and unforced action shouldn't result
@ -188,7 +188,7 @@ AT_CLEANUP
AT_SETUP([rpm -e and verify colored files removed 1.2])
AT_KEYWORDS([install erase rpmdb])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignoreos --ignorearch --nodeps \
@ -206,14 +206,14 @@ runroot rpm -Vv --nodeps --nogroup --nouser hello
......... d /usr/share/doc/hello-2.0/README
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Test that shared colored files actually get removed regardless of order 1
AT_SETUP([rpm -e and verify colored files removed 2.1])
AT_XFAIL_IF([test $RPM_XFAIL -ne 0])
AT_KEYWORDS([install erase rpmdb])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignoreos --ignorearch --nodeps \
@ -231,14 +231,14 @@ missing d /usr/share/doc/hello-2.0/FAQ
missing d /usr/share/doc/hello-2.0/README
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Test that shared colored files actually get removed regardless of order 2
AT_SETUP([rpm -e and verify colored files removed 2.2])
AT_XFAIL_IF([test $RPM_XFAIL -ne 0])
AT_KEYWORDS([install erase rpmdb])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignoreos --ignorearch --nodeps \
@ -256,7 +256,7 @@ missing d /usr/share/doc/hello-2.0/FAQ
missing d /usr/share/doc/hello-2.0/README
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -e and verify conflicting files removed 1])
AT_KEYWORDS([install erase rpmdb])
@ -268,7 +268,7 @@ for p in a b; do
/data/SPECS/conflicttest.spec
done
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U --ignoreos /build/RPMS/noarch/conflicta-1.0-1.noarch.rpm
runroot rpm -U --ignoreos --excludepath=/usr/share /build/RPMS/noarch/conflictb-1.0-1.noarch.rpm
runroot rpm -Vav --nogroup --nouser conflicta conflictb
@ -285,7 +285,7 @@ missing /usr/share/my.version
],
[])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U --ignoreos --excludepath=/usr/share /build/RPMS/noarch/conflicta-1.0-1.noarch.rpm
runroot rpm -U --ignoreos /build/RPMS/noarch/conflictb-1.0-1.noarch.rpm
runroot rpm -Vav --nogroup --nouser conflicta conflictb
@ -302,7 +302,7 @@ missing /usr/share/my.version
],
[])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U --ignoreos /build/RPMS/noarch/conflicta-1.0-1.noarch.rpm
runroot rpm -U --ignoreos --force /build/RPMS/noarch/conflictb-1.0-1.noarch.rpm
runroot rpm -Vav --nogroup --nouser conflicta conflictb
@ -319,7 +319,7 @@ missing /usr/share/my.version
],
[])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U --ignoreos /build/RPMS/noarch/conflicta-1.0-1.noarch.rpm
runroot rpm -U --ignoreos --force /build/RPMS/noarch/conflictb-1.0-1.noarch.rpm
runroot rpm -Vav --nogroup --nouser conflicta conflictb
@ -333,13 +333,13 @@ runroot rpm -e conflicta
missing /usr/share/my.version (replaced)
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Test %_netsharedpath erasure. It's a bit weird as we're abusing verify
# on non-installed package to see if files are there.
AT_SETUP([rpm -e and verify netshared files not removed])
AT_KEYWORDS([install erase rpmdb])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignoreos --ignorearch --nodeps \
@ -353,5 +353,5 @@ runroot rpm -Vp --nodeps --nogroup --nouser /data/RPMS/hello-2.0-1.x86_64.rpm
[missing /usr/bin/hello
],
[])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -21,25 +21,25 @@ AT_BANNER([Basic tests])
# ------------------------------
AT_SETUP([rpm --version])
AT_KEYWORDS([basic])
AT_CHECK([runroot rpm --version],[0],
RPMTEST_CHECK([runroot rpm --version],[0],
[RPM version AT_PACKAGE_VERSION
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([rpmbuild --version])
AT_KEYWORDS([basic])
AT_CHECK([runroot rpmbuild --version],[0],
RPMTEST_CHECK([runroot rpmbuild --version],[0],
[RPM version AT_PACKAGE_VERSION
])
AT_CLEANUP
RPMTEST_CLEANUP
# Check that libtool versioning matches expectations, it's easy to screw up.
AT_SETUP([rpm library version])
AT_KEYWORDS([basic])
AT_SKIP_IF(test -f "${RPMTEST}/${RPMLIBDIR}/librpm.a")
AT_CHECK([
RPMTEST_CHECK([
cd ${RPMTEST}/${RPMLIBDIR}
ls lib{rpm,rpmbuild,rpmio,rpmsign}.so.*.*
],
@ -49,14 +49,14 @@ librpmbuild.so.10.0.0
librpmio.so.10.0.0
librpmsign.so.10.0.0
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([rpm --showrc])
AT_KEYWORDS([basic])
AT_CHECK([runroot rpm --showrc],[0],
RPMTEST_CHECK([runroot rpm --showrc],[0],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
@ -64,7 +64,7 @@ AT_CLEANUP
# * Some versions of rpm append extraneous whitespaces
AT_SETUP([rpm --querytags])
AT_KEYWORDS([basic])
AT_CHECK([runroot rpm --querytags],[0],
RPMTEST_CHECK([runroot rpm --querytags],[0],
[ARCH
ARCHIVESIZE
ARCHSUFFIX
@ -323,11 +323,11 @@ VERITYSIGNATURES
VERSION
XPM
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm2cpio])
AT_KEYWORDS([basic])
AT_CHECK([
RPMTEST_CHECK([
runroot_other rpm2cpio data/RPMS/hello-2.0-1.x86_64.rpm | cpio -t --quiet
runroot_other rpm2cpio data/SRPMS/hello-1.0-1.src.rpm | cpio -t --quiet
],
@ -340,11 +340,11 @@ runroot_other rpm2cpio data/SRPMS/hello-1.0-1.src.rpm | cpio -t --quiet
hello-1.0.tar.gz
hello.spec
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm2archive])
AT_KEYWORDS([basic])
AT_CHECK([
RPMTEST_CHECK([
runroot_other rpm2archive - < "${RPMTEST}"/data/RPMS/hello-2.0-1.x86_64.rpm | tar tzf -
runroot_other rpm2archive - < "${RPMTEST}"/data/SRPMS/hello-1.0-1.src.rpm | tar tzf -
],
@ -357,4 +357,4 @@ runroot_other rpm2archive - < "${RPMTEST}"/data/SRPMS/hello-1.0-1.src.rpm | tar
./hello-1.0.tar.gz
./hello.spec
])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -20,7 +20,7 @@ AT_BANNER([RPM install tests])
AT_SETUP([rpm -U <manifest>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
echo /data/RPMS/hello-2.0-1.x86_64.rpm > ${RPMTEST}/tmp/test.mft
@ -30,11 +30,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <manifest glob>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
echo "/data/RPMS/hello-2.0-1.{i686,x86_64}.rpm" > ${RPMTEST}/tmp/test.mft
@ -44,11 +44,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <manifest glob fallback>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cp "${RPMTEST}/data/RPMS/hello-1.0-1.i386.rpm" \
@ -62,11 +62,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <manifest notfound 1>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
echo /data/RPMS/hello-2.0-1.x86_64.rpm > ${RPMTEST}/tmp/test.mft
@ -77,11 +77,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[],
[error: open of /tmp/test-not-there.mft failed: No such file or directory
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <manifest notfound 2>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
echo /data/RPMS/hello-not-there-2.0-1.x86_64.rpm > ${RPMTEST}/tmp/test.mft
@ -92,11 +92,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[],
[error: open of /data/RPMS/hello-not-there-2.0-1.x86_64.rpm failed: No such file or directory
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <manifest notfound 3>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
echo /data/RPMS/hello-not-there-1.0-1.x86_64.rpm > ${RPMTEST}/tmp/test.mft
@ -111,11 +111,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
error: open of /data/RPMS/hello-not-there-2.0-1.x86_64.rpm failed: No such file or directory
error: open of /data/RPMS/hello-not-there-3.0-1.x86_64.rpm failed: No such file or directory
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <manifest notfound 4>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
echo "/data/RPMS/hello-not-there-*.x86_64.rpm" > ${RPMTEST}/tmp/test.mft
@ -130,11 +130,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
error: open of /data/RPMS/hello-not-there-1.0-1.x86_64.rpm failed: No such file or directory
error: open of /data/RPMS/hello-not-there-2.0-1.x86_64.rpm failed: No such file or directory
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <notfound>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignorearch --ignoreos --nodeps \
@ -144,11 +144,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[],
[error: open of /data/RPMS/hello-not-there-2.0-1.x86_64.rpm failed: No such file or directory
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <notfound 2>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignorearch --ignoreos --nodeps \
@ -162,11 +162,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
error: open of /data/RPMS/hello-not-there-2.0-1.x86_64.rpm failed: No such file or directory
error: open of /data/RPMS/hello-not-there-3.0-1.x86_64.rpm failed: No such file or directory
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <unsigned 1>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignorearch --ignoreos --nodeps \
@ -175,11 +175,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <unsigned 2>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignorearch --ignoreos --nodeps \
@ -190,11 +190,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[],
[ package hello-2.0-1.x86_64 does not verify: no signature
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <corrupted unsigned 1>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64.rpm"
@ -236,11 +236,11 @@ error: unpacking of archive failed on file /usr/share/doc/hello-2.0/COPYING
error: hello-2.0-1.x86_64: install failed
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <corrupted unsigned 2>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64.rpm"
@ -279,11 +279,11 @@ error: unpacking of archive failed: cpio: Bad magic
error: hello-2.0-1.x86_64: install failed
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <signed nokey 1>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignorearch --ignoreos --nodeps \
@ -293,11 +293,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[],
[warning: /data/RPMS/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 Signature, key ID 1964c5fc: NOKEY
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <signed nokey 2>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignorearch --ignoreos --nodeps \
@ -309,11 +309,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[warning: /data/RPMS/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 Signature, key ID 1964c5fc: NOKEY
package hello-2.0-1.x86_64 does not verify: Header V4 RSA/SHA256 Signature, key ID 1964c5fc: NOKEY
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <signed 1>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmkeys --import /data/keys/rpm.org-rsa-2048-test.pub
@ -323,11 +323,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <signed 2>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmkeys --import /data/keys/rpm.org-rsa-2048-test.pub
@ -338,11 +338,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <corrupted signed 1>])
AT_KEYWORDS([install])
AT_CHECK_UNQUOTED([
RPMTEST_CHECK_UNQUOTED([
RPMDB_INIT
pkg="hello-2.0-1.x86_64-signed.rpm"
@ -364,11 +364,11 @@ else
fi`
error: /tmp/hello-2.0-1.x86_64-signed.rpm cannot be installed
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <corrupted signed 2>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64-signed.rpm"
@ -386,11 +386,11 @@ error: /tmp/hello-2.0-1.x86_64-signed.rpm: Header SHA256 digest: BAD (Expected e
error: /tmp/hello-2.0-1.x86_64-signed.rpm: Header SHA1 digest: BAD (Expected 5cd9874c510b67b44483f9e382a1649ef7743bac != 4261b2c1eb861a4152c2239bce20bfbcaa8971ba)
error: /tmp/hello-2.0-1.x86_64-signed.rpm cannot be installed
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <corrupted signed 3>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64-signed.rpm"
@ -444,11 +444,11 @@ error: unpacking of archive failed: cpio: Bad magic
error: hello-2.0-1.x86_64: install failed
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <glob>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignorearch --ignoreos --nodeps \
@ -457,11 +457,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <glob notfound>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --ignorearch --ignoreos --nodeps \
@ -475,11 +475,11 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
error: open of /data/RPMS/hello-not-there-1.0-1.x86_64.rpm failed: No such file or directory
error: open of /data/RPMS/hello-not-there-2.0-1.x86_64.rpm failed: No such file or directory
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <glob fallback>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cp "${RPMTEST}/data/RPMS/hello-1.0-1.i386.rpm" \
@ -491,13 +491,13 @@ runroot rpm -U --ignorearch --ignoreos --nodeps \
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test tid/time overrides using SOURCE_DATE_EPOCH
AT_SETUP([rpm -i <overridden time>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64"
@ -521,13 +521,13 @@ foo-1.0-1.noarch
hello-2.0-1.x86_64
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test multiple installs using SOURCE_DATE_EPOCH
AT_SETUP([rpm -i <overridden time keeps ticking>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
timestamp=1445412535
@ -548,11 +548,11 @@ Install Date: Wed Oct 21 07:28:55 2015
Install Date: Wed Oct 21 07:28:56 2015
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -i --nodb])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
@ -572,11 +572,11 @@ runroot_other find /foo|sort
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -i --justdb])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# avoid having to deal with non-existent /foo in the find below
@ -591,13 +591,13 @@ runroot_other find /foo|sort
/foo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check if rpm -U *.src.rpm works
AT_SETUP([rpm -U *.src.rpm])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
rm -rf ${TOPDIR}
@ -607,13 +607,13 @@ runroot rpm \
[0],
[ignore],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Check if rpm -i *.src.rpm works
AT_SETUP([rpm -i *.src.rpm])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
rm -rf ${TOPDIR}
@ -623,14 +623,14 @@ runroot rpm \
[0],
[ignore],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Various error behavior tests
#
AT_SETUP([rpm -i <nonexistent file>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
-i no_such_file
@ -639,11 +639,11 @@ runroot rpm \
[],
[error: open of no_such_file failed: No such file or directory
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -i --nomanifest <garbage text file>])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
junk="${RPMTEST}/textfile"
cat << EOF > "${junk}"
@ -658,11 +658,11 @@ runroot rpm \
[],
[error: /textfile cannot be installed
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -i <garbage text file])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
junk="${RPMTEST}/not_an.rpm"
cat << EOF > "${junk}"
@ -678,7 +678,7 @@ runroot rpm \
[error: open of no_such.file failed: No such file or directory
error: open of not_pkg.rpm failed: No such file or directory
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([rpm upgrade/downgrade])
@ -691,7 +691,7 @@ for v in "1.0" "2.0"; do
done
# Test normal upgrade
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/versiontest-1.0-1.noarch.rpm
runroot rpm -U /build/RPMS/noarch/versiontest-2.0-1.noarch.rpm
@ -703,7 +703,7 @@ runroot rpm -q versiontest
[])
# Test upgrading to older package (should fail)
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/versiontest-2.0-1.noarch.rpm
@ -715,7 +715,7 @@ runroot rpm -U /build/RPMS/noarch/versiontest-1.0-1.noarch.rpm
])
# Test downgrading to older package with --oldpackage
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/versiontest-2.0-1.noarch.rpm
@ -728,7 +728,7 @@ runroot rpm -q versiontest
[ignore])
# Test upgrade of different versions in same transaction
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -Uv \
@ -746,7 +746,7 @@ versiontest-2.0-1.noarch
])
# Test upgrade of different versions in same transaction
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -Uv \
@ -764,7 +764,7 @@ versiontest-2.0-1.noarch
])
# Test install of two different versions in same transaction
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i \
@ -780,7 +780,7 @@ versiontest-1.0-1.noarch
# Test install of two different versions in same transaction
# TODO: test only one was installed
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i \
@ -794,7 +794,7 @@ runroot rpm -q versiontest
[])
# Test freshen
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/versiontest-1.0-1.noarch.rpm
runroot rpm -F /build/RPMS/noarch/versiontest-2.0-1.noarch.rpm
@ -806,7 +806,7 @@ runroot rpm -q versiontest
[])
# Test freshen on uninstalled package
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -F /build/RPMS/noarch/versiontest-2.0-1.noarch.rpm
runroot rpm -q versiontest
@ -817,7 +817,7 @@ runroot rpm -q versiontest
[])
# Test freshen with older package
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/versiontest-2.0-1.noarch.rpm
runroot rpm -F /build/RPMS/noarch/versiontest-1.0-1.noarch.rpm
@ -829,7 +829,7 @@ runroot rpm -q versiontest
[])
# Test freshen --oldpackage
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/versiontest-2.0-1.noarch.rpm
runroot rpm -F --oldpackage /build/RPMS/noarch/versiontest-1.0-1.noarch.rpm
@ -841,7 +841,7 @@ runroot rpm -q versiontest
[])
# Test freshen --oldpackage same version
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/versiontest-2.0-1.noarch.rpm
runroot rpm -F --oldpackage /build/RPMS/noarch/versiontest-2.0-1.noarch.rpm
@ -852,7 +852,7 @@ runroot rpm -q versiontest
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm upgrade/downgrade epoch])
RPMDB_INIT
@ -866,7 +866,7 @@ done
# for testing sanity
runroot_other echo '%_query_all_fmt %%{nevra}' > ${HOME}/.rpmmacros
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /tmp/noepoch.rpm
runroot rpm -U /tmp/epoch1.rpm
@ -877,7 +877,7 @@ runroot rpm -q versiontest
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /tmp/epoch1.rpm
runroot rpm -U /tmp/epoch2.rpm
@ -889,7 +889,7 @@ runroot rpm -q versiontest
[])
# XXX this should be FAIL, but don't want to fail all the test just because...
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /tmp/epoch1.rpm
runroot rpm -U /tmp/noepoch.rpm
@ -899,7 +899,7 @@ runroot rpm -U /tmp/noepoch.rpm
[ package versiontest-1:1.0-1.noarch (which is newer than versiontest-1.0-1.noarch) is already installed
])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /tmp/epoch2.rpm
runroot rpm -U /tmp/epoch1.rpm
@ -909,7 +909,7 @@ runroot rpm -U /tmp/epoch1.rpm
[ package versiontest-2:1.0-1.noarch (which is newer than versiontest-1:1.0-1.noarch) is already installed
])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /tmp/epoch2.rpm
runroot rpm -U --oldpackage /tmp/epoch1.rpm
@ -921,7 +921,7 @@ runroot rpm -q versiontest
[])
# XXX this should be FAIL, but don't want to fail all the test just because...
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /tmp/epoch1.rpm
runroot rpm -U --oldpackage /tmp/noepoch.rpm
@ -932,7 +932,7 @@ runroot rpm -q versiontest
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /tmp/noepoch.rpm
runroot rpm -e versiontest-1.0-1
@ -941,7 +941,7 @@ runroot rpm -e versiontest-1.0-1
[],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /tmp/epoch1.rpm
runroot rpm -e versiontest-1.0-1
@ -950,7 +950,7 @@ runroot rpm -e versiontest-1.0-1
[],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i /tmp/noepoch.rpm
runroot rpm -i /tmp/epoch1.rpm
@ -972,7 +972,7 @@ error: "versiontest-1.0-1" specifies multiple packages:
versiontest-1:1.0-1.noarch
])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /tmp/noepoch.rpm
runroot rpm -U --replacepkgs /tmp/noepoch.rpm
@ -981,7 +981,7 @@ runroot rpm -U --replacepkgs /tmp/noepoch.rpm
[],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /tmp/epoch1.rpm
runroot rpm -U --replacepkgs /tmp/epoch1.rpm
@ -989,7 +989,7 @@ runroot rpm -U --replacepkgs /tmp/epoch1.rpm
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U obsoleted packages])
AT_KEYWORDS([install obsolete])
@ -1007,7 +1007,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/deptest.spec
# Test package obsoleting another
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U /build/RPMS/noarch/deptest-two-1.0-1.noarch.rpm
runroot rpm -U /build/RPMS/noarch/deptest-obsoletes-1.0-1.noarch.rpm
@ -1020,7 +1020,7 @@ deptest-obsoletes-1.0-1.noarch
[])
# Test upgrade of obsoleted package in same transaction
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -Uv \
@ -1038,7 +1038,7 @@ deptest-one-1.0-1.noarch
])
# Test upgrade of obsoleted package in same transaction
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -Uv \
@ -1054,11 +1054,11 @@ deptest-one-1.0-1.noarch
],
[warning: package deptest-one-1.0-1.noarch was already added, skipping deptest-two-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U with invalid --relocate])
AT_KEYWORDS([install relocate])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec
@ -1070,11 +1070,11 @@ runroot rpm -U --test --ignoreos --relocate /usr=/opt \
[],
[ path /usr in package hello-script-1.0-1.noarch is not relocatable
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U --badreloc with invalid --relocate])
AT_KEYWORDS([install relocate])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/hello-script.spec
@ -1085,11 +1085,11 @@ runroot rpm -U --test --ignoreos --badreloc --relocate /usr=/opt \
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -i relocatable package])
AT_KEYWORDS([install relocate])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/reloc.spec
@ -1117,10 +1117,10 @@ runroot rpm -U --relocate /opt/bin=/bin \
2: /opt/lib
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -i with/without --excludedocs])
AT_KEYWORDS([install excludedocs])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/testdoc.spec
@ -1149,14 +1149,14 @@ runroot rpm -e testdoc
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -i --excludeartifacts])
AT_KEYWORDS([install])
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/vattrtest.spec
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i --excludeartifacts /build/RPMS/noarch/vattrtest-1.0-1.noarch.rpm
test -e ${RPMTEST}/opt/vattrtest/a && exit 1
@ -1167,7 +1167,7 @@ test -e ${RPMTEST}/opt/vattrtest/a || exit 1
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U <suicidal>])
AT_KEYWORDS([install])
@ -1179,7 +1179,7 @@ for r in 1 2; do
/data/SPECS/suicidal.spec
done
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
for r in 1 2; do
@ -1193,7 +1193,7 @@ runroot rpm -V --nouser --nogroup suicidal
[],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
for r in 1 2; do
@ -1206,7 +1206,7 @@ runroot rpm -V --nouser --nogroup suicidal
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# hardlink tests
@ -1228,7 +1228,7 @@ cp "${RPMTEST}/${pkg}" "${RPMTEST}/tmp/3.rpm"
dd if=/dev/zero of="${RPMTEST}/tmp/3.rpm" \
conv=notrunc bs=1 seek=8050 count=6 2> /dev/null
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i --noverify /tmp/1.rpm
# test that nothing of the contents remains after failure
@ -1240,7 +1240,7 @@ test -d "${RPMTEST}/foo"
error: hlinktest-1.0-1.noarch: install failed
])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i --noverify /tmp/2.rpm
# test that nothing of the contents remains after failure
@ -1252,7 +1252,7 @@ test -d "${RPMTEST}/foo"
error: hlinktest-1.0-1.noarch: install failed
])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i --noverify /tmp/3.rpm 2>&1| sed 's/;.*:/:/g'
# test that nothing of the contents remains after failure
@ -1264,7 +1264,7 @@ error: hlinktest-1.0-1.noarch: install failed
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i "${pkg}"
runroot rpm -q --qf "[[%{filenlinks} %{filenames}\n]]%{longsize}\n" hlinktest
@ -1286,7 +1286,7 @@ runroot rpm -e hlinktest
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i --excludepath=/foo/zzzz "${pkg}"
runroot rpm -Vv --nogroup --nouser hlinktest
@ -1304,7 +1304,7 @@ runroot rpm -e hlinktest
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i --excludepath=/foo/aaaa "${pkg}"
runroot rpm -Vv --nogroup --nouser hlinktest
@ -1322,7 +1322,7 @@ runroot rpm -e hlinktest
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i --excludepath=/foo/aaaa --excludepath=/foo/zzzz "${pkg}"
runroot rpm -Vv --nogroup --nouser hlinktest
@ -1340,7 +1340,7 @@ runroot rpm -e hlinktest
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -i --excludepath=/foo/hello-foo "${pkg}"
runroot rpm -Vv --nogroup --nouser hlinktest
@ -1358,7 +1358,7 @@ runroot rpm -e hlinktest
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild -bb --quiet --with crossdir_links /data/SPECS/hlinktest.spec
runroot rpm -U /build/RPMS/noarch/hlinktest-1.0-1.noarch.rpm
@ -1377,11 +1377,11 @@ runroot rpm -Vav --nouser --nogroup
......... /xmark/hello
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U filesystem])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild -bb --quiet /data/SPECS/fs.spec
@ -1393,11 +1393,11 @@ runroot rpm -q --whatprovides /
[fs-1.0-1.noarch
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U fifo])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild -bb --quiet /data/SPECS/fifo.spec
@ -1408,12 +1408,12 @@ runroot rpm -Vv --nouser --nogroup fifo
[......... /test-fifo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U dev])
AT_KEYWORDS([install])
AT_SKIP_IF([$MKNOD_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild -bb --quiet /data/SPECS/dev.spec
@ -1425,11 +1425,11 @@ runroot rpm -Vv --nouser --nogroup dev
......... /test-char
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -U with Obsoletes])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild -bb --quiet --define "pkg obsoletes" \
@ -1445,11 +1445,11 @@ runroot rpm -q deptest-obsoletes deptest-test-obsoletes
deptest-test-obsoletes-1.0-1.noarch
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -i create user])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild -bb --quiet --define "pkg user" --define "provs %{add_sysuser u myuser 876 - /home/myuser /bin/sh}"\
@ -1462,11 +1462,11 @@ runroot rpm -V --root /alt ${VERIFYOPTS} deptest-user
[myuser:x:876:876::/home/myuser:/bin/sh
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -i create group])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild -bb --quiet --define "pkg user" --define "provs %{add_sysuser g mygroup 678}"\
@ -1479,7 +1479,7 @@ runroot rpm -V ${VERIFYOPTS} deptest-user
[mygroup:x:678:
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -i sysusers])
AT_KEYWORDS([install build sysusers])
@ -1487,7 +1487,7 @@ RPMDB_INIT
runroot rpmbuild -bb --quiet /data/SPECS/klang.spec
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U /build/RPMS/noarch/klang-client-1.0-1.noarch.rpm
],
[1],
@ -1496,7 +1496,7 @@ runroot rpm -U /build/RPMS/noarch/klang-client-1.0-1.noarch.rpm
group(klang) is needed by klang-client-1.0-1.noarch
])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U \
/build/RPMS/noarch/klang-client-1.0-1.noarch.rpm \
/build/RPMS/noarch/klang-common-1.0-1.noarch.rpm
@ -1508,7 +1508,7 @@ runroot rpm -V ${VERIFYOPTS} klang-client klang-common
],
[ignore])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -U /build/RPMS/noarch/klang-server-1.0-1.noarch.rpm
runroot_other grep ^klangd /etc/passwd | cut -f1 -d:
runroot_other grep ^klangd /etc/group | cut -f1 -d:
@ -1522,4 +1522,4 @@ plong
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -5,7 +5,7 @@ AT_BANNER([I/O])
# test too unstable for production
#AT_SETUP([SIGPIPE from --pipe])
#AT_KEYWORDS([signals])
#AT_CHECK([
#RPMTEST_CHECK([
#RPMDB_CLEAR
#RPMDB_INIT
#
@ -16,11 +16,11 @@ AT_BANNER([I/O])
#[/opt/sigpipe/data
#],
#[])
#AT_CLEANUP
#RPMTEST_CLEANUP
AT_SETUP([SIGPIPE from install scriptlet])
AT_KEYWORDS([signals])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/sigpipe.spec
@ -29,14 +29,14 @@ runroot rpm -U --nodeps /build/RPMS/noarch/sigpipe-1.0-1.noarch.rpm
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# XXX TODO: test for RhBug:471591 too, but needs a simpler reproducer
# test too unstable for production
#AT_SETUP([SIGPIPE in build scriptlet])
#AT_KEYWORDS([signals])
#AT_CHECK([
#RPMTEST_CHECK([
#RPMDB_CLEAR
#RPMDB_INIT
#
@ -45,11 +45,11 @@ AT_CLEANUP
#[0],
#[],
#[])
#AT_CLEANUP
#RPMTEST_CLEANUP
AT_SETUP([rpmlog error handling])
AT_KEYWORDS([log])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -qpl /data/RPMS/hello-2.0-1.x86_64.rpm > /dev/full
@ -58,4 +58,4 @@ runroot rpm -qpl /data/RPMS/hello-2.0-1.x86_64.rpm > /dev/full
[],
[Error writing to log: No space left on device
])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -5,7 +5,7 @@ AT_BANNER([RPM macros])
# ------------------------------
AT_SETUP([simple rpm --eval])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --define "this that" --eval '%{this}' --eval '%not_defined' --eval '%{not_defined}' --eval '%{}'
],
[0],
@ -14,24 +14,24 @@ runroot rpm --define "this that" --eval '%{this}' --eval '%not_defined' --eval '
%{not_defined}
%{}
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([invalid rpm --eval])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --eval '%define _ that'
],
[1],
[],
[error: Macro %_ has illegal name (%define)
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([invalid rpm --define])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --define "_ that"
runroot rpm --define "undefine that"
],
@ -40,11 +40,11 @@ runroot rpm --define "undefine that"
[error: Macro %_ has illegal name (%define)
error: Macro %undefine is a built-in (%define)
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm --undefine])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --define "this that" --eval '1. %{this}' --undefine 'this' --eval '2. %{this'}
runroot rpm --eval '1. %{this}' --define "this that" --eval '2. %{this}' --undefine 'this' --eval '3. %{this'}
],
@ -55,41 +55,41 @@ runroot rpm --eval '1. %{this}' --define "this that" --eval '2. %{this}' --undef
2. that
3. %{this}
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([simple true conditional rpm --eval])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --define "this that" --eval '%{?this}'
],
[0],
[that
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([simple false conditional rpm --eval])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --define "this that" --eval '%{?that}'
],
[0],
[
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([nested macro in name])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --define "this that" --define "that_that foo" --eval '%{expand:%{%{this}_that}}'
],
[0],
[foo
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([parametrized macro 1])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cat << EOF > ${RPMTEST}/mtest
%bar() bar
@ -122,11 +122,11 @@ bar
foo 5
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([parametrized macro 2])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--define '%bar() "Bar %#: %{?1} %{?2}"' \
--define '%foo() "Foo %#: %{?1} %{?2}" %bar a' \
@ -135,11 +135,11 @@ runroot rpm \
[0],
["Foo 2: 1 2" "Bar 1: a "
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([parametrized macro 3])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--define '%foo() 1:%1 2:%2' \
--eval '%foo %nil bar'
@ -147,11 +147,11 @@ runroot rpm \
[0],
[1:bar 2:%2
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([parametrized macro 4])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--define '%bar yyy' \
--define '%foo() %1' \
@ -162,11 +162,11 @@ runroot rpm \
[yyy
%bar
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([parametrized macro 5])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--define '%foo() %#:%{?1:"%1"}%{?2: "%2"}' \
--define 'bar zzz' \
@ -198,11 +198,11 @@ bar' \
2:"1" "\"bar
2:"1" "\"
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([parametrized macro 6])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--define '%foo(-) %{*}' \
--eval '%foo 5 a -z -b2'
@ -210,11 +210,11 @@ runroot rpm \
[0],
[5 a -z -b2
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([parametrized macro 7])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--define '%foo(zb:) %{**}' \
--eval '%foo 5 a -z -b2'
@ -222,11 +222,11 @@ runroot rpm \
[0],
[5 a -z -b2
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([uncompress macro 1])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--define "__rpmuncompress /my/bin/rpmuncompress" \
--eval "%{uncompress:/data/SOURCES/hello-2.0.tar.gz}"
@ -234,11 +234,11 @@ runroot rpm \
[0],
[/my/bin/rpmuncompress /data/SOURCES/hello-2.0.tar.gz
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([uncompress 1])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot_other ${RPM_CONFIGDIR}/rpmuncompress /data/SOURCES/hello-2.0.tar.gz | tar t
],
@ -251,11 +251,11 @@ hello-2.0/Makefile
hello-2.0/README
hello-2.0/FAQ
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([uncompress 2])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
echo xxxxxxxxxxxxxxxxxxxxxxxxx > ${RPMTEST}/tmp/"some%%ath"
runroot_other ${RPM_CONFIGDIR}/rpmuncompress "/tmp/some%%ath"
@ -263,13 +263,13 @@ runroot_other ${RPM_CONFIGDIR}/rpmuncompress "/tmp/some%%ath"
[0],
[xxxxxxxxxxxxxxxxxxxxxxxxx
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([getncpus macro])
AT_KEYWORDS([macros])
# skip if nproc not available
AT_SKIP_IF([test -z "$(nproc 2>/dev/null)"])
AT_CHECK([
RPMTEST_CHECK([
mem=$(expr $(getconf PAGESIZE) \* $(getconf _PHYS_PAGES) / 1024 / 1024)
expr $(runroot rpm --eval "%{getncpus}") = $(nproc)
expr $(runroot rpm --define "_smp_tasksize_thread ${mem}" --eval "%{getncpus:thread}") = 1
@ -281,55 +281,55 @@ expr $(runroot rpm --define "_smp_tasksize_proc ${mem}" --eval "%{getncpus:proc}
1
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([basename macro])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval "%{basename:/data/SOURCES/hello-2.0.tar.gz}"
],
[0],
[hello-2.0.tar.gz
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([shrink macro])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval "%{shrink: h e l lo }"
],
[0],
[h e l lo
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([suffix macro])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval "%{suffix:/data/SOURCES/hello-2.0.tar.gz}"
],
[0],
[gz
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([url2path macro])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval "%{url2path:http://hello.org/releases/hello-2.0.tar.gz}"
],
[0],
[/releases/hello-2.0.tar.gz
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([macrobody macro])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--define "somedir %{_exec_prefix}/%{_lib}" \
--eval "%{macrobody:somedir}"
@ -342,22 +342,22 @@ runroot rpm \
[%{_exec_prefix}/%{_lib}
%{_exec_prefix}/%{_lib}
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmversion macro])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --eval "%{rpmversion}"
],
[0],
[AT_PACKAGE_VERSION
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([builtin macro arguments])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --eval "%{dirname}"
runroot rpm --eval "%{dirname:}"
runroot rpm --eval "%{dirname:dir}"
@ -404,11 +404,11 @@ error: Macro %foo has empty body
error: Macro %foo has empty body
error: %dump: unexpected argument
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([macro arguments])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--define 'zzz xxx' \
--eval '%{defined zzz}' \
@ -426,11 +426,11 @@ runroot rpm \
0
0
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([string functions])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval "%sub cd6317ba61e6c27b92d6bbdf2702094ff3c0c732 1 7" \
--eval "%sub cd6317ba61e6c27b92d6bbdf2702094ff3c0c732 7 -7" \
@ -458,12 +458,12 @@ b"a
bba
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([expr macro 1])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--define "aaa 5" \
--define "bbb 0" \
@ -501,11 +501,11 @@ bar
foo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([expr macro 2])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --eval '%{expr:"a"*1}'
runroot rpm --eval '%{expr:(5+1)*4)}'
runroot rpm --eval '%{expr:"a"=!"b"}'
@ -535,11 +535,11 @@ error: types must match: 0 < 1 ? 1*"a" : 2
error: types must match: 0 < 1 ? 2 : "a"
error: types must match: 0 < 1 ? "a" : 2
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([ternary expressions])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval '%{expr: 0 ? 2 : 3}' \
--eval '%{expr: 1 ? 2 : 3}' \
@ -565,11 +565,11 @@ runroot rpm \
3
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([expression macro level])
AT_KEYWORDS([macros])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm \
--define 'expopt(r) %[%{undefined yyy} ? "aa " : "bb "]%{-r:the -r option was set}%{!-r:the -r option was not set}' \
--eval '%expopt' \
@ -586,7 +586,7 @@ bb the -r option was set
],
[])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm \
--define 'expopt(r) %{expr:%{undefined yyy} ? "aa " : "bb "}%{-r:the -r option was set}%{!-r:the -r option was not set}' \
--eval '%expopt' \
@ -602,11 +602,11 @@ bb the -r option was not set
bb the -r option was set
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([short circuiting])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval '%{expr: 0 && 1 / 0}' \
--eval '%{expr: 1 || 1 / 0}' \
@ -618,22 +618,22 @@ runroot rpm \
2
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([shell expansion])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval "%(echo foo)"
],
[0],
[foo
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([expression expansion 1])
AT_KEYWORDS([macros])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm \
--define "aaa 5" \
--define "bbb 0" \
@ -657,11 +657,11 @@ runroot rpm \
0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([expression expansion 2])
AT_KEYWORDS([macros])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm --define "aaa hello" --eval '%[%aaa]'
runroot rpm --eval '%[%{foo]'
runroot rpm --eval '%[v""]'
@ -681,11 +681,11 @@ error: ^
error: * and / not supported for versions: v"1" / v"2"
error: ^
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([expression version comparison])
AT_KEYWORDS([macros])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm \
--eval '%[v"1.0" == v"1.0"]' \
--eval '%[v"1.0~rc" < v"1.0"]' \
@ -699,20 +699,20 @@ runroot rpm \
1
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([simple lua --eval])
AT_KEYWORDS([macros lua])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --eval '%{lua:print(5*5)}'
],
[0],
[25
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua glob])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot_other mkdir -p aaa/{123,223,323,322,321}
runroot rpm --eval "%{lua:for i,p in ipairs(rpm.glob('aaa/3*')) do print(p..'\\n') end}"
@ -727,11 +727,11 @@ aaa/b*
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua macro arguments])
AT_KEYWORDS([macros lua])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm \
--define "foo(a:) %{lua:print(opt.a, arg[1])}" \
--define "bar() %{lua:print(rpm.expand('%foo -a'..arg[2]..' '..arg[1]))}" \
@ -740,11 +740,11 @@ runroot rpm \
[0],
[3 5
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua macros table])
AT_KEYWORDS([macros lua])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm \
--define "qtst() %{lua:for i=1, #arg do print(' '..i..':'..arg[i]) end}"\
--eval "%{lua:print(macros.with('zap'), macros.without('zap'))}" \
@ -773,7 +773,7 @@ nil
that
])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm \
--eval "%{lua:macros.defined({1,2,{}})}"
]],
@ -781,11 +781,11 @@ runroot rpm \
[],
[[error: lua script failed: [string "<lua>"]:1: bad argument #3 to 'defined' (cannot convert to string)
]])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua macros recursion])
AT_KEYWORDS([macros lua])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm \
--define "%recurse() %{lua:io.write(' '..#arg); if #arg < 16 then table.insert(arg, #arg); macros.recurse(arg) end;}" \
--eval "%recurse"
@ -793,31 +793,31 @@ runroot rpm \
[0],
[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua rpm extensions 1])
AT_KEYWORDS([macros lua])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --eval '%{lua: rpm.define("foo bar") print(rpm.expand("%{foo}"))}'
],
[0],
[bar
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua rpm extensions 2])
AT_KEYWORDS([macros lua])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --eval '%{lua: print(rpm.vercmp("1.0", "2.0"))}'
],
[0],
[-1
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua rpm isdefined])
AT_KEYWORDS([macros lua])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval '%{lua: print(rpm.isdefined("with"))}' \
--eval '%{lua: print(rpm.isdefined("nil"))}' \
@ -828,11 +828,11 @@ runroot rpm \
true false
false false
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua rpm split/unsplitargs])
AT_KEYWORDS([macros lua])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm \
--eval '%{lua: local a=rpm.splitargs("1 2 3");a[2]=" " .. a[2] .. " ";print(rpm.unsplitargs(a))}' \
| tr '\037' :
@ -840,22 +840,22 @@ runroot rpm \
[0],
[:1: : 2 : :3:
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua posix extensions])
AT_KEYWORDS([macros lua])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval '%{lua: posix.putenv("LUATEST=ok") print(posix.getenv("LUATEST"))}'
],
[0],
[ok
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua script exit behavior])
AT_KEYWORDS([macros lua])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval '%{lua: os.exit()}))}'
],
@ -863,11 +863,11 @@ runroot rpm \
[],
[error: lua script failed: [[string "<lua>"]]:1: exit not permitted in this context]
)
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua script redirect2null])
AT_KEYWORDS([macros lua])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval '%{lua: posix.redirect2null()}))}'
],
@ -875,11 +875,11 @@ runroot rpm \
[],
[error: lua script failed: [[string "<lua>"]]:1: redirect2null not permitted in this context]
)
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua library path])
AT_KEYWORDS([macros lua])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
f=$(run rpm --eval "%{_rpmconfigdir}/lua/foo.lua")
echo "bar = 'graak'" > ${f}
@ -890,12 +890,12 @@ rm -f ${f}
[0],
[graak
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua auto-print])
AT_KEYWORDS([macros lua])
RPMDB_INIT
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm \
--define 'foo() %{lua:return string.reverse(arg[1])}' \
--eval '%foo hello' \
@ -905,11 +905,11 @@ runroot rpm \
[olleh
1 2 3
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua rpm version objects])
AT_KEYWORDS([macros lua])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval '%{lua: v1 = rpm.ver("1:4.16-5"); print(v1, v1.e, v1.v, v1.r)}' \
--eval '%{lua: v1 = rpm.ver("4.16-1"); print(v1, v1.e, v1.v, v1.r)}' \
@ -922,11 +922,11 @@ runroot rpm \
4.16 nil 4.16 nil
false false true true
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua rpm io stream])
AT_KEYWORDS([macros lua])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--eval '%{lua: local f = rpm.open("zzz", "w+"); f:write("gggg"); print(f:seek("cur")); f:close()}' \
@ -938,22 +938,22 @@ runroot rpm \
gggg
2.0
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua functions in expressions])
AT_KEYWORDS([macros lua])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm \
--eval '%[lua:string.reverse("hello")]'
]],
[0],
[olleh
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([lua hooks])
AT_KEYWORDS([macros lua])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpm \
--eval '%{lua:
function regtest(n) for _,v in ipairs(n) do print(" "..type(v)..":"..v);end;end
@ -966,11 +966,11 @@ rpm.call("test", "foo", 6, 29 / 4)
[0],
[ string:foo number:6 number:7.25
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([%define + %undefine in nested levels 1])
AT_KEYWORDS([macros define undefine])
AT_CHECK([
RPMTEST_CHECK([
# basic %define in nested scoping level
runroot rpm \
--define '%foo() %{expand:%define xxx 1} %{echo:%xxx} %{expand:%undefine xxx} %{echo:%xxx}' \
@ -981,11 +981,11 @@ runroot rpm \
%xxx
. .
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([%define + %undefine in nested levels 2])
AT_KEYWORDS([macros define])
AT_CHECK([
RPMTEST_CHECK([
# %define macro once in a nested scope
runroot rpm \
--define '%foo() %{expand:%define xxx 1} %{echo:%xxx}' \
@ -997,11 +997,11 @@ runroot rpm \
. .
%xxx
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([%define + %undefine in nested levels 3])
AT_KEYWORDS([macros define])
AT_CHECK([
RPMTEST_CHECK([
AT_XFAIL_IF([test $RPM_XFAIL -ne 0])
# %define macro twice in a nested scope
runroot rpm \
@ -1015,11 +1015,11 @@ runroot rpm \
. .
%xxx
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([%define + %undefine in nested levels 4])
AT_KEYWORDS([macros define global])
AT_CHECK([
RPMTEST_CHECK([
AT_XFAIL_IF([test $RPM_XFAIL -ne 0])
# %define in a nested level covered by %global
runroot rpm \
@ -1037,11 +1037,11 @@ runroot rpm \
%xxx
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([%define in conditional macro])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--define 'dofoo() true'\
--eval '.%{!?foo: %define foo bar}.'\
@ -1055,11 +1055,11 @@ bar
true
bar
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([%verbose macro])
AT_KEYWORDS([macros verbose])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --eval '%{verbose}'
runroot rpm -v --eval '%{verbose}'
runroot rpm --eval '%{verbose:zzz}'
@ -1071,11 +1071,11 @@ runroot rpm -v --eval '%{verbose:zzz}'
zzz
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([%exists macro])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval "%{exists:/data}" \
--eval "%{exists:/zzz}" \
@ -1087,11 +1087,11 @@ runroot rpm \
],
[error: %exists: argument expected
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([%shescape macro])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--eval "%{shescape:foo's}"
],
@ -1099,11 +1099,11 @@ runroot rpm \
['foo'\''s'
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([macro with a line starting by "{"])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --macros "/data/macros.testfile" \
--eval "%first" --eval "%second"],
[0],
@ -1111,11 +1111,11 @@ runroot rpm --macros "/data/macros.testfile" \
macro_2
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([macro with %if-%endif])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpmspec -q --qf "%{summary}\n%{description}\n" /data/SPECS/iftest.spec
],
[0],
@ -1123,11 +1123,11 @@ runroot rpmspec -q --qf "%{summary}\n%{description}\n" /data/SPECS/iftest.spec
ccc0
ccc1
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([macro file errors])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
cat << EOF > macros.bad
%1 foo
@ -1147,11 +1147,11 @@ run rpm --macros "macros.bad" --eval "%foo"
[error: macros.bad: line 1: Macro %1 has illegal name (%define)
warning: macros.bad: line 8: Macro %bad needs whitespace before body
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([macro comments])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--macros /data/macros.testfile \
--eval "%{comment1}" \
@ -1166,11 +1166,11 @@ see
this
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([macro comments 2])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--macros /data/macros.testfile \
--eval "%{comment3}"
@ -1181,11 +1181,11 @@ read
' change this meaning
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([macro file empty lines])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
--macros /data/macros.testfile \
--eval "%{empty0}"
@ -1198,11 +1198,11 @@ thing
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([macro traceback])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
for o in "-v" ""; do
runroot rpm $o \
--define "err %{error:bad}" \
@ -1221,22 +1221,22 @@ done
xxx
error: bad
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([no space left on stdout])
AT_KEYWORDS([macros])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --eval 1 >/dev/full
],
[1],
[],
[Error writing to stdout: No space left on device
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmlua])
AT_KEYWORDS([lua])
AT_CHECK([
RPMTEST_CHECK([
runroot_other rpmlua /data/t1.lua a b
],
[0],
@ -1249,7 +1249,7 @@ b
],
[])
AT_CHECK([
RPMTEST_CHECK([
runroot_other rpmlua --opts=ot: /data/t1.lua -- -t1 a
],
[0],
@ -1261,7 +1261,7 @@ a
],
[])
AT_CHECK([
RPMTEST_CHECK([
runroot_other rpmlua -e "print(macros.basename('/some/thing'))"
],
[0],
@ -1269,7 +1269,7 @@ runroot_other rpmlua -e "print(macros.basename('/some/thing'))"
],
[])
AT_CHECK([
RPMTEST_CHECK([
runroot_other rpmlua -e "for i, v in ipairs({'true', 'false', 'grue'}) do print(rpm.execute('/bin/'..v)) end"
],
[0],
@ -1281,11 +1281,11 @@ nil No such file or directory 2.0
# This uses io.stderr:write() because the grue from the previous test
# appears to have eaten stdout of the forked child, or something.
AT_CHECK([
RPMTEST_CHECK([
runroot_other rpmlua -e 'pid = posix.fork(); if pid == 0 then a,b,c=rpm.redirect2null(-1); io.stderr:write(string.format("%s\t%s\t%s\n", a,b,c)) else posix.wait(pid) end'
],
[0],
[],
[nil Bad file descriptor 9.0
])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -2,7 +2,7 @@ AT_BANNER([RPM install/erase ordering])
AT_SETUP([basic install/erase order 1])
AT_KEYWORDS([install erase order])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -42,12 +42,12 @@ deptest-two-1.0-1.noarch
deptest-three-1.0-1.noarch
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# same as above but with weak dependencies
AT_SETUP([basic install/erase order 2])
AT_KEYWORDS([install erase order])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -87,12 +87,12 @@ deptest-two-1.0-1.noarch
deptest-three-1.0-1.noarch
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# same as above but with weak reverse dependencies
AT_SETUP([basic install/erase order 3])
AT_KEYWORDS([install erase order])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -132,4 +132,4 @@ deptest-two-1.0-1.noarch
deptest-three-1.0-1.noarch
],
[])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -5,18 +5,18 @@ AT_BANNER([RPM OpenPGP parsing])
# Test OpenPGP parsing
AT_SETUP([[Running tests for malformed OpenPGP packages]])
AT_KEYWORDS([[rpmkeys digest OpenPGP]])
AT_CHECK([[
RPMTEST_CHECK([[
../../rpmpgpcheck
]],0,)
AT_CLEANUP
RPMTEST_CLEANUP
# Test pgpPubkeyFingerprint
AT_SETUP([[Running tests for computing OpenPGP fingerprints]])
AT_KEYWORDS([[rpmkeys digest OpenPGP]])
# Note: the internal OpenPGP parser produces a warning when fed
# bad data. Don't force Sequoia to generate the same warning.
AT_CHECK([[
RPMTEST_CHECK([[
../../rpmpgppubkeyfingerprint 2>&1 | { grep -v 'warning: Unsupported version of key: '; true; }
]],0,[Exit code: 0
])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -397,7 +397,7 @@ ts.run(callback=ncb, data=cbd)
AT_SETUP([database iterators])
AT_KEYWORDS([python rpmdb])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -i \
--justdb --nodeps --ignorearch --ignoreos \
/data/RPMS/foo-1.0-1.noarch.rpm \
@ -490,12 +490,12 @@ hello(x86-32)
hi
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([database cookies])
AT_KEYWORDS([python rpmdb])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
],
[0],
[],
@ -515,7 +515,7 @@ open("dbcookie", "w+").write(c1)
],
[])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -i \
--justdb --nodeps --ignorearch --ignoreos \
/data/RPMS/foo-1.0-1.noarch.rpm \
@ -537,7 +537,7 @@ open("dbcookie", "w+").write(c1)
],
[])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm -i \
--justdb --nodeps --ignorearch --ignoreos \
--define "_transaction_color 3" \
@ -558,7 +558,7 @@ myprint(c1 != c2)
[True
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
RPMPY_TEST([dependency sets 1],[
ts = rpm.ts()

View File

@ -21,7 +21,7 @@ AT_BANNER([RPM queries])
# ------------------------------
AT_SETUP([rpm --qf -p *.i386.rpm])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
-q --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" \
@ -31,12 +31,12 @@ runroot rpm \
[hello-1.0-1.i386
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([rpm --qf -p *.src.rpm])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
-q --qf "%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" \
@ -46,12 +46,12 @@ runroot rpm \
[hello-1.0-1.i386
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([rpm -qp <glob>])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
-qp "/data/RPMS/hello-2.0-1.{i686,x86_64}.rpm"
@ -61,11 +61,11 @@ runroot rpm \
hello-2.0-1.x86_64
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -qp <glob fallback>])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cp "${RPMTEST}/data/RPMS/hello-1.0-1.i386.rpm" \
@ -78,11 +78,11 @@ runroot rpm \
[hello-1.0-1.i386
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -qp <notfound>])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
-qp /data/RPMS/hello-not-there-1.0-1.x86_64.rpm \
@ -95,11 +95,11 @@ runroot rpm \
error: open of /data/RPMS/hello-not-there-2.0-1.x86_64.rpm failed: No such file or directory
error: open of /data/RPMS/hello-not-there-3.0-1.x86_64.rpm failed: No such file or directory
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -qp <glob notfound>])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
-qp "/data/RPMS/hello-not-there-*.x86_64.rpm" \
@ -112,12 +112,12 @@ runroot rpm \
error: open of /data/RPMS/hello-not-there-1.0-1.x86_64.rpm failed: No such file or directory
error: open of /data/RPMS/hello-not-there-2.0-1.x86_64.rpm failed: No such file or directory
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([rpm -ql -p *.src.rpm])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
-ql \
@ -128,12 +128,12 @@ runroot rpm \
hello.spec
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([rpm -ql multiple *.rpm])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
-ql \
@ -147,11 +147,11 @@ hello.spec
/usr/share/doc/hello-1.0/FAQ
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -qp --dump])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
-qp --dump \
@ -165,12 +165,12 @@ runroot rpm \
/usr/share/doc/hello-2.0/README 39 908884468 d63fdc6c986106f57230f217d36b2395d83ecf491d2b7187af714dc8db9629e9 0100644 root root 0 1 0 X
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([rpmspec -q])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmspec \
-q --qf "%{name}" /data/SPECS/hello.spec
@ -178,12 +178,12 @@ runroot rpmspec \
[0],
[hello],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([rpm -ql -p *.i386.rpm])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
-ql \
@ -195,13 +195,13 @@ runroot rpm \
/usr/share/doc/hello-1.0/FAQ
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test query on manifest
AT_SETUP([rpm -qp <manifest>])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cat << EOF > ${RPMTEST}/query.mft
/data/RPMS/hello-1.0-1.i386.rpm
@ -216,14 +216,14 @@ hello-1.0-1
foo-1.0-1
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Try to check "scripts"
# * Gets rpmpopt-$(VERSION) involved
AT_SETUP([rpm -q --scripts -p *.i386.rpm])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
-q --scripts \
@ -236,7 +236,7 @@ preuninstall program: /bin/sh
postuninstall program: /bin/sh
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
@ -246,7 +246,7 @@ AT_CLEANUP
AT_SETUP([rpm -q on installed package])
AT_KEYWORDS([rpmdb install query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
@ -256,7 +256,7 @@ runroot rpm \
[0])
# check common NVRA combinations
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
-q hello hello-1.0 hello-1.0-1 \
hello.ppc64 hello-1.0.ppc64 hello-1.0-1.ppc64
@ -272,7 +272,7 @@ hello-1.0-1.ppc64
[ignore])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm \
-ql hello
],
@ -283,13 +283,13 @@ runroot rpm \
],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# query a package by a file
AT_SETUP([rpm -qf])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--nodeps \
@ -302,11 +302,11 @@ runroot rpm \
[hello-1.0-1.i386
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -qf on non-installed file])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--nodeps \
@ -320,11 +320,11 @@ runroot rpm \
[],
[error: file /usr/share/doc/hello-1.0/FAQ: No such file or directory
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm -q --path on non-installed file])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--nodeps \
@ -338,12 +338,12 @@ runroot rpm \
[hello-1.0-1.i386
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([integer array query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="[[%{filemodes}\n]]" \
@ -355,12 +355,12 @@ runroot rpm \
33188
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([formatted filesbypkg query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="[[%-10{=NAME} %{FILENAMES}\n]]" \
@ -372,12 +372,12 @@ hello /usr/share/doc/hello-1.0
hello /usr/share/doc/hello-1.0/FAQ
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([hex formatted integer array extension query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="[[%5{longfilesizes:hex}\n]]" \
@ -389,12 +389,12 @@ runroot rpm \
24
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([base64 extension query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="%{pkgid:base64}" \
@ -404,11 +404,11 @@ runroot rpm \
[qt8W635v5FKy1pILrW+0uw==
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([pgpsig extension query])
AT_KEYWORDS([query signature])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="%{rsaheader:pgpsig}" \
@ -418,12 +418,12 @@ runroot rpm \
[RSA/SHA256, Thu Apr 6 13:02:33 2017, Key ID 4344591e1964c5fc],
[warning: /data/RPMS/hello-2.0-1.x86_64-signed.rpm: Header V4 RSA/SHA256 Signature, key ID 1964c5fc: NOKEY
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([integer array perms format query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="[[%{filemodes:perms}\n]]" \
@ -435,12 +435,12 @@ drwxr-xr-x
-rw-r--r--
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([string array query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="[[%{basenames} ]]" \
@ -449,12 +449,12 @@ runroot rpm \
[0],
[hello hello-1.0 FAQ ],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([empty string array query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="[[%{basenames}]]" \
@ -463,12 +463,12 @@ runroot rpm \
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([empty string array extension array format])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="[[%{filenames}]]" \
@ -477,12 +477,12 @@ runroot rpm \
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([empty string array extension query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="%{filenames}" \
@ -491,12 +491,12 @@ runroot rpm \
[0],
[(none)],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([different sizes arrays query 1])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="[[%{basenames} %{changelogname}]\n]" \
@ -506,14 +506,14 @@ runroot rpm \
[],
[error: incorrect format: array iterator used with different sized arrays
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# This is succeeds because there happens to be exactly one changelog entry
# so the size matches with name.
AT_SETUP([different sizes arrays query 2])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="[[%{name} %{changelogtime}]\n]" \
@ -523,12 +523,12 @@ runroot rpm \
[hello 908877600
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([different sizes arrays query 3])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="[[%{name} %{basenames}]\n]" \
@ -538,12 +538,12 @@ runroot rpm \
[],
[error: incorrect format: array iterator used with different sized arrays
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([different sizes arrays query 4])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="[[%{=name} %{basenames}\n]]" \
@ -556,11 +556,11 @@ hello FAQ
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([non-existent string tag])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="%{vendor}" \
@ -569,12 +569,12 @@ runroot rpm \
[0],
[(none)],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([non-existent integer tag query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="%{installcolor}" \
@ -583,12 +583,12 @@ runroot rpm \
[0],
[(none)],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([conditional queryformat])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="%|name?{%{name}}:{no}| %|installtime?{%{installtime}}:{(not installed)}|" \
@ -597,12 +597,12 @@ runroot rpm \
[0],
[foo (not installed)],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([invalid tag query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="%{notag}" \
@ -612,12 +612,12 @@ runroot rpm \
[],
[error: incorrect format: unknown tag: "notag"
])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([invalid data for format query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="%{name:depflags}" \
@ -626,12 +626,12 @@ runroot rpm \
[0],
[(not a number)],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([invalid format width query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat="%ss{size}" \
@ -641,11 +641,11 @@ runroot rpm \
[],
[error: incorrect format: invalid field width
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([xml format])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -qp --xml data/RPMS/hello-2.0-1.x86_64.rpm
],
@ -941,11 +941,11 @@ runroot rpm -qp --xml data/RPMS/hello-2.0-1.x86_64.rpm
</rpmHeader>
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([query file attribute filtering])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild -bb --quiet \
/data/SPECS/vattrtest.spec
@ -995,12 +995,12 @@ done
/opt/vattrtest/l
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([formatting name humansi, humaniec])
AT_KEYWORDS([query, humansi, humaniec])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat '%{SIZE:humansi} %{SIZE:humaniec}\n' \
@ -1018,12 +1018,12 @@ runroot rpm \
355 355
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([incomplete escape sequence for format query])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm \
--queryformat='%{NAME}\n\' \
@ -1034,13 +1034,13 @@ runroot rpm \
[error: incorrect format: escaped char expected after \
],
)
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([query format iteration])
AT_KEYWORDS([query])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
runroot rpmspec -q --qf "[[%{*:tagnum}\n]]" --srpm /data/SPECS/mini.spec
],
[0],
@ -1057,7 +1057,7 @@ runroot rpmspec -q --qf "[[%{*:tagnum}\n]]" --srpm /data/SPECS/mini.spec
],
[])
AT_CHECK([
RPMTEST_CHECK([
runroot rpmspec -q --qf "[[%{*:tagname}\n]]" --srpm /data/SPECS/mini.spec
],
[0],
@ -1073,4 +1073,4 @@ Os
Arch
],
[])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -3,7 +3,7 @@ AT_BANNER([RPM file replacement])
AT_SETUP([upgrade to/from regular file])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${tf}" "${tf}".rpm*
@ -33,7 +33,7 @@ bar
foo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade regular file to/from link])
AT_KEYWORDS([install])
@ -52,7 +52,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/replacetest.spec
# upgrade regular file to/from broken link
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -71,7 +71,7 @@ foo
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -90,11 +90,11 @@ stuff
foo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade broken link to broken link])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -121,11 +121,11 @@ readlink "${tf}"
stuff
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade file link to file link])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -152,11 +152,11 @@ readlink "${tf}"
goo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade directory link to directory link])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -183,11 +183,11 @@ readlink "${tf}"
zoo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade regular file to directory])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -212,11 +212,11 @@ test -d "${tf}"
[foo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade broken link to directory])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -241,11 +241,11 @@ test -d "${tf}"
[other
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade file link to directory])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -270,11 +270,11 @@ test -d "${tf}"
[goo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade directory link to directory])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -299,11 +299,11 @@ runroot rpm -U /build/RPMS/noarch/replacetest-2.0-1.noarch.rpm
],
[ file /opt/foo from install of replacetest-2.0-1.noarch conflicts with file from package replacetest-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade empty directory to empty directory])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -325,11 +325,11 @@ test -d "${tf}"
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade empty directory to regular file])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -352,11 +352,11 @@ test -d "${tf}" && runroot rpm -U /build/RPMS/noarch/replacetest-2.0-1.noarch.rp
[],
[ file /opt/foo from install of replacetest-2.0-1.noarch conflicts with file from package replacetest-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade locally symlinked directory])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -386,11 +386,11 @@ test -L "${tf}" && test -d "${tf}"
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade invalid locally symlinked directory])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -416,7 +416,7 @@ test -d "${tf}"
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade empty directory to broken link])
AT_KEYWORDS([install])
@ -434,7 +434,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/replacetest.spec
# upgrade empty directory to broken link
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -448,7 +448,7 @@ test -d "${tf}" && runroot rpm -U /build/RPMS/noarch/replacetest-2.0-1.noarch.rp
])
# upgrade empty directory to file link
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -460,7 +460,7 @@ test -d "${tf}" && runroot rpm -U /build/RPMS/noarch/replacetest-2.0-1.noarch.rp
[],
[ file /opt/foo from install of replacetest-2.0-1.noarch conflicts with file from package replacetest-1.0-1.noarch
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade empty directory to file link])
AT_KEYWORDS([install])
@ -478,7 +478,7 @@ runroot rpmbuild --quiet -bb \
/data/SPECS/replacetest.spec
# upgrade removed empty directory to file link
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -493,7 +493,7 @@ readlink "${tf}"
[])
# upgrade replaced empty directory to file link
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -506,11 +506,11 @@ readlink "${tf}"
[goo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([upgrade empty directory to file link with pretrans])
AT_KEYWORDS([install])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -535,4 +535,4 @@ readlink "${tf}"
[goo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -4,7 +4,7 @@ AT_BANNER([RPM scriptlets])
AT_SETUP([basic script failures 1])
AT_KEYWORDS([script])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/fakeshell.spec
@ -143,13 +143,13 @@ POSTUNTRANS
scriptfail-2.0-1.noarch
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
#
AT_SETUP([basic scripts and arguments])
AT_KEYWORDS([verify])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/fakeshell.spec
@ -184,11 +184,11 @@ scripts-1.0-2 POSTUN 0
scripts-1.0-2 POSTUNTRANS 0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([basic trigger scripts and arguments])
AT_KEYWORDS([trigger script])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/fakeshell.spec
@ -244,11 +244,11 @@ triggers-1.0-2 TRIGGERPOSTUN 1 0
scripts-1.0-2 POSTUNTRANS 0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([basic file trigger scripts])
AT_KEYWORDS([file trigger script])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/fakeshell.spec
@ -345,11 +345,11 @@ transfiletriggerpostun(/foo*):
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([basic file triggers 2])
AT_KEYWORDS([filetrigger script])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/fakeshell.spec
@ -389,5 +389,5 @@ ERASE:
36
],
[])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -6,7 +6,7 @@ AT_BANNER([RPM signatures and digests])
# Test pre-built package verification
AT_SETUP([rpmkeys -Kv <unsigned> 1])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmkeys -Kv /data/RPMS/hello-2.0-1.x86_64.rpm /data/RPMS/hello-1.0-1.i386.rpm
@ -22,24 +22,24 @@ runroot rpmkeys -Kv /data/RPMS/hello-2.0-1.x86_64.rpm /data/RPMS/hello-1.0-1.i38
MD5 digest: OK
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test rpmkeys write errors
AT_SETUP([[rpmkeys -K no space left on stdout]])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT[
runroot rpmkeys -Kv /data/RPMS/hello-2.0-1.x86_64.rpm /data/RPMS/hello-1.0-1.i386.rpm >/dev/full
]],255,,[[Error writing to log: No space left on device
]])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmkeys -Kv <reconstructed> 1])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cp "${RPMTEST}"/data/misc/hello.intro "${RPMTEST}"/data/misc/hello.payload .
@ -61,13 +61,13 @@ runroot rpmkeys -Kv /tmp/hello-c.rpm /tmp/hello-uc.rpm
MD5 digest: BAD (Expected 055607c4dee6464b9415ae726e7d81a7 != 839d24c30e5188e0b83599fbe3865919)
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test corrupted package verification (corrupted signature)
AT_SETUP([rpmkeys -Kv <corrupted unsigned> 1])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64.rpm"
@ -85,12 +85,12 @@ runroot rpmkeys -Kv /tmp/${pkg}
MD5 digest: BAD (Expected 007ca1d8b35cca02a1854ba301c5432e != 137ca1d8b35cca02a1854ba301c5432e)
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test corrupted package verification (corrupted header)
AT_SETUP([rpmkeys -Kv <corrupted unsigned> 2])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64.rpm"
@ -107,13 +107,13 @@ runroot rpmkeys -Kv /tmp/${pkg}
MD5 digest: BAD (Expected 137ca1d8b35cca02a1854ba301c5432e != de65519eeb4ab52eb076ec054d42e34e)
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test corrupted package verification (corrupted payload)
AT_SETUP([rpmkeys -Kv <corrupted unsigned> 3])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64.rpm"
@ -131,13 +131,13 @@ runroot rpmkeys -Kv /tmp/${pkg}
MD5 digest: BAD (Expected 137ca1d8b35cca02a1854ba301c5432e != d662cd0d81601a7107312684ad1ddf38)
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test corrupted package verification (corrupted header)
AT_SETUP([rpmkeys -Kv <corrupted unsigned> 4])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64.rpm"
@ -151,12 +151,12 @@ runroot rpmkeys -Kv /tmp/${pkg}
],
[error: /tmp/hello-2.0-1.x86_64.rpm: tag[[13]]: BAD, tag 1028 type 0 offset 116 count 5 len 7]
)
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Reproducably build and verify a package
AT_SETUP([rpmkeys -Kv <unsigned> 2])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild -bb --quiet \
@ -188,7 +188,7 @@ PAYLOADDIGESTALT: 116ce41ebb72f1877cda3d7dedaf5b78770e202d6389ade4e415d78548d703
MD5 digest: OK
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Import a public RSA key
@ -202,7 +202,7 @@ AT_CLEANUP
# when the key is imported; other implementations should not do this.
AT_SETUP([rpmkeys --import rsa (rpmdb)])
AT_KEYWORDS([rpmkeys import])
AT_CHECK_UNQUOTED([
RPMTEST_CHECK_UNQUOTED([
RPMDB_INIT
runroot rpmkeys --import /data/keys/rpm.org-rsa-2048-test.pub
@ -262,11 +262,11 @@ gpg(4344591e1964c5fc) = 4:4344591e1964c5fc-58e63918\
fi`
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmkeys --import rsa (fs)])
AT_KEYWORDS([rpmkeys import])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot_other mkdir -p /tmp/kr
@ -308,7 +308,7 @@ UNW2iqnN3BA7guhOv6OMiROF1+I7Q5nWT63mQC7IgQ==
-----END PGP PUBLIC KEY BLOCK-----
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# -----------------------------------------
# Check a package signed with a subkey
@ -318,7 +318,7 @@ AT_CLEANUP
AT_SETUP([rpmkeys --import, signed with a good subkey])
AT_KEYWORDS([rpmkeys digest signature])
AT_SKIP_IF([test x$PGP = xinternal])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
echo Checking package before importing key:
@ -375,7 +375,7 @@ Checking package after importing key, no signature:
0
]],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# -----------------------------------------
# Check a package signed with an expired subkey
@ -383,7 +383,7 @@ AT_CLEANUP
AT_SETUP([rpmkeys --import, signed with an expired subkey])
AT_KEYWORDS([rpmkeys digest signature])
AT_SKIP_IF([test x$PGP = xinternal])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
echo Checking package before importing key:
@ -450,7 +450,7 @@ Checking package after importing key, no signature:
0
]],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# -----------------------------------------
# Check a package signed with a revoked subkey
@ -458,7 +458,7 @@ AT_CLEANUP
AT_SETUP([rpmkeys --import, signed with a revoked subkey])
AT_KEYWORDS([rpmkeys digest signature])
AT_SKIP_IF([test x$PGP = xinternal])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
echo Checking package before importing key:
@ -521,7 +521,7 @@ Checking package after importing key, no signature:
0
]],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmkeys --import invalid keys])
AT_KEYWORDS([rpmkeys import])
@ -534,7 +534,7 @@ RPMDB_INIT
# check for validity is when the key is used, not when it is imported.
# The internal OpenPGP implementation checks for validity when the key
# is imported; other implementations should not do this.
AT_CHECK_UNQUOTED([
RPMTEST_CHECK_UNQUOTED([
runroot rpmkeys --quiet --import /data/keys/CVE-2021-3521-badbind.asc
echo exit code: $? >&2
],
@ -549,7 +549,7 @@ else
fi`]
)
AT_CHECK_UNQUOTED([
RPMTEST_CHECK_UNQUOTED([
runroot rpmkeys --quiet --import /data/keys/CVE-2021-3521-nosubsig.asc
echo exit code: $? >&2
],
@ -564,7 +564,7 @@ else
fi`]
)
AT_CHECK_UNQUOTED([
RPMTEST_CHECK_UNQUOTED([
runroot rpmkeys --quiet --import /data/keys/CVE-2021-3521-nosubsig-last.asc
echo exit code: $? >&2
],
@ -578,7 +578,7 @@ else
echo exit code: 0
fi`]
)
AT_CLEANUP
RPMTEST_CLEANUP
# -----------------------------------------
# Import a key where the binding signature's creation time is
@ -590,7 +590,7 @@ AT_CLEANUP
AT_SETUP([rpmkeys --import different-creation-times])
AT_KEYWORDS([rpmkeys import])
RPMDB_INIT
AT_CHECK([
RPMTEST_CHECK([
runroot rpmkeys --import /data/keys/different-creation-times.asc
runroot rpm -qi gpg-pubkey-62837bea-62553e62|grep -v Date|grep -v Version:
runroot rpm -q --provides gpg-pubkey
@ -638,14 +638,14 @@ gpg(62837bea) = 4:a72b7d4f62837bea-62553e62
gpg(a72b7d4f62837bea) = 4:a72b7d4f62837bea-62553e62
]],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# The internal OpenPGP parser rejects the key. The Sequoia parser
# just ignores the invalid components and imports the rest. This test
# checks the behavior of the internal parser.
AT_SETUP([rpmkeys type confusion])
AT_SKIP_IF([test x$PGP != xinternal])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmkeys --import /data/keys/type-confusion.asc
@ -654,13 +654,13 @@ runroot rpmkeys --import /data/keys/type-confusion.asc
[],
[error: /data/keys/type-confusion.asc: key 1 import failed.]
)
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test pre-built package verification
AT_SETUP([rpmkeys -K <signed> 1])
AT_KEYWORDS([rpmkeys digest signature])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmkeys -K /data/RPMS/hello-2.0-1.x86_64-signed.rpm
@ -672,13 +672,13 @@ runroot rpmkeys -K /data/RPMS/hello-2.0-1.x86_64-signed.rpm
/data/RPMS/hello-2.0-1.x86_64-signed.rpm: digests signatures OK
]],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test pre-built package verification
AT_SETUP([rpmkeys -Kv <signed> 1])
AT_KEYWORDS([rpmkeys digest signature])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmkeys -Kv /data/RPMS/hello-2.0-1.x86_64-v3-signed.rpm; echo $?
@ -747,13 +747,13 @@ runroot rpmkeys -Kv --nosignature /data/RPMS/hello-2.0-1.x86_64-signed.rpm; echo
0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test pre-built corrupted package verification (corrupted signature)
AT_SETUP([rpmkeys -Kv <corrupted signed> 1])
AT_KEYWORDS([rpmkeys digest signature])
AT_CHECK_UNQUOTED([
RPMTEST_CHECK_UNQUOTED([
RPMDB_INIT
pkg="hello-2.0-1.x86_64-signed.rpm"
@ -796,13 +796,13 @@ fi`
MD5 digest: OK
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test pre-built corrupted package verification (corrupted header)
AT_SETUP([rpmkeys -Kv <corrupted signed> 2.1])
AT_KEYWORDS([rpmkeys digest signature])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64-v3-signed.rpm"
@ -831,12 +831,12 @@ runroot rpmkeys -Kv /tmp/${pkg}
MD5 digest: BAD (Expected 137ca1d8b35cca02a1854ba301c5432e != b2981e215576c2142676d9b1e0902075)
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test pre-built corrupted package verification (corrupted header)
AT_SETUP([rpmkeys -Kv <corrupted signed> 2.2])
AT_KEYWORDS([rpmkeys digest signature])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64-signed.rpm"
@ -865,13 +865,13 @@ runroot rpmkeys -Kv /tmp/${pkg}
MD5 digest: BAD (Expected 137ca1d8b35cca02a1854ba301c5432e != de65519eeb4ab52eb076ec054d42e34e)
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test pre-built corrupted package verification (corrupted payload)
AT_SETUP([rpmkeys -Kv <corrupted signed> 3])
AT_KEYWORDS([rpmkeys digest signature])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64-signed.rpm"
@ -903,13 +903,13 @@ runroot rpmkeys -Kv /tmp/${pkg}
MD5 digest: BAD (Expected 137ca1d8b35cca02a1854ba301c5432e != d662cd0d81601a7107312684ad1ddf38)
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test pre-built corrupted package verification (corrupted payload)
AT_SETUP([rpmkeys -Kv <corrupted signed> 4])
AT_KEYWORDS([rpmkeys digest signature])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT[(
dorpm () {
@ -942,7 +942,7 @@ dorpm -Kv
MD5 digest: OK
]],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test --addsign
@ -954,7 +954,7 @@ gpg2 --import ${RPMTEST}/data/keys/*.secret
export GPG_TTY=""
# rpmsign --addsign --rpmv3 <unsigned>
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cp "${RPMTEST}"/data/RPMS/hello-2.0-1.x86_64.rpm "${RPMTEST}"/tmp/
@ -983,7 +983,7 @@ POST-DELSIGN
[])
# rpmsign --addsign <unsigned>
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cp "${RPMTEST}"/data/RPMS/hello-2.0-1.x86_64.rpm "${RPMTEST}"/tmp/
@ -1010,7 +1010,7 @@ POST-DELSIGN
[])
# test --delsign restores the old package bit-per-bit
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
ORIG="${RPMTEST}/data/RPMS/hello-2.0-1.x86_64.rpm"
@ -1029,7 +1029,7 @@ cmp -s ${ORIG} ${NEW}; echo $?
[])
# rpmsign --addsign <signed>
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cp "${RPMTEST}"/data/RPMS/hello-2.0-1.x86_64-signed.rpm "${RPMTEST}"/tmp/
@ -1040,7 +1040,7 @@ run rpmsign --key-id 1964C5FC --digest-algo sha256 --addsign "${RPMTEST}"/tmp/he
[])
# rpmsign --addsign <corrupted>
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
pkg="hello-2.0-1.x86_64.rpm"
@ -1065,13 +1065,13 @@ echo $?
],
[])
gpgconf --kill gpg-agent
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# Test --delsign
AT_SETUP([rpmsign --delsign])
AT_KEYWORDS([rpmsign signature])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
cp "${RPMTEST}"/data/RPMS/hello-2.0-1.x86_64-signed.rpm "${RPMTEST}"/tmp/
@ -1090,4 +1090,4 @@ POST-DELSIGN
/tmp/hello-2.0-1.x86_64-signed.rpm:
],
[])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -11,7 +11,7 @@ AT_BANNER([RPM Spec Tool])
AT_SETUP([rpmspec --query Requires])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex}\n]' \
/data/SPECS/test-parsebits.spec
@ -32,11 +32,11 @@ good.8.1 8c
good.9.1 22
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(,)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(,): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -47,11 +47,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(,): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(;)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(;): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -62,11 +62,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(;): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(junk)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(junk): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -77,11 +77,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(junk): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(pre,junk)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(pre,junk): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -92,11 +92,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(pre,junk): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(junk,pre)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(junk,pre): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -107,11 +107,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(junk,pre): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(,pre)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(,pre): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -122,11 +122,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(,pre): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(pre,)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(pre,): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -137,11 +137,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(pre,): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(pre,,postun)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(pre,,postun): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -152,11 +152,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(pre,,postun): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(pre,,junk)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(pre,,junk): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -167,11 +167,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(pre,,junk): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(;pre)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(;pre): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -182,11 +182,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(;pre): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(pre;)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(pre;): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -197,11 +197,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(pre;): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(pre;postun)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(pre;postun): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -212,11 +212,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(pre;postun): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --query Requires(pre;junk)])
AT_KEYWORDS([rpmspec query])
AT_CHECK([[
RPMTEST_CHECK([[
runroot rpmspec --query \
--define 'extra Requires(pre;junk): bad' \
--qf '[%{REQUIRENAME} %{REQUIREFLAGS:hex} %{REQUIREVERSION}\n]' \
@ -227,11 +227,11 @@ runroot rpmspec --query \
[error: line 9: Bad Requirename: qualifiers: Requires(pre;junk): bad
error: query of specfile /data/SPECS/test-parsebits.spec failed, can't parse
])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --parse])
AT_KEYWORDS([rpmspec])
AT_CHECK([runroot rpmspec --parse /data/SPECS/foo.spec],
RPMTEST_CHECK([runroot rpmspec --parse /data/SPECS/foo.spec],
[0],
[
@ -268,11 +268,11 @@ foo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --srpm provides])
AT_KEYWORDS([rpmspec])
AT_CHECK([
RPMTEST_CHECK([
runroot rpmspec -q --srpm --provides /data/SPECS/foo.spec
runroot rpmspec -q --srpm --provides --with bus /data/SPECS/foo.spec
],
@ -284,11 +284,11 @@ foo-sub = 1.0-1
foo-bus = 1.0-1
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmspec --parse])
AT_KEYWORDS([rpmspec])
AT_CHECK([
RPMTEST_CHECK([
RPMTEST_SETUP
# ensure the macros expand to expected values
@ -356,4 +356,4 @@ make DESTDIR=$RPM_BUILD_ROOT install
- create.
]],
[])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -3,10 +3,10 @@
m4_define([RPMVERCMP],[
AT_SETUP([rpmvercmp($1, $2) = $3])
AT_KEYWORDS([vercmp])
AT_CHECK([
RPMTEST_CHECK([
runroot rpm --eval '%{lua: print(rpm.vercmp("$1", "$2"))}'], [0], [$3
], [])
AT_CLEANUP
RPMTEST_CLEANUP
])
AT_BANNER([RPM version comparison])

View File

@ -6,7 +6,7 @@ AT_BANNER([RPM verification])
#
AT_SETUP([dependency problems])
AT_KEYWORDS([verify])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb \
@ -22,14 +22,14 @@ runroot rpm -Va --nofiles
deptest-two is needed by (installed) deptest-one-1.0-1.noarch
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Test file verify when no errors expected.
# Ignore dependencies here as we're not testing for them, and
# --nogroup --nouser is required when running tests as non-root.
AT_SETUP([files with no problems])
AT_KEYWORDS([verify])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --nodeps --noscripts --ignorearch --ignoreos \
@ -39,12 +39,12 @@ runroot rpm -Va --nodeps ${VERIFYOPTS}
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Test file verify when no errors expected in verbose mode.
AT_SETUP([files with no problems in verbose mode])
AT_KEYWORDS([verify])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --nodeps --noscripts --ignorearch --ignoreos \
@ -57,12 +57,12 @@ runroot rpm -Vva --nodeps ${VERIFYOPTS}
......... d /usr/share/doc/hello-1.0/FAQ
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Test file verify when no errors expected in verbose mode.
AT_SETUP([directory replaced with a directory symlink])
AT_KEYWORDS([verify])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -87,12 +87,12 @@ runroot rpm -Vv replacetest
......... /opt/zoo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([directory replaced with an invalid directory symlink])
AT_KEYWORDS([verify])
AT_SKIP_IF([test `id -u` != 0 ])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${RPMTEST}"/opt/*
@ -116,12 +116,12 @@ runroot rpm -Vv replacetest
......... /opt/zoo
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Test file verify after mutilating the files a bit.
AT_SETUP([verify from db, with problems present])
AT_KEYWORDS([verify])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --nodeps --noscripts --ignorearch --ignoreos \
@ -137,12 +137,12 @@ runroot rpm -Va --nodeps ${VERIFYOPTS}
missing d /usr/share/doc/hello-1.0/FAQ
],
[])
AT_CLEANUP
RPMTEST_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([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --nodeps --noscripts --ignorearch --ignoreos \
@ -158,11 +158,11 @@ runroot rpm -Vp --nodeps ${VERIFYOPTS} /data/RPMS/hello-1.0-1.i386.rpm
missing d /usr/share/doc/hello-1.0/FAQ
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([verify file attribute filtering])
AT_KEYWORDS([query])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild -bb --quiet \
@ -216,13 +216,13 @@ done
......... l /opt/vattrtest/l
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# Test verify script success & failure behavior
# Ignoring stderr spew for now
AT_SETUP([verifyscript failure])
AT_KEYWORDS([verify])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/verifyscript.spec
@ -233,11 +233,11 @@ runroot rpm -V --nodeps verifyscript
[1],
[],
[ignore])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([verifyscript success])
AT_KEYWORDS([verify])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/verifyscript.spec
@ -248,13 +248,13 @@ runroot rpm -V --nodeps verifyscript
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
# shared file timestamp behavior
AT_SETUP([shared file timestamp behavior])
AT_KEYWORDS([verify])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
# create packages sharing a file but with different timestamp
@ -275,7 +275,7 @@ runroot rpm -Va ${VERIFYOPTS}
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
# ------------------------------
AT_SETUP([minimize writes (files)])
@ -298,7 +298,7 @@ for v in "3.0" "4.0"; do
/data/SPECS/replacetest.spec
done
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${tf}"*
@ -346,7 +346,7 @@ fox
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${tf}"*
@ -401,7 +401,7 @@ fox
fox
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([minimize writes (hardlinks)])
AT_KEYWORDS([upgrade verify min_writes])
@ -409,7 +409,7 @@ RPMDB_INIT
for v in "0" "1"; do
runroot rpmbuild --quiet -bb --define "ver ${v}" /data/SPECS/hlbreak.spec
done
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --define "_minimize_writes 1" /build/RPMS/noarch/hlbreak-0-0.noarch.rpm
runroot rpm -Vav ${VERIFYOPTS}
@ -422,7 +422,7 @@ runroot rpm -Vav ${VERIFYOPTS}
......... /opt/file2
],
)
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([minimize writes (symlinks)])
@ -444,7 +444,7 @@ for v in "3.0" "4.0"; do
/data/SPECS/replacetest.spec
done
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${tf}"*
@ -489,7 +489,7 @@ fox
],
[])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${tf}" "${tf}".rpm*
@ -541,11 +541,11 @@ fox
fox
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([minimize writes (SUID files)])
AT_KEYWORDS([upgrade verify min_writes])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
tf="${RPMTEST}"/opt/foo
rm -rf "${tf}" "${tf}".rpm*
@ -575,12 +575,12 @@ runroot rpm -Va ${VERIFYOPTS} replacetest
[0],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([verify empty/no capabilities 1])
AT_KEYWORDS([verify])
AT_SKIP_IF([$CAP_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --nocaps --ignoreos \
@ -593,13 +593,13 @@ runroot rpm -Va ${VERIFYOPTS}
........P /a/emptyCaps2
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([verify empty/no capabilities 2])
AT_KEYWORDS([verify])
AT_SKIP_IF([$CAP_DISABLED])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --nocaps --nodeps --noscripts --ignorearch --ignoreos \
@ -610,11 +610,11 @@ runroot rpm -Va ${VERIFYOPTS} --nodeps | grep "/bin/hello"
[1],
[],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpm --restore])
AT_KEYWORDS([verify restore])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpm -U --nodeps --noscripts --ignorearch --ignoreos \
@ -630,11 +630,11 @@ runroot rpm -Va --nodeps ${VERIFYOPTS}
.......T. d /usr/share/doc/hello-1.0/FAQ
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([test for %verify in %files])
AT_KEYWORDS([verify])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmbuild --quiet -bb /data/SPECS/verifyfiles.spec
@ -647,4 +647,4 @@ runroot rpm -Vv ${VERIFYOPTS} verifyfiles
......... /test-verify2
],
[])
AT_CLEANUP
RPMTEST_CLEANUP

View File

@ -2,7 +2,7 @@ AT_BANNER([RPM signature/digest verifylevel])
AT_SETUP([rpmkeys -K <unsigned 1> verifylevel])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
for lvl in none digest signature all; do
@ -70,11 +70,11 @@ LEVEL all
0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmkeys -K <unsigned 2> verifylevel])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
nomd5="0x20000"
@ -142,11 +142,11 @@ nohdr
1
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmkeys -K <signed 1> verifylevel])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
for lvl in none digest signature all; do
@ -214,11 +214,11 @@ LEVEL all
0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmkeys -K <signed 2> verifylevel])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
runroot rpmkeys --import /data/keys/rpm.org-rsa-2048-test.pub
@ -287,11 +287,11 @@ LEVEL all
0
],
[])
AT_CLEANUP
RPMTEST_CLEANUP
AT_SETUP([rpmkeys -K <signed 3> verifylevel])
AT_KEYWORDS([rpmkeys digest])
AT_CHECK([
RPMTEST_CHECK([
RPMDB_INIT
nomd5="0x20000"
@ -355,4 +355,4 @@ nosig
1
],
[])
AT_CLEANUP
RPMTEST_CLEANUP