Thread (6 messages) 6 messages, 3 authors, 2018-09-21

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

From: Petri Latvala <hidden>
Date: 2018-09-20 10:55:53
Subsystem: the rest · Maintainer: Linus Torvalds

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

Signed-off-by: Petri Latvala <redacted>
---
 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

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help