Verify user/group in tests when possible
Take advantage of root(less) aware $VERIFYOPTS added in commit
fb040f16ec
.
This commit is contained in:
parent
f4c6fc4c17
commit
760eb86380
|
@ -34,7 +34,7 @@ RPMDB_INIT
|
|||
|
||||
runroot rpm -U --nodeps --noscripts --ignorearch --ignoreos \
|
||||
/data/RPMS/hello-1.0-1.i386.rpm
|
||||
runroot rpm -Va --nodeps --nouser --nogroup
|
||||
runroot rpm -Va --nodeps ${VERIFYOPTS}
|
||||
],
|
||||
[0],
|
||||
[],
|
||||
|
@ -49,7 +49,7 @@ RPMDB_INIT
|
|||
|
||||
runroot rpm -U --nodeps --noscripts --ignorearch --ignoreos \
|
||||
/data/RPMS/hello-1.0-1.i386.rpm
|
||||
runroot rpm -Vva --nodeps --nouser --nogroup
|
||||
runroot rpm -Vva --nodeps ${VERIFYOPTS}
|
||||
],
|
||||
[0],
|
||||
[......... /usr/local/bin/hello
|
||||
|
@ -130,7 +130,7 @@ rm -f "${RPMTEST}"/usr/share/doc/hello-1.0/FAQ
|
|||
chmod u-x "${RPMTEST}"/usr/local/bin/hello
|
||||
dd if=/dev/zero of="${RPMTEST}"/usr/local/bin/hello \
|
||||
conv=notrunc bs=1 seek=5 count=6 2> /dev/null
|
||||
runroot rpm -Va --nodeps --nouser --nogroup
|
||||
runroot rpm -Va --nodeps ${VERIFYOPTS}
|
||||
],
|
||||
[1],
|
||||
[.M5....T. /usr/local/bin/hello
|
||||
|
@ -151,7 +151,7 @@ rm -f "${RPMTEST}"/usr/share/doc/hello-1.0/FAQ
|
|||
chmod u-x "${RPMTEST}"/usr/local/bin/hello
|
||||
dd if=/dev/zero of="${RPMTEST}"/usr/local/bin/hello \
|
||||
conv=notrunc bs=1 seek=5 count=6 2> /dev/null
|
||||
runroot rpm -Vp --nodeps --nouser --nogroup /data/RPMS/hello-1.0-1.i386.rpm
|
||||
runroot rpm -Vp --nodeps ${VERIFYOPTS} /data/RPMS/hello-1.0-1.i386.rpm
|
||||
],
|
||||
[1],
|
||||
[.M5....T. /usr/local/bin/hello
|
||||
|
@ -172,7 +172,7 @@ runroot rpm -U /build/RPMS/noarch/vattrtest-1.0-1.noarch.rpm
|
|||
runroot_other touch /opt/vattrtest/g
|
||||
runroot_other chmod 644 /opt/vattrtest/g
|
||||
|
||||
cmd="rpm -Vv --nouser --nogroup"
|
||||
cmd="rpm -Vv ${VERIFYOPTS}"
|
||||
for filter in --noconfig --noghost --noartifact -A -c -d -L; do
|
||||
echo ${filter}
|
||||
runroot ${cmd} ${filter} vattrtest
|
||||
|
@ -270,7 +270,7 @@ done
|
|||
# force the order so we know what to expect as these dont depend on each other
|
||||
runroot rpm -U --noorder /build/RPMS/noarch/conflictone-1.0-1.noarch.rpm /build/RPMS/noarch/conflicttwo-1.0-1.noarch.rpm
|
||||
runroot rpm -e conflicttwo
|
||||
runroot rpm -Va --nouser --nogroup
|
||||
runroot rpm -Va ${VERIFYOPTS}
|
||||
],
|
||||
[0],
|
||||
[],
|
||||
|
@ -310,13 +310,13 @@ touch -t 201703171717 ${tf}
|
|||
runroot rpm -U \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-2.0-1.noarch.rpm
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
cat "${tf}"
|
||||
|
||||
runroot rpm -U \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-3.0-1.noarch.rpm
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
cat "${tf}"
|
||||
|
||||
echo "xx" > "${tf}"
|
||||
|
@ -325,7 +325,7 @@ cat "${tf}"
|
|||
runroot rpm -U \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-4.0-1.noarch.rpm
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
cat "${tf}"
|
||||
|
||||
touch -t 201703171717 ${tf}
|
||||
|
@ -333,7 +333,7 @@ touch -t 201703171717 ${tf}
|
|||
runroot rpm -U --oldpackage \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-3.0-1.noarch.rpm
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
cat "${tf}"
|
||||
],
|
||||
[0],
|
||||
|
@ -358,7 +358,7 @@ touch -t 201703171717 ${tf}
|
|||
runroot rpm -Uvv --fsmdebug \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-2.0-1.noarch.rpm > output.txt 2>&1
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
grep -c "touch" output.txt
|
||||
cat "${tf}"
|
||||
|
||||
|
@ -366,7 +366,7 @@ cat "${tf}"
|
|||
runroot rpm -Uvv --fsmdebug \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-3.0-1.noarch.rpm > output.txt 2>&1
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
grep -c "touch" output.txt
|
||||
cat "${tf}"
|
||||
echo "xx" > "${tf}"
|
||||
|
@ -375,7 +375,7 @@ cat "${tf}"
|
|||
runroot rpm -Uvv --fsmdebug \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-4.0-1.noarch.rpm > output.txt 2>&1
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
grep -c "touch" output.txt
|
||||
cat "${tf}"
|
||||
|
||||
|
@ -384,7 +384,7 @@ touch -t 201703171717 ${tf}
|
|||
runroot rpm -U -Uvv --fsmdebug --oldpackage \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-3.0-1.noarch.rpm > output.txt 2>&1
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
grep -c "touch" output.txt
|
||||
cat "${tf}"
|
||||
],
|
||||
|
@ -412,9 +412,9 @@ done
|
|||
AT_CHECK([
|
||||
RPMDB_INIT
|
||||
runroot rpm -U --define "_minimize_writes 1" /build/RPMS/noarch/hlbreak-0-0.noarch.rpm
|
||||
runroot rpm -Vav --nouser --nogroup
|
||||
runroot rpm -Vav ${VERIFYOPTS}
|
||||
runroot rpm -U --define "_minimize_writes 1" /build/RPMS/noarch/hlbreak-1-0.noarch.rpm
|
||||
runroot rpm -Vav --nouser --nogroup
|
||||
runroot rpm -Vav ${VERIFYOPTS}
|
||||
],
|
||||
[0],
|
||||
[......... /opt/file2
|
||||
|
@ -455,13 +455,13 @@ readlink "${tf}"
|
|||
runroot rpm -U \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-2.0-1.noarch.rpm
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
readlink "${tf}"
|
||||
|
||||
runroot rpm -U \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-3.0-1.noarch.rpm
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
readlink "${tf}"
|
||||
|
||||
ln -sf "xx" "${tf}"
|
||||
|
@ -470,13 +470,13 @@ readlink "${tf}"
|
|||
runroot rpm -U \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-4.0-1.noarch.rpm
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
readlink "${tf}"
|
||||
|
||||
runroot rpm -U --oldpackage \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-3.0-1.noarch.rpm
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
readlink "${tf}"
|
||||
],
|
||||
[0],
|
||||
|
@ -500,7 +500,7 @@ readlink "${tf}"
|
|||
runroot rpm -Uvv --fsmdebug \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-2.0-1.noarch.rpm > output.txt 2>&1
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
grep -c "touch" output.txt
|
||||
readlink "${tf}"
|
||||
|
||||
|
@ -508,7 +508,7 @@ readlink "${tf}"
|
|||
runroot rpm -Uvv --fsmdebug \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-3.0-1.noarch.rpm > output.txt 2>&1
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
grep -c "touch" output.txt
|
||||
readlink "${tf}"
|
||||
ln -sf "xx" "${tf}"
|
||||
|
@ -517,14 +517,14 @@ readlink "${tf}"
|
|||
runroot rpm -Uvv --fsmdebug \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-4.0-1.noarch.rpm > output.txt 2>&1
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
grep -c "touch" output.txt
|
||||
readlink "${tf}"
|
||||
|
||||
runroot rpm -U -Uvv --fsmdebug --oldpackage \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-3.0-1.noarch.rpm > output.txt 2>&1
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
grep -c "touch" output.txt
|
||||
readlink "${tf}"
|
||||
],
|
||||
|
@ -560,17 +560,17 @@ for v in "1.0" "2.0"; do
|
|||
done
|
||||
|
||||
runroot rpm -U /build/RPMS/noarch/replacetest-1.0-1.noarch.rpm
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
runroot rpm -U \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-2.0-1.noarch.rpm
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
chmod 777 "${tf}"
|
||||
runroot rpm -U \
|
||||
--oldpackage \
|
||||
--define "_minimize_writes 1" \
|
||||
/build/RPMS/noarch/replacetest-1.0-1.noarch.rpm
|
||||
runroot rpm -Va --nouser --nogroup replacetest
|
||||
runroot rpm -Va ${VERIFYOPTS} replacetest
|
||||
],
|
||||
[0],
|
||||
[],
|
||||
|
@ -586,7 +586,7 @@ RPMDB_INIT
|
|||
runroot rpm -U --nocaps --ignoreos \
|
||||
/data/RPMS/capstest-1.0-1.noarch.rpm
|
||||
|
||||
runroot rpm -Va --nouser --nogroup
|
||||
runroot rpm -Va ${VERIFYOPTS}
|
||||
],
|
||||
[1],
|
||||
[........P /a/emptyCaps1
|
||||
|
@ -605,7 +605,7 @@ RPMDB_INIT
|
|||
runroot rpm -U --nocaps --nodeps --noscripts --ignorearch --ignoreos \
|
||||
/data/RPMS/hello-1.0-1.ppc64.rpm
|
||||
|
||||
runroot rpm -Va --nouser --nogroup --nodeps | grep "/bin/hello"
|
||||
runroot rpm -Va ${VERIFYOPTS} --nodeps | grep "/bin/hello"
|
||||
],
|
||||
[1],
|
||||
[],
|
||||
|
@ -621,9 +621,9 @@ runroot rpm -U --nodeps --noscripts --ignorearch --ignoreos \
|
|||
/data/RPMS/hello-1.0-1.i386.rpm
|
||||
runroot_other touch /usr/share/doc/hello-1.0/FAQ
|
||||
runroot_other chmod a-x /usr/local/bin/hello
|
||||
runroot rpm -Va --nodeps --nouser --nogroup
|
||||
runroot rpm -Va --nodeps ${VERIFYOPTS}
|
||||
runroot rpm --restore hello
|
||||
runroot rpm -Va --nodeps --nouser --nogroup
|
||||
runroot rpm -Va --nodeps ${VERIFYOPTS}
|
||||
],
|
||||
[0],
|
||||
[.M....... /usr/local/bin/hello
|
||||
|
@ -640,7 +640,7 @@ RPMDB_INIT
|
|||
runroot rpmbuild --quiet -bb /data/SPECS/verifyfiles.spec
|
||||
runroot rpm -i /build/RPMS/noarch/verifyfiles-1.0-1.noarch.rpm
|
||||
chmod -w "${RPMTEST}"/test-verify*
|
||||
runroot rpm -Vv --nouser --nogroup verifyfiles
|
||||
runroot rpm -Vv ${VERIFYOPTS} verifyfiles
|
||||
],
|
||||
[1],
|
||||
[.M....... /test-verify1
|
||||
|
|
Loading…
Reference in New Issue