Skip to contentSkip to conversation

tests/kms_frontbuffer_tracking: Correctly handle debugfs errors

PATCH Superseded Michal Wajdeczko 4 participants 8 messages Nov 28, 2017 – Dec 15, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/kms_frontbuffer_tracking: Correctly handle debugfs errors

In commit 3f6ae7b19 ("igt/kms_frontbuffer_tracking: Keep the debugfs dir around") we introduced custom variant of __igt_debugfs_read function that fires assert when debugfs returns an error. Replace that assert with proper error handling to allow use of errors like -ENODEV.

---
 tests/kms_frontbuffer_tracking.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/kms_frontbuffer_tracking.c +2 -1
index a068c8a..50019d1 100644
@@ -783,7 +783,8 @@ static bool set_mode_for_params(struct modeset_params *params)
 static void __debugfs_read(const char *param, char *buf, int len)
 {
 	len = igt_sysfs_read(drm.debugfs, param, buf, len - 1);
-	igt_assert(len > 0);
+	if (len < 0)
+		len = 0;
 	buf[len] = '\0';
 }
 
Signature · 6 lines
2.7.4

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

✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Correctly handle debugfs errors

== Series Details ==

== Series Details ==

Series: tests/kms_frontbuffer_tracking: Correctly handle debugfs errors
URL : https://patchwork.freedesktop.org/series/34555/
State : success

== Summary ==

IGT patchset tested on top of latest successful build 5b3619f3751ecef55fa993984ddb59a458fcebed igt: Remove gem_ctx_basic

with latest DRM-Tip kernel build CI_DRM_3401
73f135dccc60 drm-tip: 2017y-11m-28d-14h-52m-10s UTC integration manifest

No testlist changes.

Test kms_pipe_crc_basic:

        Subgroup suspend-read-crc-pipe-b:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:440s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:450s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:384s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:516s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:279s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:512s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:505s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:485s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:471s
fi-elk-e7500     total:288  pass:229  dwarn:0   dfail:0   fail:0   skip:59  time:429s
fi-gdg-551       total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 time:271s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:540s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:425s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:430s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:477s
fi-ivb-3770      total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:454s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:485s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:524s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:477s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:531s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:588s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:458s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:541s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:564s
fi-skl-6700k     total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:519s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:499s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:444s
fi-snb-2520m     total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:418s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:615s
fi-cnl-y         total:235  pass:210  dwarn:0   dfail:0   fail:0   skip:24 
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:493s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_559/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v1 1/1
#2 lore raw
In reply to Michal Wajdeczko

Quoting Michal Wajdeczko (2017-11-28 17:01:15)

Quoted 4 lines

In commit 3f6ae7b19 ("igt/kms_frontbuffer_tracking: Keep the debugfs dir around") we introduced custom variant of __igt_debugfs_read function that fires assert when debugfs returns an error. Replace that assert with proper error handling to allow use of errors like -ENODEV.

Like ENODEV or just ENODEV?

Oh, it appears I goofed in c5da0662d1c0 and didn't change the open error from a bool to an int error code. You could also take the opportunity to then return -errno.

And here we can debate whether you want to use

if (len < 0) {
	igt_assert_eq(len, -ENODEV);
	len = 0;
}

Other than the topic of whether we want to flag any other error here (e.g. one could imagine a surprising EPERM, EACCES or ENFILE), looks ok.

Quoted 2 lines

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

#3 lore raw
Quoted 12 lines · Chris Wilson

Quoting Michal Wajdeczko (2017-11-28 17:01:15)

Quoted 4 lines

In commit 3f6ae7b19 ("igt/kms_frontbuffer_tracking: Keep the debugfs dir around") we introduced custom variant of __igt_debugfs_read function that fires assert when debugfs returns an error. Replace that assert with proper error handling to allow use of errors like -ENODEV.

Like ENODEV or just ENODEV?

Oh, it appears I goofed in c5da0662d1c0 and didn't change the open error from a bool to an int error code. You could also take the opportunity to then return -errno.

Quoted 6 lines

And here we can debate whether you want to use

if (len < 0) {
	igt_assert_eq(len, -ENODEV);
	len = 0;
}

Let's be explicit at this time, can you resend (with the R-b and this change), Michal. I'll then merge this and the kernel patch.

Regards, Joonas

Quoted 13 lines

Other than the topic of whether we want to flag any other error here (e.g. one could imagine a surprising EPERM, EACCES or ENFILE), looks ok.

Quoted 2 lines

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

Signature · 7 lines
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

Quoting Joonas Lahtinen (2017-12-04 10:45:13)

Quoted 15 lines · Chris Wilson
Quoted 14 lines

Quoting Michal Wajdeczko (2017-11-28 17:01:15)

Quoted 4 lines

In commit 3f6ae7b19 ("igt/kms_frontbuffer_tracking: Keep the debugfs dir around") we introduced custom variant of __igt_debugfs_read function that fires assert when debugfs returns an error. Replace that assert with proper error handling to allow use of errors like -ENODEV.

Like ENODEV or just ENODEV?

Oh, it appears I goofed in c5da0662d1c0 and didn't change the open error from a bool to an int error code. You could also take the opportunity to then return -errno.

And here we can debate whether you want to use

Quoted 7 lines
Quoted 4 lines
if (len < 0) {
      igt_assert_eq(len, -ENODEV);
      len = 0;
}

Let's be explicit at this time, can you resend (with the R-b and this change), Michal. I'll then merge this and the kernel patch.

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

#5 lore raw

✓ Fi.CI.IGT: success for tests/kms_frontbuffer_tracking: Correctly handle debugfs errors

In reply to Michal Wajdeczko
== Series Details ==

== Series Details ==

Series: tests/kms_frontbuffer_tracking: Correctly handle debugfs errors
URL : https://patchwork.freedesktop.org/series/34555/
State : success

== Summary ==

Blacklisted hosts:

shard-hsw        total:2621 pass:1507 dwarn:6   dfail:2   fail:6   skip:1099 time:9215s
shard-kbl        total:2474 pass:1656 dwarn:15  dfail:8   fail:14  skip:774 time:8415s
shard-snb        total:2484 pass:1193 dwarn:18  dfail:10  fail:4   skip:1253 time:7010s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_559/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#6 lore raw

✓ Fi.CI.BAT: success for tests/kms_frontbuffer_tracking: Correctly handle debugfs errors

In reply to Michal Wajdeczko
== Series Details ==

== Series Details ==

Series: tests/kms_frontbuffer_tracking: Correctly handle debugfs errors
URL : https://patchwork.freedesktop.org/series/34555/
State : success

== Summary ==

IGT patchset tested on top of latest successful build
4112f30aedbb252bf8cdd27dbba485c0458faca7 igt/gem_shrink: Exercise allocations in the middle of execbuf under oom-pressure

with latest DRM-Tip kernel build CI_DRM_3508
1a717c76c96c drm-tip: 2017y-12m-13d-14h-48m-36s UTC integration manifest

No testlist changes.

Test debugfs_test:

        Subgroup read_all_entries:
                dmesg-warn -> DMESG-FAIL (fi-elk-e7500) fdo#103989
Test gem_mmap_gtt:
        Subgroup basic-small-bo-tiledx:
                pass       -> FAIL       (fi-gdg-551) fdo#102575
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (fi-kbl-r) fdo#104172

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104172 https://bugs.freedesktop.org/show_bug.cgi?id=104172

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:440s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:452s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:380s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:517s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:281s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:506s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:506s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:488s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:470s
fi-elk-e7500     total:224  pass:163  dwarn:14  dfail:1   fail:0   skip:45 
fi-gdg-551       total:288  pass:178  dwarn:1   dfail:0   fail:1   skip:108 time:271s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:543s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:412s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:416s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:396s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:473s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:430s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:482s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:527s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:474s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:529s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:597s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:445s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:538s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:564s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:495s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:452s
fi-snb-2520m     total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:420s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:591s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:492s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_664/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#7 lore raw

✗ Fi.CI.IGT: warning for tests/kms_frontbuffer_tracking: Correctly handle debugfs errors

In reply to Michal Wajdeczko
== Series Details ==

== Series Details ==

Series: tests/kms_frontbuffer_tracking: Correctly handle debugfs errors
URL : https://patchwork.freedesktop.org/series/34555/
State : warning

== Summary ==

Test kms_frontbuffer_tracking:

        Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
                fail       -> PASS       (shard-snb) fdo#101623 +1
Test kms_fbcon_fbt:
        Subgroup fbc:
                pass       -> SKIP       (shard-hsw)
Test kms_cursor_crc:
        Subgroup cursor-256x256-suspend:
                skip       -> PASS       (shard-snb) fdo#103375

fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375

shard-hsw        total:2712 pass:1536 dwarn:1   dfail:0   fail:10  skip:1165 time:9475s
shard-snb        total:2712 pass:1309 dwarn:1   dfail:0   fail:12  skip:1390 time:8091s

Blacklisted hosts:
shard-apl total:2712 pass:1687 dwarn:1 dfail:0 fail:23 skip:1001 time:13871s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_664/shards.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx