test: use readelf instead of eu-readelf

readelf is more standard, using readelf insteaded

test/difftree.sh: the symbol name may be with "FILE", which may be
get a incorrect count, here add "awk".

test/unit/Makefile.include: use "readelf -s --wide" instead of
"eu-readelf -s".

Signed-off-by: chenzefeng <chenzefeng2@huawei.com>
This commit is contained in:
chenzefeng 2019-05-29 22:14:05 +08:00
parent 5d8b069e12
commit d91b416b00
2 changed files with 2 additions and 2 deletions

View File

@ -46,7 +46,7 @@ do
;;
esac
# skip objects that are the linked product of more than one object file
[[ $(eu-readelf -s $i | grep FILE | wc -l) -ne 1 ]] && continue
[[ $(readelf -s $i | awk '$4=="FILE" {n++} END {print n}') -ne 1 ]] && continue
$SCRIPTDIR/../kpatch-build/create-diff-object $i $i /usr/lib/debug/lib/modules/$(uname -r)/vmlinux "$TEMPDIR/output.o" > "$TEMPDIR/log.txt" 2>&1
RETCODE=$?
# expect RETCODE to be 3 indicating no change

View File

@ -43,7 +43,7 @@ clean:
rm -f *.$(EXT_TEST_OUTPUT) *.$(EXT_OUTPUT)
%.$(EXT_SYMTAB):
eu-readelf -s $(patsubst %.$(EXT_SYMTAB),%.$(EXT_ORIG),$(@)) >$@
readelf -s --wide $(patsubst %.$(EXT_SYMTAB),%.$(EXT_ORIG),$(@)) >$@
%.$(EXT_TEST_OUTPUT): %.$(EXT_OUTPUT) %.$(EXT_TEST) $(TEST_LIBRARY)
@echo "TEST $(@:.$(EXT_TEST_OUTPUT)=)"