tests/intel/perf_pmu: Add a test to repro NPD during FLR
PATCH 1/1 tests/intel/perf_pmu: Add a test to repro NPD during FLR
Open a PMU event (actual-frequency) and then do an unbind, followed by a bind. This is causing NPD during bind.
--- tests/intel/perf_pmu.c | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+)
tests/intel/perf_pmu.c +60 -0
@@ -249,6 +249,11 @@* Description: Test the i915 pmu perf interface * Feature: i915 pmu perf interface, pmu * Test category: Perf +* +* SUBTEST: npd +* Description: Test null pointer dereference case +* Feature: i915 pmu perf interface, pmu +* Test category: Perf */ IGT_TEST_DESCRIPTION ("Test the i915 pmu perf interface" );
@@ -2417,6 +2422,58 @@ static void test_unload(unsigned int num_engines)igt_assert_eq (__igt_i915_driver_unload (NULL ),0 ); } +static int sysfs_driver (int i915) +{ +int dir, drv; + + dir =igt_sysfs_open (i915); +igt_assert (dir !=-1 ); + + drv =openat (dir,"device/driver" ,O_DIRECTORY ); +close (dir); + +igt_assert (drv !=-1 ); +return drv; +} + +static void test_npd (void ) +{ +struct pci_device *pdev; +int fd, i915, drv; +char *snd =NULL ; +char addr[80 ]; +uint64_t val; + + i915 =__drm_open_driver (DRIVER_INTEL ); + pdev =igt_device_get_pci_device (i915); + +snprintf (addr,sizeof (addr),"%04x:%02x:%02x.%d" , + pdev->domain, pdev->bus, pdev->dev, pdev->func); +igt_debug ("Opened %s\n" , addr); + + fd =open_pmu (i915,I915_PMU_ACTUAL_FREQUENCY ); + + drv =sysfs_driver (i915); +close (i915); + +igt_audio_driver_unload (&snd); + + val =pmu_read_single (fd); + +igt_set_timeout (30 ,"Driver unbind timeout!" ); +igt_assert_f (igt_sysfs_set (drv,"unbind" , addr), +"Driver unbind failure (%s)!\n" , addr); +igt_reset_timeout (); + +igt_set_timeout (30 ,"Driver bind timeout!" ); +igt_assert_f (igt_sysfs_set (drv,"bind" , addr), +"Driver bind failure (%s)!\n" , addr); +igt_reset_timeout (); + +close (drv); +close (fd); +} +static void pmu_read (int i915) {char val[128 ];
@@ -2745,6 +2802,9 @@ igt_mainfree (drpc); } + igt_subtest("npd") +test_npd (); + igt_subtest("module-unload") {igt_require (igt_i915_driver_unload () ==0 );for (int pass =0 ; pass <3 ; pass++)
Signature · 1 line
2.34.1
Patchwork
CI✗ CI.xeBAT: failure for tests/intel/perf_pmu: Add a test to repro NPD during FLR
== Series Details ==
== Series Details ==
Series: tests/intel/perf_pmu: Add a test to repro NPD during FLR
URL : https://patchwork.freedesktop.org/series/128698/
State : failure
== Summary ==
CI Bug Log - changes from XEIGT_7670_BAT -> XEIGTPW_10519_BAT
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with XEIGTPW_10519_BAT absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in XEIGTPW_10519_BAT, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
Participating hosts (4 -> 4)
------------------------------
No changes in participating hosts
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in XEIGTPW_10519_BAT:
### IGT changes ###
#### Possible regressions ####
* igt@kms_pipe_crc_basic@read-crc-frame-sequence:
- bat-dg2-oem2: [PASS][1] -> [SKIP][2] +1 other test skip
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7670/bat-dg2-oem2/igt@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10519/bat-dg2-oem2/igt@[email protected]
* igt@xe_evict@evict-cm-threads-small:
- bat-dg2-oem2: [PASS][3] -> [TIMEOUT][4]
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7670/bat-dg2-oem2/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10519/bat-dg2-oem2/igt@[email protected]
Known issues
------------
Here are the changes found in XEIGTPW_10519_BAT that come from known issues:
### IGT changes ###
#### Possible fixes ####
* igt@xe_exec_fault_mode@twice-bindexecqueue-rebind-prefetch:
- bat-pvc-2: [INCOMPLETE][5] -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7670/bat-pvc-2/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10519/bat-pvc-2/igt@[email protected]
Build changes
-------------
* IGT: IGT_7670 -> IGTPW_10519
* Linux: xe-618-79184e72263e91528195db01783148435c7e4fad -> xe-621-3095fbb4deb0722d417b6a4ad4213e2ed9ecd052
IGTPW_10519: 10519
IGT_7670: 1b32bcdb2d9965090234739aba891a90743e01c4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-618-79184e72263e91528195db01783148435c7e4fad: 79184e72263e91528195db01783148435c7e4fad xe-621-3095fbb4deb0722d417b6a4ad4213e2ed9ecd052: 3095fbb4deb0722d417b6a4ad4213e2ed9ecd052
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10519/index.html
Patchwork
CI✗ Fi.CI.BAT: failure for tests/intel/perf_pmu: Add a test to repro NPD during FLR
In reply to Umesh Nerlige Ramappa== Series Details ==
== Series Details ==
Series: tests/intel/perf_pmu: Add a test to repro NPD during FLR
URL : https://patchwork.freedesktop.org/series/128698/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_14116 -> IGTPW_10519
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_10519 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_10519, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/index.html
Participating hosts (37 -> 37)
------------------------------
Additional (2): bat-mtlp-8 bat-adls-6
Missing (2): bat-rpls-2 fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_10519:
### IGT changes ###
#### Possible regressions ####
* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-a-dp-1:
- fi-kbl-7567u: [PASS][1] -> [FAIL][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14116/fi-kbl-7567u/igt@kms_pipe_crc_basic@[email protected]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/fi-kbl-7567u/igt@kms_pipe_crc_basic@[email protected]
Known issues
------------
Here are the changes found in IGTPW_10519 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@debugfs_test@basic-hwmon:
- bat-mtlp-8: NOTRUN -> [SKIP][3] ([i915#9318])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@gem_lmem_swapping@random-engines:
- fi-bsw-n3050: NOTRUN -> [SKIP][4] ([fdo#109271]) +15 other tests skip
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/fi-bsw-n3050/igt@[email protected]
* igt@gem_lmem_swapping@verify-random:
- bat-mtlp-8: NOTRUN -> [SKIP][5] ([i915#4613]) +3 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@gem_mmap@basic:
- bat-mtlp-8: NOTRUN -> [SKIP][6] ([i915#4083])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@gem_mmap_gtt@basic:
- bat-mtlp-8: NOTRUN -> [SKIP][7] ([i915#4077]) +2 other tests skip
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@gem_render_tiled_blits@basic:
- bat-mtlp-8: NOTRUN -> [SKIP][8] ([i915#4079]) +1 other test skip
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@i915_pm_rps@basic-api:
- bat-mtlp-8: NOTRUN -> [SKIP][9] ([i915#6621])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@i915_selftest@live@gt_heartbeat:
- fi-kbl-7567u: [PASS][10] -> [DMESG-WARN][11] ([i915#9730]) +31 other tests dmesg-warn
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14116/fi-kbl-7567u/igt@i915_selftest@live@gt_heartbeat.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/fi-kbl-7567u/igt@i915_selftest@live@gt_heartbeat.html
* igt@i915_suspend@basic-s2idle-without-i915:
- fi-kbl-7567u: [PASS][12] -> [DMESG-WARN][13] ([i915#180] / [i915#1982])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14116/fi-kbl-7567u/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/fi-kbl-7567u/igt@[email protected]
* igt@i915_suspend@basic-s3-without-i915:
- bat-mtlp-8: NOTRUN -> [SKIP][14] ([i915#6645])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-mtlp-8: NOTRUN -> [SKIP][15] ([i915#5190])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-mtlp-8: NOTRUN -> [SKIP][16] ([i915#4212]) +8 other tests skip
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-mtlp-8: NOTRUN -> [SKIP][17] ([i915#4213]) +1 other test skip
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@kms_dsc@dsc-basic:
- bat-mtlp-8: NOTRUN -> [SKIP][18] ([i915#3555] / [i915#3840] / [i915#9159])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@kms_force_connector_basic@force-load-detect:
- bat-mtlp-8: NOTRUN -> [SKIP][19] ([fdo#109285])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@kms_force_connector_basic@prune-stale-modes:
- bat-mtlp-8: NOTRUN -> [SKIP][20] ([i915#5274])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@kms_pipe_crc_basic@hang-read-crc@pipe-c-dp-1:
- fi-kbl-7567u: [PASS][21] -> [FAIL][22] ([i915#9666])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14116/fi-kbl-7567u/igt@kms_pipe_crc_basic@[email protected]
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/fi-kbl-7567u/igt@kms_pipe_crc_basic@[email protected]
* igt@kms_pipe_crc_basic@nonblocking-crc@pipe-c-dp-1:
- fi-kbl-7567u: [PASS][23] -> [DMESG-FAIL][24] ([i915#8585])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14116/fi-kbl-7567u/igt@kms_pipe_crc_basic@[email protected]
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/fi-kbl-7567u/igt@kms_pipe_crc_basic@[email protected]
* igt@kms_pm_rpm@basic-pci-d3-state:
- fi-kbl-7567u: [PASS][25] -> [DMESG-WARN][26] ([i915#8585]) +11 other tests dmesg-warn
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14116/fi-kbl-7567u/igt@[email protected]
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/fi-kbl-7567u/igt@[email protected]
* igt@kms_setmode@basic-clone-single-crtc:
- bat-mtlp-8: NOTRUN -> [SKIP][27] ([i915#3555] / [i915#8809])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@prime_vgem@basic-fence-mmap:
- bat-mtlp-8: NOTRUN -> [SKIP][28] ([i915#3708] / [i915#4077]) +1 other test skip
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
* igt@prime_vgem@basic-fence-read:
- bat-mtlp-8: NOTRUN -> [SKIP][29] ([i915#3708]) +2 other tests skip
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-mtlp-8/igt@[email protected]
#### Possible fixes ####
* igt@dmabuf@all-tests@sanitycheck:
- fi-skl-6600u: [INCOMPLETE][30] -> [PASS][31]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14116/fi-skl-6600u/igt@dmabuf@[email protected]
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/fi-skl-6600u/igt@dmabuf@[email protected]
* igt@i915_selftest@live@hangcheck:
- {bat-dg2-14}: [ABORT][32] ([i915#9840]) -> [PASS][33]
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_14116/bat-dg2-14/igt@i915_selftest@[email protected]
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/bat-dg2-14/igt@i915_selftest@[email protected]
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#3840]: https://gitlab.freedesktop.org/drm/intel/issues/3840
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5591]: https://gitlab.freedesktop.org/drm/intel/issues/5591
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#6645]: https://gitlab.freedesktop.org/drm/intel/issues/6645
[i915#8585]: https://gitlab.freedesktop.org/drm/intel/issues/8585
[i915#8809]: https://gitlab.freedesktop.org/drm/intel/issues/8809
[i915#9159]: https://gitlab.freedesktop.org/drm/intel/issues/9159
[i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318
[i915#9666]: https://gitlab.freedesktop.org/drm/intel/issues/9666
[i915#9688]: https://gitlab.freedesktop.org/drm/intel/issues/9688
[i915#9730]: https://gitlab.freedesktop.org/drm/intel/issues/9730
[i915#9732]: https://gitlab.freedesktop.org/drm/intel/issues/9732
[i915#9840]: https://gitlab.freedesktop.org/drm/intel/issues/9840
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7670 -> IGTPW_10519
CI-20190529: 20190529
CI_DRM_14116: 3b92a66f4bc89f4fa6e9e9369ac8243e23670030 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_10519: 10519
IGT_7670: 1b32bcdb2d9965090234739aba891a90743e01c4 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Testlist changes
----------------
+igt@perf_pmu@npd
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10519/index.html
Hi Umesh,
Quoted 2 lines · Umesh Nerlige Ramappa
Open a PMU event (actual-frequency) and then do an unbind, followed by a bind. This is causing NPD during bind.
------------------^^^
Please describe what NPD means here.
Quoted 11 lines
Signed-off-by Umesh Nerlige Ramappa <[email protected]>--- tests/intel/perf_pmu.c | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+)tests/intel/perf_pmu.c +0
-0
tests/intel/perf_pmu.c line 253
Quoted 5 lines
tests/intel/perf_pmu.c +2
-0@@ -249,6 +249,11 @@* Description: Test the i915 pmu perf interface * Feature: i915 pmu perf interface, pmu * Test category: Perf +* +* SUBTEST: npd
---------------^^^
Please use some other name for subtest, NPD may happen in other scenarios, for example:
* SUBTEST: bind-openevent-unbind-bind
Regards,
Kamil
Quoted 78 lines
tests/intel/perf_pmu.c +58
-0+* Description: Test null pointer dereference case +* Feature: i915 pmu perf interface, pmu +* Test category: Perf */ IGT_TEST_DESCRIPTION ("Test the i915 pmu perf interface" );@@ -2417,6 +2422,58 @@ static void test_unload(unsigned int num_engines)igt_assert_eq (__igt_i915_driver_unload (NULL ),0 ); } +static int sysfs_driver (int i915) +{ +int dir, drv; + + dir =igt_sysfs_open (i915); +igt_assert (dir !=-1 ); + + drv =openat (dir,"device/driver" ,O_DIRECTORY ); +close (dir); + +igt_assert (drv !=-1 ); +return drv; +} + +static void test_npd (void ) +{ +struct pci_device *pdev; +int fd, i915, drv; +char *snd =NULL ; +char addr[80 ]; +uint64_t val; + + i915 =__drm_open_driver (DRIVER_INTEL ); + pdev =igt_device_get_pci_device (i915); + +snprintf (addr,sizeof (addr),"%04x:%02x:%02x.%d" , + pdev->domain, pdev->bus, pdev->dev, pdev->func); +igt_debug ("Opened %s\n" , addr); + + fd =open_pmu (i915,I915_PMU_ACTUAL_FREQUENCY ); + + drv =sysfs_driver (i915); +close (i915); + +igt_audio_driver_unload (&snd); + + val =pmu_read_single (fd); + +igt_set_timeout (30 ,"Driver unbind timeout!" ); +igt_assert_f (igt_sysfs_set (drv,"unbind" , addr), +"Driver unbind failure (%s)!\n" , addr); +igt_reset_timeout (); + +igt_set_timeout (30 ,"Driver bind timeout!" ); +igt_assert_f (igt_sysfs_set (drv,"bind" , addr), +"Driver bind failure (%s)!\n" , addr); +igt_reset_timeout (); + +close (drv); +close (fd); +} +static void pmu_read (int i915) {char val[128 ];@@ -2745,6 +2802,9 @@ igt_mainfree (drpc); } + igt_subtest("npd") +test_npd (); + igt_subtest("module-unload") {igt_require (igt_i915_driver_unload () ==0 );for (int pass =0 ; pass <3 ; pass++)Signature · 1 line
2.34.1