* [gentoo-commits] proj/elfix:master commit in: tests/revdeppaxtest/
@ 2012-12-15 14:47 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2012-12-15 14:47 UTC (permalink / raw
To: gentoo-commits
commit: 7ff70177c42761ef56c2c70c0461ef8eac7d37df
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 15 14:46:02 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Dec 15 14:47:34 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=7ff70177
tests/revdeppaxtest: complete test for revdep-pax
---
tests/revdeppaxtest/revdeptest.sh | 67 +++++++++++++++++++++----------------
1 files changed, 38 insertions(+), 29 deletions(-)
diff --git a/tests/revdeppaxtest/revdeptest.sh b/tests/revdeppaxtest/revdeptest.sh
index d405841..ca24d4f 100755
--- a/tests/revdeppaxtest/revdeptest.sh
+++ b/tests/revdeppaxtest/revdeptest.sh
@@ -17,6 +17,7 @@ fi
PAXCTLNG="../../src/paxctl-ng"
REVDEPPAX="../../scripts/revdep-pax"
+LIBSPATH="$(pwd)/.libs"
BINARY="revdepbin"
LIBRARY="librevdeplib.so.0.0.0"
SONAME="librevdeplib.so.0"
@@ -30,8 +31,7 @@ LDCONFIGD="/etc/ld.so.conf.d/revdeptest.conf"
# create a ld.so.conf.d/ file
-LIBSPATH="$(pwd)/.libs"
-cat << EOF > ${LDCONFIGD}
+cat << EOF > "${LDCONFIGD}"
${LIBSPATH}
EOF
${LDCONFIG}
@@ -40,15 +40,48 @@ ${LDCONFIG}
CAT="zzz"
PKG="revdepbin-1"
VARDBPKG="/var/db/pkg"
-${MKDIR} ${VARDBPKG}/${CAT}/${PKG}
-cat << EOF > ${VARDBPKG}/${CAT}/${PKG}/NEEDED
+${MKDIR} "${VARDBPKG}/${CAT}/${PKG}"
+cat << EOF > "${VARDBPKG}/${CAT}/${PKG}/NEEDED"
${LIBSPATH}/${BINARY} ${SONAME}
EOF
#
# do test here
#
-${REVDEPPAX} -vs "${SONAME}"
+#${REVDEPPAX} -vs "${SONAME}"
+#
+for i in "R" "r" "Rr"
+do
+ for j in "R" "r" "Rr"
+ do
+ $PAXCTLNG -z "${LIBSPATH}/${BINARY}"
+ $PAXCTLNG -$i "${LIBSPATH}/${BINARY}"
+ $PAXCTLNG -z "${LIBSPATH}/${LIBRARY}"
+ $PAXCTLNG -Pm$j "${LIBSPATH}/${LIBRARY}"
+
+ echo " BEFORE: "
+ p=$($PAXCTLNG -v ${LIBSPATH}/${BINARY})
+ p=$(echo $p | awk '{ print $3 }')
+ echo " Binary: $p"
+
+ p=$($PAXCTLNG -v ${LIBSPATH}/${LIBRARY})
+ p=$(echo $p | awk '{ print $3 }')
+ echo " Library: $p"
+
+ $REVDEPPAX -m -y -s ${SONAME} >/dev/null 2>&1
+
+ echo " AFTER: "
+ p=$($PAXCTLNG -v ${LIBSPATH}/${BINARY})
+ p=$(echo $p | awk '{ print $3 }')
+ echo " Binary: $p"
+
+ p=$($PAXCTLNG -v ${LIBSPATH}/${LIBRARY})
+ p=$(echo $p | awk '{ print $3 }')
+ echo " Library: $p"
+ echo
+ echo
+ done
+done
#
# do test here
#
@@ -65,27 +98,3 @@ ${LDCONFIG}
echo "================================================================================"
exit 0
-echo
-echo "Testing reverse migration $LIBRARY -> $BINARY"
-echo "(This will take a while)"
-echo
-
-for i in "R" "r" "Rr"
-do
- for j in "R" "r" "Rr"
- do
- echo "============================================================================"
- $PAXCTLNG -z $BINARY
- $PAXCTLNG -$i $BINARY
- $PAXCTLNG -z $LIBRARY
- $PAXCTLNG -m$j $LIBRARY
- p=$i; [[ "$p" == "Rr" ]] && p="-"
- echo "Binary -> $p"
- p=$j; [[ "$p" == "Rr" ]] && p="-"
- echo "Library -> $p"
- $REVDEPPAX -m -y -l $LIBRARY
- echo
- $PAXCTLNG -v $BINARY
- $PAXCTLNG -v $LIBRARY
- done
-done
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/elfix:master commit in: tests/revdeppaxtest/
@ 2012-12-15 18:54 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2012-12-15 18:54 UTC (permalink / raw
To: gentoo-commits
commit: 37accaf3343a10e83b04bb36d56ae1dc1f3a182f
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 15 18:54:15 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Dec 15 18:54:15 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=37accaf3
tests/revdeppaxtest: improve test flags
---
tests/revdeppaxtest/revdeptest.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/revdeppaxtest/revdeptest.sh b/tests/revdeppaxtest/revdeptest.sh
index ca24d4f..2b36075 100755
--- a/tests/revdeppaxtest/revdeptest.sh
+++ b/tests/revdeppaxtest/revdeptest.sh
@@ -55,9 +55,9 @@ do
for j in "R" "r" "Rr"
do
$PAXCTLNG -z "${LIBSPATH}/${BINARY}"
- $PAXCTLNG -$i "${LIBSPATH}/${BINARY}"
+ $PAXCTLNG -e$i "${LIBSPATH}/${BINARY}"
$PAXCTLNG -z "${LIBSPATH}/${LIBRARY}"
- $PAXCTLNG -Pm$j "${LIBSPATH}/${LIBRARY}"
+ $PAXCTLNG -m$j "${LIBSPATH}/${LIBRARY}"
echo " BEFORE: "
p=$($PAXCTLNG -v ${LIBSPATH}/${BINARY})
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/elfix:master commit in: tests/revdeppaxtest/
@ 2012-12-16 15:04 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2012-12-16 15:04 UTC (permalink / raw
To: gentoo-commits
commit: 7756c3e977b1b5fe61365925123c7e92a368f5b7
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 16 15:03:49 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sun Dec 16 15:03:49 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=7756c3e9
tests/revdeppaxtest: test exporter/importer logic
---
tests/revdeppaxtest/revdeptest.sh | 88 +++++++++++++++++++++++++++---------
1 files changed, 66 insertions(+), 22 deletions(-)
diff --git a/tests/revdeppaxtest/revdeptest.sh b/tests/revdeppaxtest/revdeptest.sh
index 2b36075..3b6d83a 100755
--- a/tests/revdeppaxtest/revdeptest.sh
+++ b/tests/revdeppaxtest/revdeptest.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+verbose=${1-0}
+
echo "================================================================================"
echo
echo " REVDEP-PAX TEST"
@@ -45,41 +47,77 @@ cat << EOF > "${VARDBPKG}/${CAT}/${PKG}/NEEDED"
${LIBSPATH}/${BINARY} ${SONAME}
EOF
-#
-# do test here
-#
-#${REVDEPPAX} -vs "${SONAME}"
-#
-for i in "R" "r" "Rr"
+if [ "${verbose}" = 0 ] ;then
+ echo -n " "
+fi
+
+count=0
+
+for bf in "R" "r" "Rr"
do
- for j in "R" "r" "Rr"
+ for lf in "R" "r" "Rr"
do
- $PAXCTLNG -z "${LIBSPATH}/${BINARY}"
- $PAXCTLNG -e$i "${LIBSPATH}/${BINARY}"
- $PAXCTLNG -z "${LIBSPATH}/${LIBRARY}"
- $PAXCTLNG -m$j "${LIBSPATH}/${LIBRARY}"
+ $PAXCTLNG -z "${LIBSPATH}/${BINARY}"
+ $PAXCTLNG -e${bf} "${LIBSPATH}/${BINARY}"
+ $PAXCTLNG -z "${LIBSPATH}/${LIBRARY}"
+ $PAXCTLNG -m${lf} "${LIBSPATH}/${LIBRARY}"
- echo " BEFORE: "
p=$($PAXCTLNG -v ${LIBSPATH}/${BINARY})
p=$(echo $p | awk '{ print $3 }')
- echo " Binary: $p"
+ if [ "${verbose}" != 0 ] ;then
+ echo " BEFORE: "
+ echo " Binary: $p"
+ fi
p=$($PAXCTLNG -v ${LIBSPATH}/${LIBRARY})
p=$(echo $p | awk '{ print $3 }')
- echo " Library: $p"
+ if [ "${verbose}" != 0 ] ;then
+ echo " Library: $p"
+ fi
$REVDEPPAX -m -y -s ${SONAME} >/dev/null 2>&1
- echo " AFTER: "
- p=$($PAXCTLNG -v ${LIBSPATH}/${BINARY})
- p=$(echo $p | awk '{ print $3 }')
- echo " Binary: $p"
+ ba=$($PAXCTLNG -v ${LIBSPATH}/${BINARY})
+ ba=$(echo $ba | awk '{ print $3 }')
+ if [ "${verbose}" != 0 ] ;then
+ echo " AFTER: "
+ echo " Binary: $ba"
+ fi
p=$($PAXCTLNG -v ${LIBSPATH}/${LIBRARY})
p=$(echo $p | awk '{ print $3 }')
- echo " Library: $p"
- echo
- echo
+ if [ "${verbose}" != 0 ] ;then
+ echo " Library: $p"
+ fi
+
+ be="-em"
+ unset x
+
+ if [ "$bf" != "$lf" -a "$bf" != "Rr" ]; then
+ x="$bf"
+ elif [ "$bf" = "$lf" ]; then
+ x="$bf"
+ elif [ "$lf" = "Rr" ]; then
+ x="$bf"
+ elif [ "$bf" = "Rr" ]; then
+ x="$lf"
+ fi
+
+ be+="${x/Rr/-}-"
+
+ if [ "$be" != "$ba" ]; then
+ (( count = count + 1 ))
+ if [ "${verbose}" != 0 ] ;then
+ echo " Mismatch: Expected Binary: ${be}"
+ fi
+ fi
+
+ if [ "${verbose}" != 0 ] ;then
+ echo
+ echo
+ else
+ echo -n "."
+ fi
done
done
#
@@ -95,6 +133,12 @@ ${RMDIR} ${VARDBPKG}/${CAT}
${RM} ${LDCONFIGD}
${LDCONFIG}
+if [ "${verbose}" = 0 ] ;then
+ echo
+ echo
+fi
+echo " Mismatches = ${count}"
+echo
echo "================================================================================"
-exit 0
+exit $count
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] proj/elfix:master commit in: tests/revdeppaxtest/
@ 2012-12-29 5:39 Anthony G. Basile
0 siblings, 0 replies; 4+ messages in thread
From: Anthony G. Basile @ 2012-12-29 5:39 UTC (permalink / raw
To: gentoo-commits
commit: fe95025dd8f6de099cdc5fb7a08072f72ff741f5
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 29 05:39:38 2012 +0000
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
CommitDate: Sat Dec 29 05:39:38 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/elfix.git;a=commit;h=fe95025d
tests/revdeppaxtest/revdeptest.sh: update to work with new revdep-pax
---
tests/revdeppaxtest/revdeptest.sh | 31 ++++++++++---------------------
1 files changed, 10 insertions(+), 21 deletions(-)
diff --git a/tests/revdeppaxtest/revdeptest.sh b/tests/revdeppaxtest/revdeptest.sh
index 2bbfb56..6512959 100755
--- a/tests/revdeppaxtest/revdeptest.sh
+++ b/tests/revdeppaxtest/revdeptest.sh
@@ -45,23 +45,16 @@ RM="/bin/rm -f"
MKDIR="/bin/mkdir -p"
RMDIR="/bin/rmdir"
LDD="/usr/bin/ldd"
-LDCONFIG="/sbin/ldconfig"
-LDCONFIGD="/etc/ld.so.conf.d/revdeptest.conf"
-# create a ld.so.conf.d/ file
-cat << EOF > "${LDCONFIGD}"
-${LIBSPATH}
-EOF
-${LDCONFIG}
-
-# create our /var/db/pkg/${CAT}/${PKG}/NEEDED
+# create our /var/db/pkg/${CAT}/${PKG}/NEEDED.ELF.2
CAT="zzz"
PKG="revdepbin-1"
VARDBPKG="/var/db/pkg"
${MKDIR} "${VARDBPKG}/${CAT}/${PKG}"
-cat << EOF > "${VARDBPKG}/${CAT}/${PKG}/NEEDED"
-${LIBSPATH}/${BINARY} ${SONAME}
+cat << EOF > "${VARDBPKG}/${CAT}/${PKG}/NEEDED.ELF.2"
+XYZ;${LIBSPATH}/${BINARY};;;${SONAME}
+XYZ;${LIBSPATH}/${LIBRARY};${SONAME};;
EOF
if [ "${verbose}" = 0 ] ;then
@@ -104,14 +97,14 @@ do
$PAXCTLNG -m${lf} "${LIBSPATH}/${LIBRARY}"
p=$($PAXCTLNG -v ${LIBSPATH}/${BINARY})
- p=$(echo $p | awk '{ print $3 }')
+ p=$(echo $p | awk '{ print $4 }')
if [ "${verbose}" != 0 ] ;then
echo " BEFORE: "
echo " Binary: $p"
fi
p=$($PAXCTLNG -v ${LIBSPATH}/${LIBRARY})
- p=$(echo $p | awk '{ print $3 }')
+ p=$(echo $p | awk '{ print $4 }')
if [ "${verbose}" != 0 ] ;then
echo " Library: $p"
fi
@@ -119,14 +112,14 @@ do
$REVDEPPAX -m -y -s ${SONAME} >/dev/null 2>&1
ba=$($PAXCTLNG -v ${LIBSPATH}/${BINARY})
- ba=$(echo $ba | awk '{ print $3 }')
+ ba=$(echo $ba | awk '{ print $4 }')
if [ "${verbose}" != 0 ] ;then
echo " AFTER: "
echo " Binary: $ba"
fi
p=$($PAXCTLNG -v ${LIBSPATH}/${LIBRARY})
- p=$(echo $p | awk '{ print $3 }')
+ p=$(echo $p | awk '{ print $4 }')
if [ "${verbose}" != 0 ] ;then
echo " Library: $p"
fi
@@ -165,15 +158,11 @@ done
# do test here
#
-# clean up our /var/db/pkg/${CAT}/${PKG}/NEEDED
-${RM} ${VARDBPKG}/${CAT}/${PKG}/NEEDED
+# clean up our /var/db/pkg/${CAT}/${PKG}/NEEDED.ELF.2
+${RM} ${VARDBPKG}/${CAT}/${PKG}/NEEDED.ELF.2
${RMDIR} ${VARDBPKG}/${CAT}/${PKG}
${RMDIR} ${VARDBPKG}/${CAT}
-# clean up our ld.so.conf.d/ file
-${RM} ${LDCONFIGD}
-${LDCONFIG}
-
if [ "${verbose}" = 0 ] ;then
echo
echo
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-29 5:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-15 14:47 [gentoo-commits] proj/elfix:master commit in: tests/revdeppaxtest/ Anthony G. Basile
-- strict thread matches above, loose matches on Subject: below --
2012-12-15 18:54 Anthony G. Basile
2012-12-16 15:04 Anthony G. Basile
2012-12-29 5:39 Anthony G. Basile
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox