[igt-dev] [PATCH i-g-t 2/3] runner: Lowercase the name used for matching -t and -x

Petri Latvala petri.latvala at intel.com
Thu Sep 20 10:55:06 UTC 2018


And thus make it possible to run -t basic-s3 for example.

Signed-off-by: Petri Latvala <petri.latvala at intel.com>
---
 runner/job_list.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/runner/job_list.c b/runner/job_list.c
index 88f59b05..9cf19c45 100644
--- a/runner/job_list.c
+++ b/runner/job_list.c
@@ -75,19 +75,17 @@ static void add_subtests(struct job_list *job_list, struct settings *settings,
 	}
 
 	while (fscanf(p, "%ms", &subtestname) == 1) {
-		char *piglitname;
+		char piglitname[256];
 
-		asprintf(&piglitname, "igt@%s@%s", binary, subtestname);
+		generate_piglit_name(binary, subtestname, piglitname, sizeof(piglitname));
 
 		if (exclude && exclude->size && matches_any(piglitname, exclude)) {
 			free(subtestname);
-			free(piglitname);
 			continue;
 		}
 
 		if (include && include->size && !matches_any(piglitname, include)) {
 			free(subtestname);
-			free(piglitname);
 			continue;
 		}
 
@@ -103,7 +101,6 @@ static void add_subtests(struct job_list *job_list, struct settings *settings,
 		}
 
 		free(subtestname);
-		free(piglitname);
 	}
 
 	if (num_subtests)
-- 
2.18.0



More information about the igt-dev mailing list