Skip to contentSkip to conversation

igt/debugfs_test: Skip dummy reads for crtc-n/crc/data

PATCH In review Abdiel Janulgue 3 participants 4 messages Jul 3, 2017 – Jul 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 igt/debugfs_test: Skip dummy reads for crtc-n/crc/data

When descending thru debugfs directory. Doing this tends to takes forever. CRC pipe read tests for this are already covered under kms_pipe_crc_basic.

v2: Be more verbose that the check is meant for the crtc control data

---
 tests/debugfs_test.c | 2 ++
 1 file changed, 2 insertions(+)
tests/debugfs_test.c +2 -0
index 3f0eaae..66367d0 100644
@@ -44,6 +44,8 @@ static void read_and_discard_sysfs_entries(int path_fd)
 			continue;
 		if (dirent->d_type == DT_DIR) {
 			int sub_fd = -1;
+			if (strstr(dirent->d_name, "crtc-"))
+				continue;
 			igt_assert((sub_fd =
 				    openat(path_fd, dirent->d_name, O_RDONLY |
 					   O_DIRECTORY)) > 0);
Signature · 6 lines
2.7.4

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

When descending thru debugfs directory. Doing this tends to takes forever. CRC pipe read tests for this are already covered under kms_pipe_crc_basic.

v2: Be more verbose that the check is meant for the crtc control data

Signature · 6 lines
Cheers,
Arek
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
In reply to Abdiel Janulgue

Hey,

Op 03-07-17 om 12:19 schreef Abdiel Janulgue:

Quoted 17 lines

When descending thru debugfs directory. Doing this tends to takes forever. CRC pipe read tests for this are already covered under kms_pipe_crc_basic.

v2: Be more verbose that the check is meant for the crtc control data

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

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

Quoted 8 lines
tests/debugfs_test.c +2 -0
@@ -44,6 +44,8 @@ static void read_and_discard_sysfs_entries(int path_fd)
 			continue;
 		if (dirent->d_type == DT_DIR) {
 			int sub_fd = -1;
+			if (strstr(dirent->d_name, "crtc-"))
+				continue;
 			igt_assert((sub_fd =
 				    openat(path_fd, dirent->d_name, O_RDONLY |
 					   O_DIRECTORY)) > 0);

Please revert this patch. We already have a specific check for allowing reading that file to fail, which is way more specific than this patch. That opening the file takes indefinitely is a bug in the kernel, not in the test.

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw
Quoted 15 lines · Maarten Lankhorst

Hey,

Op 03-07-17 om 12:19 schreef Abdiel Janulgue:

Quoted 12 lines

When descending thru debugfs directory. Doing this tends to takes forever. CRC pipe read tests for this are already covered under kms_pipe_crc_basic.

v2: Be more verbose that the check is meant for the crtc control data

---
 tests/debugfs_test.c | 2 ++
 1 file changed, 2 insertions(+)
Quoted 15 lines

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

Quoted 13 lines
tests/debugfs_test.c +2 -0
index 3f0eaae..66367d0 100644
@@ -44,6 +44,8 @@ static void read_and_discard_sysfs_entries(int path_fd)
 			continue;
 		if (dirent->d_type == DT_DIR) {
 			int sub_fd = -1;
+			if (strstr(dirent->d_name, "crtc-"))
+				continue;
 			igt_assert((sub_fd =
 				    openat(path_fd, dirent->d_name, O_RDONLY |
 					   O_DIRECTORY)) > 0);

Please revert this patch. We already have a specific check for allowing reading that file to fail, which is way more specific than this patch. That opening the file takes indefinitely is a bug in the kernel, not in the test.

Nice to know that this caught the kernel bug! Will revert that...

Quoted 2 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx