diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-04-15 14:26:33 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2024-04-15 14:51:21 -0300 |
commit | d7edf9ae0388fb973f7c6a7328a975a7dbd51b91 (patch) | |
tree | 2b65bef04234efc66daebabefbcd28227db56652 | |
parent | c933676ce2780325a20b67dececf9616d6e610bf (diff) | |
download | pahole-d7edf9ae0388fb973f7c6a7328a975a7dbd51b91.tar.gz |
tests/reproducible_build: Validate the vmlinux file
Check if a vmlinux file was specified and if it exists when specified.,
$ tests/reproducible_build.sh
Please specify a vmlinux file to operate on
$ tests/reproducible_build.sh vmlinuxi
vmlinuxi file not available, please specify another
$ tests/reproducible_build.sh vmlinux
Parallel reproducible DWARF Loading/Serial BTF encoding: ^C
$
Suggested-by: Alan Maguire <alan.maguire@oracle.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kui-Feng Lee <kuifeng@fb.com>
Cc: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/lkml/3817fa6d-122f-4cbc-92be-616355ec04c2@oracle.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rwxr-xr-x | tests/reproducible_build.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/reproducible_build.sh b/tests/reproducible_build.sh index 9c72d548..b821e28e 100755 --- a/tests/reproducible_build.sh +++ b/tests/reproducible_build.sh @@ -5,6 +5,17 @@ # Arnaldo Carvalho de Melo <acme@redhat.com> (C) 2024- vmlinux=$1 + +if [ -z "$vmlinux" ] ; then + echo "Please specify a vmlinux file to operate on" + exit 1 +fi + +if [ ! -f "$vmlinux" ] ; then + echo "$vmlinux file not available, please specify another" + exit 1 +fi + outdir=$(mktemp -d /tmp/reproducible_build.sh.XXXXXX) echo -n "Parallel reproducible DWARF Loading/Serial BTF encoding: " |