lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87bjqehqqc.fsf@gmail.com>
Date: Mon, 23 Jun 2025 18:29:15 -0700
From: Collin Funk <collin.funk1@...il.com>
To: James Clark <james.clark@...aro.org>
Cc: Peter Zijlstra <peterz@...radead.org>,  Ingo Molnar <mingo@...hat.com>,
  Arnaldo Carvalho de Melo <acme@...nel.org>,  Namhyung Kim
 <namhyung@...nel.org>,  Mark Rutland <mark.rutland@....com>,  Alexander
 Shishkin <alexander.shishkin@...ux.intel.com>,  Jiri Olsa
 <jolsa@...nel.org>,  Ian Rogers <irogers@...gle.com>,  Adrian Hunter
 <adrian.hunter@...el.com>,  Suzuki K Poulose <suzuki.poulose@....com>,
  Mike Leach <mike.leach@...aro.org>,  Nick Terrell <terrelln@...com>,
  David Sterba <dsterba@...e.com>,  linux-perf-users@...r.kernel.org,
  linux-kernel@...r.kernel.org,  coresight@...ts.linaro.org,
  linux-arm-kernel@...ts.infradead.org,  bpf@...r.kernel.org
Subject: Re: [PATCH] perf test: Change all remaining #!/bin/sh to #!/bin/bash

James Clark <james.clark@...aro.org> writes:

> There are 43 instances of posix shell tests and 35 instances of bash. To
> give us a single consistent language for testing in, replace
> all #!/bin/sh to #!/bin/bash. Common sources that are included in both
> different shells will now work as expected. And we no longer have to fix
> up bashisms that appear to work when someone's system has sh symlinked
> to bash, but don't work on other systems that have both shells
> installed.
>
> Although we could have chosen sh, it's not backwards compatible so it
> wouldn't be possible to bulk convert without re-writing the existing
> bash tests.
>
> Choosing bash also gives us some nicer features including 'local'
> variable definitions and regexes in if statements that are already
> widely used in the tests.
>
> It's not expected that there are any users with only sh available due to
> the large number of bash tests that exist.
>
> Discussed in relation to running shellcheck here:
> https://lore.kernel.org/linux-perf-users/e3751a74be34bbf3781c4644f518702a7270220b.1749785642.git.collin.funk1@gmail.com/
>
> Signed-off-by: James Clark <james.clark@...aro.org>
> ---
>  tools/perf/tests/perf-targz-src-pkg                          | 2 +-
>  tools/perf/tests/shell/amd-ibs-swfilt.sh                     | 2 +-
>  tools/perf/tests/shell/buildid.sh                            | 2 +-
>  tools/perf/tests/shell/coresight/asm_pure_loop.sh            | 2 +-
>  tools/perf/tests/shell/coresight/memcpy_thread_16k_10.sh     | 2 +-
>  tools/perf/tests/shell/coresight/thread_loop_check_tid_10.sh | 2 +-
>  tools/perf/tests/shell/coresight/thread_loop_check_tid_2.sh  | 2 +-
>  tools/perf/tests/shell/coresight/unroll_loop_thread_10.sh    | 2 +-
>  tools/perf/tests/shell/diff.sh                               | 2 +-
>  tools/perf/tests/shell/ftrace.sh                             | 2 +-
>  tools/perf/tests/shell/lib/perf_has_symbol.sh                | 2 +-
>  tools/perf/tests/shell/lib/probe_vfs_getname.sh              | 2 +-
>  tools/perf/tests/shell/lib/setup_python.sh                   | 2 +-
>  tools/perf/tests/shell/lib/waiting.sh                        | 2 +-
>  tools/perf/tests/shell/list.sh                               | 2 +-
>  tools/perf/tests/shell/lock_contention.sh                    | 2 +-
>  tools/perf/tests/shell/perf-report-hierarchy.sh              | 2 +-
>  tools/perf/tests/shell/probe_vfs_getname.sh                  | 2 +-
>  tools/perf/tests/shell/record+probe_libc_inet_pton.sh        | 2 +-
>  tools/perf/tests/shell/record+script_probe_vfs_getname.sh    | 2 +-
>  tools/perf/tests/shell/record+zstd_comp_decomp.sh            | 2 +-
>  tools/perf/tests/shell/record_bpf_filter.sh                  | 2 +-
>  tools/perf/tests/shell/record_offcpu.sh                      | 2 +-
>  tools/perf/tests/shell/record_sideband.sh                    | 2 +-
>  tools/perf/tests/shell/script.sh                             | 2 +-
>  tools/perf/tests/shell/stat+csv_summary.sh                   | 2 +-
>  tools/perf/tests/shell/stat+shadow_stat.sh                   | 2 +-
>  tools/perf/tests/shell/stat_all_pfm.sh                       | 2 +-
>  tools/perf/tests/shell/stat_bpf_counters.sh                  | 2 +-
>  tools/perf/tests/shell/stat_bpf_counters_cgrp.sh             | 2 +-
>  tools/perf/tests/shell/test_arm_callgraph_fp.sh              | 2 +-
>  tools/perf/tests/shell/test_arm_coresight.sh                 | 2 +-
>  tools/perf/tests/shell/test_arm_coresight_disasm.sh          | 2 +-
>  tools/perf/tests/shell/test_arm_spe.sh                       | 2 +-
>  tools/perf/tests/shell/test_arm_spe_fork.sh                  | 2 +-
>  tools/perf/tests/shell/test_bpf_metadata.sh                  | 2 +-
>  tools/perf/tests/shell/test_intel_pt.sh                      | 2 +-
>  tools/perf/tests/shell/trace+probe_vfs_getname.sh            | 2 +-
>  tools/perf/tests/shell/trace_btf_enum.sh                     | 2 +-
>  tools/perf/tests/shell/trace_exit_race.sh                    | 2 +-
>  tools/perf/tests/shell/trace_record_replay.sh                | 2 +-
>  tools/perf/tests/shell/trace_summary.sh                      | 2 +-
>  tools/perf/tests/tests-scripts.c                             | 2 +-
>  43 files changed, 43 insertions(+), 43 deletions(-)

Patch looks good to me.

Reviewed-by: Collin Funk <collin.funk1@...il.com>

Collin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ