Commit Graph

9 Commits

Author SHA1 Message Date
Julien Thierry 22e2c1a95c test: Ignore remaining quoting warnings
Fixing the remaining warnings suggesting to quote the output subshell
invocation would hinder readability. Also the results of dirname and
"type -p" used in the subshell should return spaceless strings in kpatch
usecases.

Ignore the warnings for now.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
2020-06-04 20:30:28 +01:00
Julien Thierry e906db9b81 test: Fix shellcheck quoting issues
It wouldn't be bash without pondering over what to quote or not to
quote.

Shellcheck reports a bunch of quoting issues in our scripts. Fix what
can be fixed.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
2020-06-04 20:30:28 +01:00
Julien Thierry f876aed900 test/difftree.sh: Silence warning about looping over find output
Shellcheck emits the following warning:
SC2044: For loops over find output are fragile. Use find -exec or a while read loop.

Disable it for now.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
2020-06-04 20:30:28 +01:00
Julien Thierry ac2d6e3759 test/difftree.sh: Remove useless command invocations
Shellchecks warns about two useless commands:
SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
SC2002: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead.

Simplify that line with those suggestions.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
2020-06-04 20:30:28 +01:00
Julien Thierry 4dd55cd407 test: Avoid issues with names starting with dashes
Shellcheck emmits the following warning:
SC2035: Use ./*glob* or -- *glob* so names with dashes won't become options.

Which seems like a fair recommendation.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
2020-06-04 20:30:28 +01:00
Julien Thierry 22d1046412 test/difftree.sh: Remove unused variable
Shellcheck reports VMVLINUX is unused. Also it seems to has a typo
in the name.

Lets remove it.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
2020-06-04 20:30:28 +01:00
chenzefeng d91b416b00 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>
2019-05-30 17:45:44 +08:00
Artem Savkov cedcd2314b Prepare for built-in.o -> built-in.a rename
for-next branch of kbuild repo contains a "kbuild: rename built-in.o to
built-in.a" which renames all built-in.o instances. Filter on both .o
and .a in kpatch-gcc/kpatch-build to be prepared for this change.

Fixes #800.

Signed-off-by: Artem Savkov <asavkov@redhat.com>
2018-03-20 10:46:50 +01:00
Seth Jennings a59607742e add difftest.sh test
The purpose of this test script is to determine if create-diff-object
can properly recognize object file equivalence when passed the same file
for both the original and patched objects.  This verifies that
create-diff-object is correctly parsing, correlating, and comparing the
different elements of the object file.  In practice, a situation similar
to the test case occurs when a commonly included header file changes,
causing Make to rebuild many objects that have no functional change.

Signed-off-by: Seth Jennings <sjenning@redhat.com>
2014-08-12 10:50:46 -05:00