-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1) Added new code under linux-tools , this code can be usefull for b… #122
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,14 +89,22 @@ function tc_local_setup() | |
{ | ||
tc_exec_or_break $REQUIRED || return | ||
|
||
tc_exist_or_break /etc/prelink.conf /etc/sysconfig/prelink || return | ||
#tc_exist_or_break /etc/prelink.conf /etc/sysconfig/prelink || return | ||
tc_exist_or_break /etc/prelink.conf /usr/sbin/prelink || return | ||
|
||
tc_get_os_arch | ||
userlibdir=/usr/lib | ||
libdir=/lib/ | ||
[ $TC_OS_ARCH = "x86_64" ] || [ $TC_OS_ARCH = "ppc64" ] || [ $TC_OS_ARCH = "s390x" ] \ | ||
&& userlibdir=/usr/lib64/ && \ | ||
libdir=/lib64/ | ||
# On Ubuntu usrlib and lib paths are diff, so modified the code based on that | ||
grep -i "ubuntu" /etc/*-release >/dev/null 2>&1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Below change is specific for x86_64 arch. but prelink is available for power as well. |
||
if [ $? -eq 0 ];then # Start of OS check | ||
userlibdir="/usr/lib/x86_64-linux-gnu/" | ||
libdir=/lib/x86_64-linux-gnu/ | ||
fi | ||
|
||
PRELINK="/usr/sbin/prelink -c ./prelink.conf -C ./prelink.cache --ld-library-path=." | ||
|
||
cat >> $TSTDIR/prelink.conf <<-EOF | ||
|
@@ -182,9 +190,13 @@ function test02() | |
tc_fail "prelink failed on bogus library dependency" || return | ||
|
||
fi | ||
|
||
grep -q "^`echo $PRELINK | sed 's/ .*$/: .*has a dependency cycle/'`" $BINS.log | ||
tc_fail_if_bad $? "prelink failed on cycle1" || return | ||
|
||
# cycle1lib1.so libs are not part of Ubuntu, so excluding this test | ||
grep -i "ubuntu" /etc/*-release >/dev/null 2>&1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. cycle1lib1.so libs are created for test purpose ? If so this cannot be built for ubuntu ? |
||
if [ $? -ne 0 ];then # Start of OS check | ||
grep -q "^`echo $PRELINK | sed 's/ .*$/: .*has a dependency cycle/'`" $BINS.log | ||
tc_fail_if_bad $? "prelink failed on cycle1" || return | ||
fi | ||
|
||
LD_LIBRARY_PATH=. ./$BINS | ||
tc_fail_if_bad $? "Failed to execute the binary" || return | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please Correct Summary !
In tc_exec_or_break $REQUIRED prelink check is done.
And how about distros which has /etc/sysconfig/prelink ? This change has to be made generic to work in all the cases.