From df3e1ac3753ae481679611e11d72d9a3973ce0e5 Mon Sep 17 00:00:00 2001 From: Sharif Olorin Date: Tue, 27 Dec 2016 23:40:29 +0000 Subject: [PATCH 1/3] Add test for number of shared object dependencies This has caused problems a few times and is a cheap test to add. --- zodiac-cli/test/cli/linking/run | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 zodiac-cli/test/cli/linking/run diff --git a/zodiac-cli/test/cli/linking/run b/zodiac-cli/test/cli/linking/run new file mode 100755 index 0000000..ec58a2f --- /dev/null +++ b/zodiac-cli/test/cli/linking/run @@ -0,0 +1,22 @@ +#!/bin/sh -eu + +. $(dirname $0)/../core/setup.sh + +banner TSRP shared object dependencies +#------------------------------------- + +# What we're expecting here: +# +# - libc +# - libdl +# - libgmp +# - libm +# - libpthread +# - librt +# - libutil +# +# If this breaks, work out whether we're linking against something we +# shouldn't be (e.g., something that's on CI but might not be on other +# boxes); if not, the test can be updated. +nso="$(objdump -p $TSRP | grep -E '^\s+NEEDED' | wc -l)" +[ "$nso" = "7" ] || exit 10 From d68b236b8fe0058bbe1ae6b074e53f0b4ed8315a Mon Sep 17 00:00:00 2001 From: Sharif Olorin Date: Fri, 6 Jan 2017 06:31:47 +0000 Subject: [PATCH 2/3] fixup! Add test for number of shared object dependencies --- zodiac-cli/test/cli/linking/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zodiac-cli/test/cli/linking/run b/zodiac-cli/test/cli/linking/run index ec58a2f..bf76ab0 100755 --- a/zodiac-cli/test/cli/linking/run +++ b/zodiac-cli/test/cli/linking/run @@ -1,4 +1,4 @@ -#!/bin/sh -eu +#!/bin/sh -eux . $(dirname $0)/../core/setup.sh From 43d62db4e86cde70ccde467c7fe34c55bfe3098c Mon Sep 17 00:00:00 2001 From: Sharif Olorin Date: Fri, 6 Jan 2017 07:04:55 +0000 Subject: [PATCH 3/3] fixup! fixup! Add test for number of shared object dependencies --- zodiac-cli/test/cli/linking/run | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zodiac-cli/test/cli/linking/run b/zodiac-cli/test/cli/linking/run index bf76ab0..d7e226e 100755 --- a/zodiac-cli/test/cli/linking/run +++ b/zodiac-cli/test/cli/linking/run @@ -18,5 +18,7 @@ banner TSRP shared object dependencies # If this breaks, work out whether we're linking against something we # shouldn't be (e.g., something that's on CI but might not be on other # boxes); if not, the test can be updated. -nso="$(objdump -p $TSRP | grep -E '^\s+NEEDED' | wc -l)" +foo=$(mktemp) +nso="$(objdump -p $TSRP | grep -E '^\s+NEEDED' | tee $foo | wc -l)" +cat $foo [ "$nso" = "7" ] || exit 10