All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/igt_params: Fix verifying of debugfs parameters
@ 2020-05-19 10:54 Juha-Pekka Heikkila
  2020-05-19 11:00 ` Petri Latvala
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Juha-Pekka Heikkila @ 2020-05-19 10:54 UTC (permalink / raw)
  To: igt-dev; +Cc: Jani Nikula

After found correct place in debugfs for parameters there
was used wrong path for verifying existence of parameter
which caused fallback path to be used.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 lib/igt_params.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/igt_params.c b/lib/igt_params.c
index d8649dfd..410ca650 100644
--- a/lib/igt_params.c
+++ b/lib/igt_params.c
@@ -143,14 +143,14 @@ static int __igt_params_open(int device, char **outpath, const char *param)
 
 		devname = openat(dir, "name", O_RDONLY);
 		igt_require_f(devname >= 0,
-		              "Driver need to name itself in debugfs!");
+			      "Driver need to name itself in debugfs!");
 
 		read(devname, searchname, sizeof(searchname));
 		close(devname);
 
 		foundname = strtok_r(searchname, " ", &ctx);
 		igt_require_f(foundname,
-		              "Driver need to name itself in debugfs!");
+			      "Driver need to name itself in debugfs!");
 
 		snprintf(searchpath, PATH_MAX, "%s_params", foundname);
 		params = openat(dir, searchpath, O_RDONLY);
@@ -162,8 +162,8 @@ static int __igt_params_open(int device, char **outpath, const char *param)
 			if (param != NULL) {
 				char filepath[PATH_MAX];
 
-				snprintf(filepath, PATH_MAX, "%s/%s",
-					 debugfspath, param);
+				snprintf(filepath, PATH_MAX, "%s/%s/%s",
+					 debugfspath, searchpath, param);
 
 				if (stat(filepath, &buffer) == 0) {
 					if (outpath != NULL)
-- 
2.26.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t] lib/igt_params: Fix verifying of debugfs parameters
@ 2020-05-19 11:38 Juha-Pekka Heikkila
  2020-05-19 12:22 ` Petri Latvala
  0 siblings, 1 reply; 7+ messages in thread
From: Juha-Pekka Heikkila @ 2020-05-19 11:38 UTC (permalink / raw)
  To: igt-dev

After found correct place in debugfs for parameters there
was used wrong path for verifying existence of parameter
which caused fallback path to be used.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 lib/igt_params.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/igt_params.c b/lib/igt_params.c
index d8649dfd..1f6dc13f 100644
--- a/lib/igt_params.c
+++ b/lib/igt_params.c
@@ -143,14 +143,14 @@ static int __igt_params_open(int device, char **outpath, const char *param)
 
 		devname = openat(dir, "name", O_RDONLY);
 		igt_require_f(devname >= 0,
-		              "Driver need to name itself in debugfs!");
+			      "Driver need to name itself in debugfs!\n");
 
 		read(devname, searchname, sizeof(searchname));
 		close(devname);
 
 		foundname = strtok_r(searchname, " ", &ctx);
 		igt_require_f(foundname,
-		              "Driver need to name itself in debugfs!");
+			      "Driver need to name itself in debugfs!\n");
 
 		snprintf(searchpath, PATH_MAX, "%s_params", foundname);
 		params = openat(dir, searchpath, O_RDONLY);
@@ -162,8 +162,8 @@ static int __igt_params_open(int device, char **outpath, const char *param)
 			if (param != NULL) {
 				char filepath[PATH_MAX];
 
-				snprintf(filepath, PATH_MAX, "%s/%s",
-					 debugfspath, param);
+				snprintf(filepath, PATH_MAX, "%s/%s/%s",
+					 debugfspath, searchpath, param);
 
 				if (stat(filepath, &buffer) == 0) {
 					if (outpath != NULL)
-- 
2.26.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-19 16:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19 10:54 [igt-dev] [PATCH i-g-t] lib/igt_params: Fix verifying of debugfs parameters Juha-Pekka Heikkila
2020-05-19 11:00 ` Petri Latvala
2020-05-19 11:30   ` Juha-Pekka Heikkila
2020-05-19 11:40 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-05-19 16:42 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-05-19 11:38 [igt-dev] [PATCH i-g-t] " Juha-Pekka Heikkila
2020-05-19 12:22 ` Petri Latvala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.