perf test: Iterate over shell tests in alphabetical order
The for_each_shell_test macro iterated over all shell tests in the directory using readdir, which does not guarantee any ordering, causing problems on certain fs. However, the order in which they are visited determines the id of the test, in case one wants to run a single test. This patch replaces readdir with scandir using alphabetical sorting. This guarantees that, given the same set of tests, all machines will see the tests in the same order, and, thus, that test ids are consistent. Signed-off-by: Riccardo Mancini <rickyman7@gmail.com> Reported-by: Ian Rogers <irogers@google.com> Acked-by: Ian Rogers <irogers@google.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Fabian Hemmer <copy@copy.sh> Cc: Leo Yan <leo.yan@linaro.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tommi Rantala <tommi.t.rantala@nokia.com> Link: http://lore.kernel.org/lkml/20210525230521.244553-1-rickyman7@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Please register or sign in to comment