[i-g-t] igt/debugfs_test: Skip dummy reads for crtc-n/crc/data
diff mbox

Message ID 1499077173-24635-1-git-send-email-abdiel.janulgue@linux.intel.com
State New
Headers show

Commit Message

Abdiel Janulgue July 3, 2017, 10:19 a.m. UTC
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

Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: arkadiusz.hiler@intel.com
---
 tests/debugfs_test.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Arkadiusz Hiler July 4, 2017, 1:31 p.m. UTC | #1
On Mon, Jul 03, 2017 at 01:19:33PM +0300, Abdiel Janulgue wrote:
> 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
> 
> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Maarten Lankhorst July 6, 2017, 6:05 a.m. UTC | #2
Hey,

Op 03-07-17 om 12:19 schreef 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
>
> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
> Cc: arkadiusz.hiler@intel.com
> ---
>  tests/debugfs_test.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
> index 3f0eaae..66367d0 100644
> --- a/tests/debugfs_test.c
> +++ b/tests/debugfs_test.c
> @@ -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.
Abdiel Janulgue July 6, 2017, 7:41 a.m. UTC | #3
On 06.07.2017 09:05, Maarten Lankhorst wrote:
> Hey,
> 
> Op 03-07-17 om 12:19 schreef 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
>>
>> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
>> Cc: arkadiusz.hiler@intel.com
>> ---
>>  tests/debugfs_test.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
>> index 3f0eaae..66367d0 100644
>> --- a/tests/debugfs_test.c
>> +++ b/tests/debugfs_test.c
>> @@ -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...

> 
>

Patch
diff mbox

diff --git a/tests/debugfs_test.c b/tests/debugfs_test.c
index 3f0eaae..66367d0 100644
--- a/tests/debugfs_test.c
+++ b/tests/debugfs_test.c
@@ -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);