builtin-test.c (de4fb176622d54a82ea3ceb7362392aaf5ff0b5a) builtin-test.c (41204da4c16071be9090940b18f566832d46becc)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * builtin-test.c
4 *
5 * Builtin regression testing command: ever growing number of sanity tests
6 */
7#include <fcntl.h>
8#include <errno.h>

--- 282 unchanged lines hidden (view full) ---

291 description = fgets(description, size, fp);
292 fclose(fp);
293
294 return description ? strim(description + 1) : NULL;
295}
296
297#define for_each_shell_test(entlist, nr, base, ent) \
298 for (int __i = 0; __i < nr && (ent = entlist[__i]); __i++) \
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * builtin-test.c
4 *
5 * Builtin regression testing command: ever growing number of sanity tests
6 */
7#include <fcntl.h>
8#include <errno.h>

--- 282 unchanged lines hidden (view full) ---

291 description = fgets(description, size, fp);
292 fclose(fp);
293
294 return description ? strim(description + 1) : NULL;
295}
296
297#define for_each_shell_test(entlist, nr, base, ent) \
298 for (int __i = 0; __i < nr && (ent = entlist[__i]); __i++) \
299 if (!is_directory(base, ent) && ent->d_name[0] != '.')
299 if (!is_directory(base, ent) && \
300 is_executable_file(base, ent) && \
301 ent->d_name[0] != '.')
300
301static const char *shell_tests__dir(char *path, size_t size)
302{
303 const char *devel_dirs[] = { "./tools/perf/tests", "./tests", };
304 char *exec_path;
305 unsigned int i;
306
307 for (i = 0; i < ARRAY_SIZE(devel_dirs); ++i) {

--- 326 unchanged lines hidden ---
302
303static const char *shell_tests__dir(char *path, size_t size)
304{
305 const char *devel_dirs[] = { "./tools/perf/tests", "./tests", };
306 char *exec_path;
307 unsigned int i;
308
309 for (i = 0; i < ARRAY_SIZE(devel_dirs); ++i) {

--- 326 unchanged lines hidden ---