Skip to contentSkip to conversation

igt/debugfs_test: Skip dummy reads for sysfs pipe crc data

PATCH In review Abdiel Janulgue 2 participants 3 messages Jun 28, 2017 – Jun 29, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igt/debugfs_test: Skip dummy reads for sysfs pipe crc data

Doing this tends to takes forever.

---
 tests/debugfs_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/debugfs_test.c +2 -1
index 3f0eaae..3d973d9 100644
@@ -40,7 +40,8 @@ static void read_and_discard_sysfs_entries(int path_fd)
 
 	while ((dirent = readdir(dir))) {
 		if (!strcmp(dirent->d_name, ".") ||
-		    !strcmp(dirent->d_name, ".."))
+		    !strcmp(dirent->d_name, "..") ||
+		    !strcmp(dirent->d_name, "crc"))
 			continue;
 		if (dirent->d_type == DT_DIR) {
 			int sub_fd = -1;
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 12 lines · Abdiel Janulgue

Doing this tends to takes forever.

---
 tests/debugfs_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/debugfs_test.c +0 -0
index 3f0eaae..3d973d9 100644

tests/debugfs_test.c static void read_and_discard_sysfs_entries(int path_fd) · line 44

Quoted 6 lines
tests/debugfs_test.c +2 -1
@@ -40,7 +40,8 @@ static void read_and_discard_sysfs_entries(int path_fd)
 
 	while ((dirent = readdir(dir))) {
 		if (!strcmp(dirent->d_name, ".") ||
-		    !strcmp(dirent->d_name, ".."))
+		    !strcmp(dirent->d_name, "..") ||
+		    !strcmp(dirent->d_name, "crc"))

Do we have one that actually is named just "crc"?

IIRC 'i915_something_crc_something' was the format, and the check won't catch them.

Signature · 7 lines
Cheers,
Arek

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 22 lines · Arkadiusz Hiler
Quoted 12 lines · Abdiel Janulgue

Doing this tends to takes forever.

---
 tests/debugfs_test.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/debugfs_test.c +0 -0
index 3f0eaae..3d973d9 100644

tests/debugfs_test.c static void read_and_discard_sysfs_entries(int path_fd) · line 44

Quoted 6 lines
tests/debugfs_test.c +2 -1
@@ -40,7 +40,8 @@ static void read_and_discard_sysfs_entries(int path_fd)
 
 	while ((dirent = readdir(dir))) {
 		if (!strcmp(dirent->d_name, ".") ||
-		    !strcmp(dirent->d_name, ".."))
+		    !strcmp(dirent->d_name, "..") ||
+		    !strcmp(dirent->d_name, "crc"))

Do we have one that actually is named just "crc"?

Quoted 2 lines

IIRC 'i915_something_crc_something' was the format, and the check won't catch them.

Hi,

I was referring to crc capture data at crtc-*/crc/data which is an unlimited stream of bytes when read outright (tests for this are already covered by kms_pipe_crc_basic).

How about just checking for "crtc-"?
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx