igt: Help out coccinelle
cover igt: Help out coccinelle
From: Ville Syrjälä <[email protected]>
Coccinelle has trouble parsing a lot of the magic macros used throughout igt. Convert some of the macros to a form coccinelle understands, and provide a pre-made iterators.cocci script that people can include in their own scripts to help coccinelle with the iterator macros.
Ville Syrjälä (7):
igt: Make igt_fixture look like an iterator
igt: Make igt_subtest_group look like an iterator
igt: Make igt_main look more like a function
igt: Make igt_simple_main look more like a function
igt: Make igt_main*() look like normal function definition
igt: Make igt_simple_main*() look like normal function definition scripts/cocci: Add iterators.cocci
benchmarks/gem_userptr_benchmark.c | 6 +- benchmarks/kms_fb_stress.c | 2 +- lib/igt_aux.c | 6 +- lib/igt_core.c | 42 ++-- lib/igt_core.h | 42 ++-- lib/igt_dir.c | 8 +- lib/igt_gt.c | 2 +- lib/igt_kmod.c | 12 +- lib/igt_types.h | 2 +- lib/intel_batchbuffer.c | 2 +- lib/tests/bad_subtest_type.c | 2 +- lib/tests/i915_perf_data_alignment.c | 2 +- lib/tests/igt_abort.c | 2 +- lib/tests/igt_assert.c | 2 +- lib/tests/igt_audio.c | 8 +- lib/tests/igt_can_fail.c | 4 +- lib/tests/igt_can_fail_simple.c | 2 +- lib/tests/igt_describe.c | 8 +- lib/tests/igt_edid.c | 2 +- lib/tests/igt_exit_handler.c | 2 +- lib/tests/igt_facts.c | 2 +- lib/tests/igt_hook.c | 6 +- lib/tests/igt_ktap_parser.c | 2 +- lib/tests/igt_nesting.c | 16 +- lib/tests/igt_runnercomms_packets.c | 2 +- lib/tests/igt_simple_test_subtests.c | 2 +- lib/tests/igt_simulation.c | 2 +- lib/tests/igt_stats.c | 2 +- lib/tests/igt_subtest_group.c | 18 +- lib/tests/igt_timeout.c | 2 +- lib/tests/igt_types.c | 22 +-- runner/resultgen.c | 2 +- runner/runner_json_tests.c | 2 +- runner/runner_kmemleak_test.c | 10 +- runner/runner_tests.c | 184 +++++++++--------- runner/testdata/abort-dynamic.c | 2 +- runner/testdata/abort-fixture.c | 4 +- runner/testdata/abort-simple.c | 2 +- runner/testdata/abort.c | 2 +- runner/testdata/dynamic.c | 2 +- runner/testdata/no-subtests.c | 2 +- runner/testdata/skippers.c | 4 +- runner/testdata/successtest.c | 2 +- scripts/iterators.cocci | 53 +++++ tests/amdgpu/amd_abm.c | 6 +- tests/amdgpu/amd_assr.c | 6 +- tests/amdgpu/amd_basic.c | 6 +- tests/amdgpu/amd_basic_ex.c | 6 +- tests/amdgpu/amd_basic_multi_gpu.c | 6 +- tests/amdgpu/amd_bo.c | 6 +- tests/amdgpu/amd_bypass.c | 6 +- tests/amdgpu/amd_color.c | 6 +- tests/amdgpu/amd_cp_dma_misc.c | 6 +- tests/amdgpu/amd_cs_nop.c | 6 +- tests/amdgpu/amd_deadlock.c | 6 +- tests/amdgpu/amd_dispatch.c | 6 +- tests/amdgpu/amd_dp_dsc.c | 6 +- tests/amdgpu/amd_freesync_video_mode.c | 6 +- tests/amdgpu/amd_fuzzing.c | 6 +- tests/amdgpu/amd_gang_cs.c | 6 +- tests/amdgpu/amd_hotplug.c | 6 +- tests/amdgpu/amd_ilr.c | 6 +- tests/amdgpu/amd_info.c | 6 +- tests/amdgpu/amd_jpeg_dec.c | 6 +- tests/amdgpu/amd_jpeg_queue.c | 6 +- tests/amdgpu/amd_link_settings.c | 6 +- tests/amdgpu/amd_mall.c | 6 +- tests/amdgpu/amd_max_bpc.c | 6 +- tests/amdgpu/amd_mem_leak.c | 6 +- tests/amdgpu/amd_mode_switch.c | 6 +- tests/amdgpu/amd_module_load.c | 4 +- tests/amdgpu/amd_multidisplay_modeset.c | 6 +- tests/amdgpu/amd_odm.c | 6 +- tests/amdgpu/amd_pci_unplug.c | 6 +- tests/amdgpu/amd_plane.c | 6 +- tests/amdgpu/amd_prime.c | 6 +- tests/amdgpu/amd_psr.c | 6 +- tests/amdgpu/amd_pstate.c | 6 +- tests/amdgpu/amd_queue_reset.c | 6 +- tests/amdgpu/amd_ras.c | 6 +- tests/amdgpu/amd_replay.c | 6 +- tests/amdgpu/amd_security.c | 6 +- tests/amdgpu/amd_subvp.c | 6 +- tests/amdgpu/amd_syncobj.c | 6 +- tests/amdgpu/amd_uvd_dec.c | 6 +- tests/amdgpu/amd_uvd_enc.c | 6 +- tests/amdgpu/amd_vce_enc.c | 6 +- tests/amdgpu/amd_vcn.c | 6 +- tests/amdgpu/amd_vcn_queue.c | 6 +- tests/amdgpu/amd_vm.c | 6 +- tests/amdgpu/amd_vpe.c | 6 +- tests/amdgpu/amd_vrr_range.c | 6 +- tests/chamelium/kms_chamelium_audio.c | 14 +- tests/chamelium/kms_chamelium_color.c | 8 +- tests/chamelium/kms_chamelium_edid.c | 18 +- tests/chamelium/kms_chamelium_frames.c | 18 +- tests/chamelium/kms_chamelium_hpd.c | 22 +-- .../kms_chamelium_sharpness_filter.c | 6 +- tests/core_auth.c | 6 +- tests/core_debugfs.c | 6 +- tests/core_getclient.c | 6 +- tests/core_getstats.c | 6 +- tests/core_getversion.c | 6 +- tests/core_hotunplug.c | 52 ++--- tests/core_setmaster.c | 10 +- tests/core_setmaster_vs_auth.c | 2 +- tests/core_sysfs.c | 6 +- tests/device_reset.c | 8 +- tests/dmabuf.c | 2 +- tests/dmabuf_sync_file.c | 6 +- tests/drm_buddy.c | 2 +- tests/drm_mm.c | 2 +- tests/drm_read.c | 4 +- tests/drm_virtgpu.c | 6 +- tests/dumb_buffer.c | 6 +- tests/fbdev.c | 18 +- tests/intel/api_intel_allocator.c | 6 +- tests/intel/api_intel_bb.c | 6 +- tests/intel/gem_bad_reloc.c | 6 +- tests/intel/gem_barrier_race.c | 6 +- tests/intel/gem_basic.c | 4 +- tests/intel/gem_blits.c | 6 +- tests/intel/gem_busy.c | 36 ++-- tests/intel/gem_caching.c | 6 +- tests/intel/gem_ccs.c | 6 +- tests/intel/gem_close.c | 4 +- tests/intel/gem_close_race.c | 6 +- tests/intel/gem_compute.c | 6 +- tests/intel/gem_concurrent_all.c | 52 ++--- tests/intel/gem_create.c | 10 +- tests/intel/gem_cs_tlb.c | 6 +- tests/intel/gem_ctx_bad_destroy.c | 6 +- tests/intel/gem_ctx_create.c | 6 +- tests/intel/gem_ctx_engines.c | 6 +- tests/intel/gem_ctx_exec.c | 12 +- tests/intel/gem_ctx_freq.c | 6 +- tests/intel/gem_ctx_isolation.c | 8 +- tests/intel/gem_ctx_param.c | 10 +- tests/intel/gem_ctx_persistence.c | 20 +- tests/intel/gem_ctx_shared.c | 20 +- tests/intel/gem_ctx_sseu.c | 10 +- tests/intel/gem_ctx_switch.c | 18 +- tests/intel/gem_eio.c | 18 +- tests/intel/gem_evict_alignment.c | 8 +- tests/intel/gem_evict_everything.c | 10 +- tests/intel/gem_exec_alignment.c | 4 +- tests/intel/gem_exec_async.c | 12 +- tests/intel/gem_exec_await.c | 6 +- tests/intel/gem_exec_balancer.c | 28 +-- tests/intel/gem_exec_basic.c | 6 +- tests/intel/gem_exec_big.c | 6 +- tests/intel/gem_exec_capture.c | 6 +- tests/intel/gem_exec_create.c | 6 +- tests/intel/gem_exec_endless.c | 10 +- tests/intel/gem_exec_fair.c | 6 +- tests/intel/gem_exec_fence.c | 50 ++--- tests/intel/gem_exec_flush.c | 10 +- tests/intel/gem_exec_gttfill.c | 8 +- tests/intel/gem_exec_latency.c | 14 +- tests/intel/gem_exec_lut_handle.c | 2 +- tests/intel/gem_exec_nop.c | 14 +- tests/intel/gem_exec_parallel.c | 6 +- tests/intel/gem_exec_params.c | 6 +- tests/intel/gem_exec_reloc.c | 18 +- tests/intel/gem_exec_schedule.c | 46 ++--- tests/intel/gem_exec_store.c | 6 +- tests/intel/gem_exec_suspend.c | 8 +- tests/intel/gem_exec_whisper.c | 10 +- tests/intel/gem_exercise_blt.c | 6 +- tests/intel/gem_fd_exhaustion.c | 2 +- tests/intel/gem_fence_thrash.c | 2 +- tests/intel/gem_fence_upload.c | 2 +- tests/intel/gem_fenced_exec_thrash.c | 6 +- tests/intel/gem_flink_basic.c | 4 +- tests/intel/gem_flink_race.c | 2 +- tests/intel/gem_gpgpu_fill.c | 6 +- tests/intel/gem_gtt_cpu_tlb.c | 2 +- tests/intel/gem_gtt_hog.c | 2 +- tests/intel/gem_gtt_speed.c | 2 +- tests/intel/gem_huc_copy.c | 6 +- tests/intel/gem_linear_blits.c | 10 +- tests/intel/gem_lmem_evict.c | 6 +- tests/intel/gem_lmem_swapping.c | 6 +- tests/intel/gem_lut_handle.c | 2 +- tests/intel/gem_madvise.c | 2 +- tests/intel/gem_media_fill.c | 6 +- tests/intel/gem_media_vme.c | 2 +- tests/intel/gem_mmap.c | 6 +- tests/intel/gem_mmap_gtt.c | 8 +- tests/intel/gem_mmap_offset.c | 6 +- tests/intel/gem_mmap_wc.c | 10 +- tests/intel/gem_partial_pwrite_pread.c | 8 +- tests/intel/gem_pipe_control_store_loop.c | 6 +- tests/intel/gem_ppgtt.c | 6 +- tests/intel/gem_pread.c | 6 +- tests/intel/gem_pread_after_blit.c | 8 +- tests/intel/gem_pwrite.c | 8 +- tests/intel/gem_pwrite_snooped.c | 2 +- tests/intel/gem_pxp.c | 16 +- tests/intel/gem_read_read_speed.c | 6 +- tests/intel/gem_readwrite.c | 6 +- tests/intel/gem_reg_read.c | 6 +- tests/intel/gem_render_copy.c | 6 +- tests/intel/gem_render_copy_redux.c | 6 +- tests/intel/gem_render_linear_blits.c | 4 +- tests/intel/gem_render_tiled_blits.c | 4 +- tests/intel/gem_request_retire.c | 4 +- tests/intel/gem_reset_stats.c | 12 +- tests/intel/gem_ringfill.c | 6 +- tests/intel/gem_set_tiling_vs_blt.c | 6 +- tests/intel/gem_set_tiling_vs_gtt.c | 2 +- tests/intel/gem_set_tiling_vs_pwrite.c | 2 +- tests/intel/gem_shrink.c | 4 +- tests/intel/gem_softpin.c | 16 +- tests/intel/gem_spin_batch.c | 12 +- tests/intel/gem_streaming_writes.c | 6 +- tests/intel/gem_stress.c | 2 +- tests/intel/gem_sync.c | 10 +- tests/intel/gem_tiled_blits.c | 12 +- tests/intel/gem_tiled_fence_blits.c | 12 +- tests/intel/gem_tiled_partial_pwrite_pread.c | 6 +- tests/intel/gem_tiled_pread_basic.c | 2 +- tests/intel/gem_tiled_pread_pwrite.c | 2 +- tests/intel/gem_tiled_swapping.c | 6 +- tests/intel/gem_tiled_wb.c | 2 +- tests/intel/gem_tiled_wc.c | 2 +- tests/intel/gem_tiling_max_stride.c | 2 +- tests/intel/gem_unfence_active_buffers.c | 2 +- tests/intel/gem_unref_active_buffers.c | 2 +- tests/intel/gem_userptr_blits.c | 24 +-- tests/intel/gem_vm_create.c | 10 +- tests/intel/gem_wait.c | 18 +- tests/intel/gem_watchdog.c | 8 +- tests/intel/gem_workarounds.c | 10 +- tests/intel/gen3_mixed_blits.c | 2 +- tests/intel/gen3_render_linear_blits.c | 2 +- tests/intel/gen3_render_mixed_blits.c | 2 +- tests/intel/gen3_render_tiledx_blits.c | 2 +- tests/intel/gen3_render_tiledy_blits.c | 2 +- tests/intel/gen7_exec_parse.c | 12 +- tests/intel/gen9_exec_parse.c | 6 +- tests/intel/i915_drm_fdinfo.c | 12 +- tests/intel/i915_fb_tiling.c | 6 +- tests/intel/i915_getparams_basic.c | 4 +- tests/intel/i915_hangman.c | 8 +- tests/intel/i915_module_load.c | 2 +- tests/intel/i915_pciid.c | 2 +- tests/intel/i915_pm_freq_api.c | 4 +- tests/intel/i915_pm_freq_mult.c | 6 +- tests/intel/i915_pm_rc6_residency.c | 12 +- tests/intel/i915_pm_rpm.c | 6 +- tests/intel/i915_pm_rps.c | 6 +- tests/intel/i915_pm_sseu.c | 4 +- tests/intel/i915_power.c | 6 +- tests/intel/i915_query.c | 10 +- tests/intel/i915_selftest.c | 2 +- tests/intel/i915_suspend.c | 6 +- tests/intel/intel_hwmon.c | 6 +- tests/intel/kms_big_fb.c | 10 +- tests/intel/kms_busy.c | 10 +- tests/intel/kms_ccs.c | 10 +- tests/intel/kms_cdclk.c | 6 +- tests/intel/kms_dirtyfb.c | 6 +- tests/intel/kms_dp_link_training.c | 6 +- tests/intel/kms_dp_linktrain_fallback.c | 6 +- tests/intel/kms_draw_crc.c | 6 +- tests/intel/kms_dsc.c | 6 +- tests/intel/kms_fb_coherency.c | 6 +- tests/intel/kms_fbc_dirty_rect.c | 6 +- tests/intel/kms_fbcon_fbt.c | 6 +- tests/intel/kms_fence_pin_leak.c | 2 +- tests/intel/kms_flip_scaled_crc.c | 6 +- tests/intel/kms_flip_tiling.c | 6 +- tests/intel/kms_frontbuffer_tracking.c | 10 +- tests/intel/kms_joiner.c | 22 +-- tests/intel/kms_legacy_colorkey.c | 6 +- tests/intel/kms_mmap_write_crc.c | 6 +- tests/intel/kms_pipe_b_c_ivb.c | 6 +- tests/intel/kms_pipe_stress.c | 6 +- tests/intel/kms_pm_backlight.c | 6 +- tests/intel/kms_pm_dc.c | 6 +- tests/intel/kms_pm_lpsp.c | 6 +- tests/intel/kms_pm_rpm.c | 6 +- tests/intel/kms_psr.c | 6 +- tests/intel/kms_psr2_sf.c | 6 +- tests/intel/kms_psr2_su.c | 6 +- tests/intel/kms_psr_stress_test.c | 6 +- tests/intel/kms_pwrite_crc.c | 2 +- tests/intel/perf.c | 14 +- tests/intel/perf_pmu.c | 18 +- tests/intel/prime_busy.c | 10 +- tests/intel/prime_mmap.c | 6 +- tests/intel/prime_mmap_coherency.c | 6 +- tests/intel/prime_mmap_kms.c | 6 +- tests/intel/prime_self_import.c | 2 +- tests/intel/sysfs_defaults.c | 6 +- tests/intel/sysfs_heartbeat_interval.c | 6 +- tests/intel/sysfs_preempt_timeout.c | 6 +- tests/intel/sysfs_timeslice_duration.c | 6 +- tests/intel/xe_ccs.c | 6 +- tests/intel/xe_compute.c | 8 +- tests/intel/xe_compute_preempt.c | 6 +- tests/intel/xe_configfs.c | 6 +- tests/intel/xe_copy_basic.c | 6 +- tests/intel/xe_create.c | 6 +- tests/intel/xe_debugfs.c | 6 +- tests/intel/xe_dma_buf_sync.c | 6 +- tests/intel/xe_drm_fdinfo.c | 6 +- tests/intel/xe_eu_stall.c | 6 +- tests/intel/xe_eudebug.c | 14 +- tests/intel/xe_eudebug_online.c | 10 +- tests/intel/xe_eudebug_sriov.c | 6 +- tests/intel/xe_evict.c | 6 +- tests/intel/xe_evict_ccs.c | 8 +- tests/intel/xe_exec_atomic.c | 6 +- tests/intel/xe_exec_balancer.c | 6 +- tests/intel/xe_exec_basic.c | 6 +- tests/intel/xe_exec_capture.c | 6 +- tests/intel/xe_exec_compute_mode.c | 6 +- tests/intel/xe_exec_fault_mode.c | 6 +- tests/intel/xe_exec_mix_modes.c | 6 +- tests/intel/xe_exec_queue_property.c | 10 +- tests/intel/xe_exec_reset.c | 6 +- tests/intel/xe_exec_sip.c | 6 +- tests/intel/xe_exec_sip_eudebug.c | 18 +- tests/intel/xe_exec_store.c | 6 +- tests/intel/xe_exec_system_allocator.c | 6 +- tests/intel/xe_exec_threads.c | 6 +- tests/intel/xe_exercise_blt.c | 6 +- tests/intel/xe_fault_injection.c | 8 +- tests/intel/xe_gpgpu_fill.c | 6 +- tests/intel/xe_gt_freq.c | 6 +- tests/intel/xe_huc_copy.c | 6 +- tests/intel/xe_intel_bb.c | 6 +- tests/intel/xe_live_ktest.c | 2 +- tests/intel/xe_media_fill.c | 6 +- tests/intel/xe_mmap.c | 10 +- tests/intel/xe_module_load.c | 2 +- tests/intel/xe_noexec_ping_pong.c | 6 +- tests/intel/xe_oa.c | 22 +-- tests/intel/xe_pat.c | 6 +- tests/intel/xe_peer2peer.c | 6 +- tests/intel/xe_pm.c | 8 +- tests/intel/xe_pm_residency.c | 6 +- tests/intel/xe_pmu.c | 26 +-- tests/intel/xe_prime_self_import.c | 6 +- tests/intel/xe_pxp.c | 14 +- tests/intel/xe_query.c | 6 +- tests/intel/xe_render_copy.c | 6 +- tests/intel/xe_spin_batch.c | 6 +- tests/intel/xe_sriov_auto_provisioning.c | 6 +- tests/intel/xe_sriov_flr.c | 6 +- tests/intel/xe_sriov_scheduling.c | 6 +- tests/intel/xe_sriov_vram.c | 6 +- tests/intel/xe_survivability.c | 6 +- tests/intel/xe_sysfs_defaults.c | 6 +- tests/intel/xe_sysfs_preempt_timeout.c | 6 +- tests/intel/xe_sysfs_scheduler.c | 6 +- tests/intel/xe_sysfs_timeslice_duration.c | 6 +- tests/intel/xe_tlb.c | 6 +- tests/intel/xe_vm.c | 6 +- tests/intel/xe_waitfence.c | 6 +- tests/intel/xe_wedged.c | 6 +- tests/kms_3d.c | 6 +- tests/kms_addfb_basic.c | 68 +++---- tests/kms_async_flips.c | 10 +- tests/kms_atomic.c | 6 +- tests/kms_atomic_interruptible.c | 6 +- tests/kms_atomic_transition.c | 6 +- tests/kms_bw.c | 6 +- tests/kms_color.c | 12 +- tests/kms_concurrent.c | 6 +- tests/kms_content_protection.c | 14 +- tests/kms_cursor_crc.c | 24 +-- tests/kms_cursor_edge_walk.c | 8 +- tests/kms_cursor_legacy.c | 40 ++-- tests/kms_debugfs.c | 6 +- tests/kms_display_modes.c | 6 +- tests/kms_dither.c | 6 +- tests/kms_dp_aux_dev.c | 2 +- tests/kms_feature_discovery.c | 12 +- tests/kms_flip.c | 6 +- tests/kms_flip_event_leak.c | 6 +- tests/kms_force_connector_basic.c | 6 +- tests/kms_getfb.c | 30 +-- tests/kms_hdmi_inject.c | 6 +- tests/kms_hdr.c | 6 +- tests/kms_invalid_mode.c | 6 +- tests/kms_lease.c | 12 +- tests/kms_multipipe_modeset.c | 6 +- tests/kms_panel_fitting.c | 8 +- tests/kms_pipe_crc_basic.c | 6 +- tests/kms_plane.c | 6 +- tests/kms_plane_alpha_blend.c | 6 +- tests/kms_plane_cursor.c | 6 +- tests/kms_plane_lowres.c | 6 +- tests/kms_plane_multiple.c | 6 +- tests/kms_plane_scaling.c | 14 +- tests/kms_prime.c | 18 +- tests/kms_prop_blob.c | 10 +- tests/kms_properties.c | 14 +- tests/kms_rmfb.c | 6 +- tests/kms_rotation_crc.c | 8 +- tests/kms_scaling_modes.c | 6 +- tests/kms_selftest.c | 2 +- tests/kms_sequence.c | 6 +- tests/kms_setmode.c | 6 +- tests/kms_sharpness_filter.c | 6 +- tests/kms_sysfs_edid_timing.c | 2 +- tests/kms_tiled_display.c | 6 +- tests/kms_tv_load_detect.c | 6 +- tests/kms_universal_plane.c | 6 +- tests/kms_vblank.c | 6 +- tests/kms_vrr.c | 10 +- tests/kms_writeback.c | 6 +- tests/meta_test.c | 4 +- tests/msm/msm_mapping.c | 6 +- tests/msm/msm_recovery.c | 6 +- tests/msm/msm_shrink.c | 6 +- tests/msm/msm_submit.c | 6 +- tests/msm/msm_submitoverhead.c | 6 +- tests/nouveau_crc.c | 10 +- tests/panfrost/panfrost_gem_new.c | 6 +- tests/panfrost/panfrost_get_param.c | 6 +- tests/panfrost/panfrost_prime.c | 6 +- tests/panfrost/panfrost_submit.c | 6 +- tests/panthor/panthor_gem.c | 6 +- tests/panthor/panthor_group.c | 6 +- tests/panthor/panthor_query.c | 6 +- tests/panthor/panthor_vm.c | 6 +- tests/prime_nv_api.c | 6 +- tests/prime_nv_pcopy.c | 6 +- tests/prime_nv_test.c | 6 +- tests/prime_udl.c | 2 +- tests/prime_vgem.c | 24 +-- tests/sriov_basic.c | 6 +- tests/sw_sync.c | 4 +- tests/syncobj_basic.c | 6 +- tests/syncobj_eventfd.c | 6 +- tests/syncobj_timeline.c | 6 +- tests/syncobj_wait.c | 6 +- tests/template.c | 8 +- tests/testdisplay.c | 2 +- tests/tools_test.c | 4 +- tests/v3d/v3d_create_bo.c | 6 +- tests/v3d/v3d_get_bo_offset.c | 6 +- tests/v3d/v3d_get_param.c | 6 +- tests/v3d/v3d_job_submission.c | 6 +- tests/v3d/v3d_mmap.c | 6 +- tests/v3d/v3d_perfmon.c | 6 +- tests/v3d/v3d_submit_cl.c | 6 +- tests/v3d/v3d_submit_csd.c | 6 +- tests/v3d/v3d_wait_bo.c | 6 +- tests/vc4/vc4_create_bo.c | 6 +- tests/vc4/vc4_dmabuf_poll.c | 6 +- tests/vc4/vc4_label_bo.c | 6 +- tests/vc4/vc4_lookup_fail.c | 6 +- tests/vc4/vc4_mmap.c | 6 +- tests/vc4/vc4_perfmon.c | 6 +- tests/vc4/vc4_purgeable_bo.c | 6 +- tests/vc4/vc4_tiling.c | 6 +- tests/vc4/vc4_wait_bo.c | 6 +- tests/vc4/vc4_wait_seqno.c | 6 +- tests/vgem_basic.c | 14 +- tests/vgem_slow.c | 6 +- tests/vkms/vkms_configfs.c | 6 +- tests/vmwgfx/vmw_execution_buffer.c | 6 +- tests/vmwgfx/vmw_mob_stress.c | 6 +- tests/vmwgfx/vmw_prime.c | 12 +- tests/vmwgfx/vmw_ref_count.c | 6 +- tests/vmwgfx/vmw_surface_copy.c | 6 +- tests/vmwgfx/vmw_tri.c | 6 +- 472 files changed, 1930 insertions(+), 1875 deletions(-) create mode 100644 scripts/iterators.cocci
Signature · 1 line
2.49.1
PATCH 1/7 igt: Make igt_fixture look like an iterator
From: Ville Syrjälä <[email protected]>
Turn igt_fixture into igt_fixture(). This allows coccinelle to parse it when given a helping hand with the 'iterator name igt_fixture' directive.
Conversion done via:
$ find -type f -name \*.[ch] -exec sed -i 's/\([^_]\)igt_fixture/\1igt_fixture()/g' {} +--- benchmarks/gem_userptr_benchmark.c | 4 +- lib/igt_aux.c | 6 +- lib/igt_core.c | 18 +-- lib/igt_core.h | 8 +- lib/igt_dir.c | 8 +- lib/igt_gt.c | 2 +- lib/igt_kmod.c | 8 +- lib/igt_types.h | 2 +- lib/intel_batchbuffer.c | 2 +- lib/tests/igt_abort.c | 2 +- lib/tests/igt_audio.c | 4 +- lib/tests/igt_can_fail.c | 2 +- lib/tests/igt_describe.c | 2 +- lib/tests/igt_exit_handler.c | 2 +- lib/tests/igt_hook.c | 2 +- lib/tests/igt_nesting.c | 10 +- lib/tests/igt_simulation.c | 2 +- lib/tests/igt_subtest_group.c | 8 +- lib/tests/igt_types.c | 12 +- runner/resultgen.c | 2 +- runner/runner_kmemleak_test.c | 6 +- runner/runner_tests.c | 126 +++++++++--------- runner/testdata/abort-fixture.c | 2 +- runner/testdata/skippers.c | 2 +- tests/amdgpu/amd_abm.c | 4 +- tests/amdgpu/amd_assr.c | 4 +- tests/amdgpu/amd_basic.c | 4 +- tests/amdgpu/amd_basic_ex.c | 4 +- tests/amdgpu/amd_basic_multi_gpu.c | 4 +- tests/amdgpu/amd_bo.c | 4 +- tests/amdgpu/amd_bypass.c | 4 +- tests/amdgpu/amd_color.c | 4 +- tests/amdgpu/amd_cp_dma_misc.c | 4 +- tests/amdgpu/amd_cs_nop.c | 4 +- tests/amdgpu/amd_deadlock.c | 4 +- tests/amdgpu/amd_dispatch.c | 4 +- tests/amdgpu/amd_dp_dsc.c | 4 +- tests/amdgpu/amd_freesync_video_mode.c | 4 +- tests/amdgpu/amd_fuzzing.c | 4 +- tests/amdgpu/amd_gang_cs.c | 4 +- tests/amdgpu/amd_hotplug.c | 4 +- tests/amdgpu/amd_ilr.c | 4 +- tests/amdgpu/amd_info.c | 4 +- tests/amdgpu/amd_jpeg_dec.c | 4 +- tests/amdgpu/amd_jpeg_queue.c | 4 +- tests/amdgpu/amd_link_settings.c | 4 +- tests/amdgpu/amd_mall.c | 4 +- tests/amdgpu/amd_max_bpc.c | 4 +- tests/amdgpu/amd_mem_leak.c | 4 +- tests/amdgpu/amd_mode_switch.c | 4 +- tests/amdgpu/amd_module_load.c | 2 +- tests/amdgpu/amd_multidisplay_modeset.c | 4 +- tests/amdgpu/amd_odm.c | 4 +- tests/amdgpu/amd_pci_unplug.c | 4 +- tests/amdgpu/amd_plane.c | 4 +- tests/amdgpu/amd_prime.c | 4 +- tests/amdgpu/amd_psr.c | 4 +- tests/amdgpu/amd_pstate.c | 4 +- tests/amdgpu/amd_queue_reset.c | 4 +- tests/amdgpu/amd_ras.c | 4 +- tests/amdgpu/amd_replay.c | 4 +- tests/amdgpu/amd_security.c | 4 +- tests/amdgpu/amd_subvp.c | 4 +- tests/amdgpu/amd_syncobj.c | 4 +- tests/amdgpu/amd_uvd_dec.c | 4 +- tests/amdgpu/amd_uvd_enc.c | 4 +- tests/amdgpu/amd_vce_enc.c | 4 +- tests/amdgpu/amd_vcn.c | 4 +- tests/amdgpu/amd_vcn_queue.c | 4 +- tests/amdgpu/amd_vm.c | 4 +- tests/amdgpu/amd_vpe.c | 4 +- tests/amdgpu/amd_vrr_range.c | 4 +- tests/chamelium/kms_chamelium_audio.c | 8 +- tests/chamelium/kms_chamelium_color.c | 4 +- tests/chamelium/kms_chamelium_edid.c | 10 +- tests/chamelium/kms_chamelium_frames.c | 10 +- tests/chamelium/kms_chamelium_hpd.c | 12 +- .../kms_chamelium_sharpness_filter.c | 4 +- tests/core_auth.c | 2 +- tests/core_debugfs.c | 4 +- tests/core_getclient.c | 4 +- tests/core_getstats.c | 4 +- tests/core_getversion.c | 4 +- tests/core_hotunplug.c | 34 ++--- tests/core_setmaster.c | 6 +- tests/core_sysfs.c | 4 +- tests/device_reset.c | 4 +- tests/dmabuf_sync_file.c | 4 +- tests/drm_read.c | 2 +- tests/drm_virtgpu.c | 4 +- tests/dumb_buffer.c | 4 +- tests/fbdev.c | 12 +- tests/intel/api_intel_allocator.c | 4 +- tests/intel/api_intel_bb.c | 4 +- tests/intel/gem_bad_reloc.c | 4 +- tests/intel/gem_barrier_race.c | 4 +- tests/intel/gem_basic.c | 2 +- tests/intel/gem_blits.c | 4 +- tests/intel/gem_busy.c | 22 +-- tests/intel/gem_caching.c | 4 +- tests/intel/gem_ccs.c | 4 +- tests/intel/gem_close.c | 2 +- tests/intel/gem_close_race.c | 4 +- tests/intel/gem_compute.c | 4 +- tests/intel/gem_concurrent_all.c | 32 ++--- tests/intel/gem_create.c | 6 +- tests/intel/gem_cs_tlb.c | 4 +- tests/intel/gem_ctx_bad_destroy.c | 4 +- tests/intel/gem_ctx_create.c | 4 +- tests/intel/gem_ctx_engines.c | 4 +- tests/intel/gem_ctx_exec.c | 8 +- tests/intel/gem_ctx_freq.c | 4 +- tests/intel/gem_ctx_isolation.c | 6 +- tests/intel/gem_ctx_param.c | 6 +- tests/intel/gem_ctx_persistence.c | 12 +- tests/intel/gem_ctx_shared.c | 12 +- tests/intel/gem_ctx_sseu.c | 6 +- tests/intel/gem_ctx_switch.c | 10 +- tests/intel/gem_eio.c | 10 +- tests/intel/gem_evict_alignment.c | 6 +- tests/intel/gem_evict_everything.c | 8 +- tests/intel/gem_exec_alignment.c | 2 +- tests/intel/gem_exec_async.c | 8 +- tests/intel/gem_exec_await.c | 4 +- tests/intel/gem_exec_balancer.c | 16 +-- tests/intel/gem_exec_basic.c | 4 +- tests/intel/gem_exec_big.c | 4 +- tests/intel/gem_exec_capture.c | 4 +- tests/intel/gem_exec_create.c | 4 +- tests/intel/gem_exec_endless.c | 6 +- tests/intel/gem_exec_fair.c | 4 +- tests/intel/gem_exec_fence.c | 32 ++--- tests/intel/gem_exec_flush.c | 6 +- tests/intel/gem_exec_gttfill.c | 6 +- tests/intel/gem_exec_latency.c | 8 +- tests/intel/gem_exec_nop.c | 8 +- tests/intel/gem_exec_parallel.c | 4 +- tests/intel/gem_exec_params.c | 4 +- tests/intel/gem_exec_reloc.c | 12 +- tests/intel/gem_exec_schedule.c | 26 ++-- tests/intel/gem_exec_store.c | 4 +- tests/intel/gem_exec_suspend.c | 6 +- tests/intel/gem_exec_whisper.c | 6 +- tests/intel/gem_exercise_blt.c | 4 +- tests/intel/gem_fenced_exec_thrash.c | 4 +- tests/intel/gem_flink_basic.c | 2 +- tests/intel/gem_gpgpu_fill.c | 4 +- tests/intel/gem_huc_copy.c | 4 +- tests/intel/gem_linear_blits.c | 6 +- tests/intel/gem_lmem_evict.c | 4 +- tests/intel/gem_lmem_swapping.c | 4 +- tests/intel/gem_media_fill.c | 4 +- tests/intel/gem_mmap.c | 4 +- tests/intel/gem_mmap_gtt.c | 4 +- tests/intel/gem_mmap_offset.c | 4 +- tests/intel/gem_mmap_wc.c | 6 +- tests/intel/gem_partial_pwrite_pread.c | 6 +- tests/intel/gem_pipe_control_store_loop.c | 4 +- tests/intel/gem_ppgtt.c | 2 +- tests/intel/gem_pread.c | 4 +- tests/intel/gem_pread_after_blit.c | 6 +- tests/intel/gem_pwrite.c | 6 +- tests/intel/gem_pxp.c | 4 +- tests/intel/gem_read_read_speed.c | 4 +- tests/intel/gem_readwrite.c | 4 +- tests/intel/gem_reg_read.c | 4 +- tests/intel/gem_render_copy.c | 4 +- tests/intel/gem_render_copy_redux.c | 4 +- tests/intel/gem_render_linear_blits.c | 2 +- tests/intel/gem_render_tiled_blits.c | 2 +- tests/intel/gem_request_retire.c | 2 +- tests/intel/gem_reset_stats.c | 8 +- tests/intel/gem_ringfill.c | 4 +- tests/intel/gem_set_tiling_vs_blt.c | 4 +- tests/intel/gem_shrink.c | 2 +- tests/intel/gem_softpin.c | 10 +- tests/intel/gem_spin_batch.c | 8 +- tests/intel/gem_streaming_writes.c | 4 +- tests/intel/gem_sync.c | 6 +- tests/intel/gem_tiled_blits.c | 8 +- tests/intel/gem_tiled_fence_blits.c | 8 +- tests/intel/gem_tiled_partial_pwrite_pread.c | 4 +- tests/intel/gem_tiled_swapping.c | 4 +- tests/intel/gem_userptr_blits.c | 14 +- tests/intel/gem_vm_create.c | 6 +- tests/intel/gem_wait.c | 12 +- tests/intel/gem_watchdog.c | 4 +- tests/intel/gem_workarounds.c | 6 +- tests/intel/gen7_exec_parse.c | 8 +- tests/intel/gen9_exec_parse.c | 4 +- tests/intel/i915_drm_fdinfo.c | 8 +- tests/intel/i915_fb_tiling.c | 4 +- tests/intel/i915_getparams_basic.c | 2 +- tests/intel/i915_hangman.c | 6 +- tests/intel/i915_pm_freq_api.c | 2 +- tests/intel/i915_pm_freq_mult.c | 4 +- tests/intel/i915_pm_rc6_residency.c | 8 +- tests/intel/i915_pm_rpm.c | 4 +- tests/intel/i915_pm_rps.c | 4 +- tests/intel/i915_pm_sseu.c | 2 +- tests/intel/i915_power.c | 4 +- tests/intel/i915_query.c | 6 +- tests/intel/i915_suspend.c | 4 +- tests/intel/intel_hwmon.c | 4 +- tests/intel/kms_big_fb.c | 8 +- tests/intel/kms_busy.c | 8 +- tests/intel/kms_ccs.c | 8 +- tests/intel/kms_cdclk.c | 4 +- tests/intel/kms_dirtyfb.c | 4 +- tests/intel/kms_dp_link_training.c | 4 +- tests/intel/kms_dp_linktrain_fallback.c | 4 +- tests/intel/kms_draw_crc.c | 4 +- tests/intel/kms_dsc.c | 4 +- tests/intel/kms_fb_coherency.c | 4 +- tests/intel/kms_fbc_dirty_rect.c | 4 +- tests/intel/kms_fbcon_fbt.c | 4 +- tests/intel/kms_flip_scaled_crc.c | 4 +- tests/intel/kms_flip_tiling.c | 4 +- tests/intel/kms_frontbuffer_tracking.c | 6 +- tests/intel/kms_joiner.c | 12 +- tests/intel/kms_legacy_colorkey.c | 4 +- tests/intel/kms_mmap_write_crc.c | 4 +- tests/intel/kms_pipe_b_c_ivb.c | 4 +- tests/intel/kms_pipe_stress.c | 4 +- tests/intel/kms_pm_backlight.c | 4 +- tests/intel/kms_pm_dc.c | 4 +- tests/intel/kms_pm_lpsp.c | 4 +- tests/intel/kms_pm_rpm.c | 4 +- tests/intel/kms_psr.c | 4 +- tests/intel/kms_psr2_sf.c | 4 +- tests/intel/kms_psr2_su.c | 4 +- tests/intel/kms_psr_stress_test.c | 4 +- tests/intel/perf.c | 6 +- tests/intel/perf_pmu.c | 10 +- tests/intel/prime_busy.c | 6 +- tests/intel/prime_mmap.c | 4 +- tests/intel/prime_mmap_coherency.c | 4 +- tests/intel/prime_mmap_kms.c | 4 +- tests/intel/sysfs_defaults.c | 4 +- tests/intel/sysfs_heartbeat_interval.c | 4 +- tests/intel/sysfs_preempt_timeout.c | 4 +- tests/intel/sysfs_timeslice_duration.c | 4 +- tests/intel/xe_ccs.c | 4 +- tests/intel/xe_compute.c | 6 +- tests/intel/xe_compute_preempt.c | 4 +- tests/intel/xe_configfs.c | 4 +- tests/intel/xe_copy_basic.c | 4 +- tests/intel/xe_create.c | 4 +- tests/intel/xe_debugfs.c | 4 +- tests/intel/xe_dma_buf_sync.c | 4 +- tests/intel/xe_drm_fdinfo.c | 4 +- tests/intel/xe_eu_stall.c | 4 +- tests/intel/xe_eudebug.c | 8 +- tests/intel/xe_eudebug_online.c | 6 +- tests/intel/xe_eudebug_sriov.c | 4 +- tests/intel/xe_evict.c | 4 +- tests/intel/xe_evict_ccs.c | 6 +- tests/intel/xe_exec_atomic.c | 4 +- tests/intel/xe_exec_balancer.c | 4 +- tests/intel/xe_exec_basic.c | 4 +- tests/intel/xe_exec_capture.c | 4 +- tests/intel/xe_exec_compute_mode.c | 4 +- tests/intel/xe_exec_fault_mode.c | 4 +- tests/intel/xe_exec_mix_modes.c | 4 +- tests/intel/xe_exec_queue_property.c | 6 +- tests/intel/xe_exec_reset.c | 4 +- tests/intel/xe_exec_sip.c | 4 +- tests/intel/xe_exec_sip_eudebug.c | 12 +- tests/intel/xe_exec_store.c | 4 +- tests/intel/xe_exec_system_allocator.c | 4 +- tests/intel/xe_exec_threads.c | 4 +- tests/intel/xe_exercise_blt.c | 4 +- tests/intel/xe_fault_injection.c | 6 +- tests/intel/xe_gpgpu_fill.c | 4 +- tests/intel/xe_gt_freq.c | 4 +- tests/intel/xe_huc_copy.c | 4 +- tests/intel/xe_intel_bb.c | 4 +- tests/intel/xe_media_fill.c | 4 +- tests/intel/xe_mmap.c | 6 +- tests/intel/xe_noexec_ping_pong.c | 4 +- tests/intel/xe_oa.c | 10 +- tests/intel/xe_pat.c | 4 +- tests/intel/xe_peer2peer.c | 4 +- tests/intel/xe_pm.c | 6 +- tests/intel/xe_pm_residency.c | 4 +- tests/intel/xe_pmu.c | 16 +-- tests/intel/xe_prime_self_import.c | 4 +- tests/intel/xe_pxp.c | 4 +- tests/intel/xe_query.c | 4 +- tests/intel/xe_render_copy.c | 4 +- tests/intel/xe_spin_batch.c | 4 +- tests/intel/xe_sriov_auto_provisioning.c | 4 +- tests/intel/xe_sriov_flr.c | 4 +- tests/intel/xe_sriov_scheduling.c | 4 +- tests/intel/xe_sriov_vram.c | 4 +- tests/intel/xe_survivability.c | 4 +- tests/intel/xe_sysfs_defaults.c | 4 +- tests/intel/xe_sysfs_preempt_timeout.c | 4 +- tests/intel/xe_sysfs_scheduler.c | 4 +- tests/intel/xe_sysfs_timeslice_duration.c | 4 +- tests/intel/xe_tlb.c | 4 +- tests/intel/xe_vm.c | 4 +- tests/intel/xe_waitfence.c | 4 +- tests/intel/xe_wedged.c | 4 +- tests/kms_3d.c | 4 +- tests/kms_addfb_basic.c | 50 +++---- tests/kms_async_flips.c | 6 +- tests/kms_atomic.c | 4 +- tests/kms_atomic_interruptible.c | 4 +- tests/kms_atomic_transition.c | 4 +- tests/kms_bw.c | 4 +- tests/kms_color.c | 6 +- tests/kms_concurrent.c | 4 +- tests/kms_content_protection.c | 8 +- tests/kms_cursor_crc.c | 16 +-- tests/kms_cursor_edge_walk.c | 6 +- tests/kms_cursor_legacy.c | 20 +-- tests/kms_debugfs.c | 4 +- tests/kms_display_modes.c | 4 +- tests/kms_dither.c | 4 +- tests/kms_feature_discovery.c | 6 +- tests/kms_flip.c | 4 +- tests/kms_flip_event_leak.c | 4 +- tests/kms_force_connector_basic.c | 4 +- tests/kms_getfb.c | 20 +-- tests/kms_hdmi_inject.c | 4 +- tests/kms_hdr.c | 4 +- tests/kms_invalid_mode.c | 4 +- tests/kms_lease.c | 6 +- tests/kms_multipipe_modeset.c | 4 +- tests/kms_panel_fitting.c | 6 +- tests/kms_pipe_crc_basic.c | 4 +- tests/kms_plane.c | 4 +- tests/kms_plane_alpha_blend.c | 4 +- tests/kms_plane_cursor.c | 4 +- tests/kms_plane_lowres.c | 4 +- tests/kms_plane_multiple.c | 4 +- tests/kms_plane_scaling.c | 8 +- tests/kms_prime.c | 12 +- tests/kms_prop_blob.c | 8 +- tests/kms_properties.c | 6 +- tests/kms_rmfb.c | 4 +- tests/kms_rotation_crc.c | 6 +- tests/kms_scaling_modes.c | 4 +- tests/kms_sequence.c | 4 +- tests/kms_setmode.c | 4 +- tests/kms_sharpness_filter.c | 4 +- tests/kms_tiled_display.c | 4 +- tests/kms_tv_load_detect.c | 4 +- tests/kms_universal_plane.c | 4 +- tests/kms_vblank.c | 4 +- tests/kms_vrr.c | 6 +- tests/kms_writeback.c | 4 +- tests/meta_test.c | 2 +- tests/msm/msm_mapping.c | 4 +- tests/msm/msm_recovery.c | 4 +- tests/msm/msm_shrink.c | 4 +- tests/msm/msm_submit.c | 4 +- tests/msm/msm_submitoverhead.c | 4 +- tests/nouveau_crc.c | 8 +- tests/panfrost/panfrost_gem_new.c | 4 +- tests/panfrost/panfrost_get_param.c | 4 +- tests/panfrost/panfrost_prime.c | 4 +- tests/panfrost/panfrost_submit.c | 4 +- tests/panthor/panthor_gem.c | 4 +- tests/panthor/panthor_group.c | 4 +- tests/panthor/panthor_query.c | 4 +- tests/panthor/panthor_vm.c | 4 +- tests/prime_nv_api.c | 4 +- tests/prime_nv_pcopy.c | 4 +- tests/prime_nv_test.c | 4 +- tests/prime_vgem.c | 16 +-- tests/sriov_basic.c | 4 +- tests/sw_sync.c | 2 +- tests/syncobj_basic.c | 4 +- tests/syncobj_eventfd.c | 4 +- tests/syncobj_timeline.c | 4 +- tests/syncobj_wait.c | 4 +- tests/template.c | 6 +- tests/tools_test.c | 2 +- tests/v3d/v3d_create_bo.c | 4 +- tests/v3d/v3d_get_bo_offset.c | 4 +- tests/v3d/v3d_get_param.c | 4 +- tests/v3d/v3d_job_submission.c | 4 +- tests/v3d/v3d_mmap.c | 4 +- tests/v3d/v3d_perfmon.c | 4 +- tests/v3d/v3d_submit_cl.c | 4 +- tests/v3d/v3d_submit_csd.c | 4 +- tests/v3d/v3d_wait_bo.c | 4 +- tests/vc4/vc4_create_bo.c | 4 +- tests/vc4/vc4_dmabuf_poll.c | 4 +- tests/vc4/vc4_label_bo.c | 4 +- tests/vc4/vc4_lookup_fail.c | 4 +- tests/vc4/vc4_mmap.c | 4 +- tests/vc4/vc4_perfmon.c | 4 +- tests/vc4/vc4_purgeable_bo.c | 4 +- tests/vc4/vc4_tiling.c | 4 +- tests/vc4/vc4_wait_bo.c | 4 +- tests/vc4/vc4_wait_seqno.c | 4 +- tests/vgem_basic.c | 8 +- tests/vgem_slow.c | 4 +- tests/vkms/vkms_configfs.c | 4 +- tests/vmwgfx/vmw_execution_buffer.c | 4 +- tests/vmwgfx/vmw_mob_stress.c | 4 +- tests/vmwgfx/vmw_prime.c | 8 +- tests/vmwgfx/vmw_ref_count.c | 4 +- tests/vmwgfx/vmw_surface_copy.c | 4 +- tests/vmwgfx/vmw_tri.c | 4 +- 408 files changed, 1146 insertions(+), 1146 deletions(-)
benchmarks/gem_userptr_benchmark.c +2 -2
@@ -454,7 +454,7 @@ igt_main {int fd =-1 , ret; - igt_fixture { + igt_fixture() { fd =drm_open_driver (DRIVER_INTEL );igt_assert (fd >=0 );
@@ -472,7 +472,7 @@ igt_main igt_subtest("userptr-impact-sync-overlap")test_impact_overlap (fd,"sync-" ); - igt_fixture { + igt_fixture() {close (fd); } }
lib/igt_aux.c +3 -3
@@ -313,7 +313,7 @@ static void sig_handler(int i)* helper can also be used from children spawned with #igt_fork. * * In tests with subtests this function can be called outside of failure -* catching code blocks like #igt_fixture or #igt_subtest. +* catching code blocks like #igt_fixture() or #igt_subtest. * * Note that this just spews signals at the current process unconditionally and * hence incurs quite a bit of overhead. For a more focused approach, with less
@@ -350,7 +350,7 @@ void igt_fork_signal_helper(void)* Stops the child process spawned with igt_fork_signal_helper() again. * * In tests with subtests this function can be called outside of failure -* catching code blocks like #igt_fixture or #igt_subtest. +* catching code blocks like #igt_fixture() or #igt_subtest. */ void igt_stop_signal_helper (void ) {
@@ -419,7 +419,7 @@ __noreturn static void shrink_helper_process(int fd, pid_t pid)* * This is useful to exercise swapping paths, without requiring us to hit swap. * -* This should only be used from an igt_fixture. +* This should only be used from an igt_fixture(). */ void igt_fork_shrink_helper (int drm_fd) {
lib/igt_core.c +9 -9
@@ -118,10 +118,10 @@* never run any code which might fail (like trying to do privileged operations * or opening device driver nodes). * -* To allow this i-g-t provides #igt_fixture code blocks for setup code outside +* To allow this i-g-t provides #igt_fixture() code blocks for setup code outside * of subtests and automatically skips the subtest code blocks themselves. For * special cases igt_only_list_subtests() is also provided. For setup code only -* shared by a group of subtest encapsulate the #igt_fixture block and all the +* shared by a group of subtest encapsulate the #igt_fixture() block and all the * subtestest in a #igt_subtest_group block. * * # Magic Control Blocks
@@ -141,7 +141,7 @@* issues. * * - Code blocks with magic control flow are implemented with setjmp() -* and longjmp(). This applies to #igt_fixture, #igt_subtest, +* and longjmp(). This applies to #igt_fixture(), #igt_subtest, * #igt_subtest_with_dynamic and #igt_dynamic * blocks and all the three variants to finish test: igt_success(), * igt_skip() and igt_fail(). Mostly this is of no concern, except
@@ -768,11 +768,11 @@ void __igt_assert_in_outer_scope(void)bool __igt_fixture (void ) {internal_assert (!in_fixture, -"nesting multiple igt_fixtures is invalid\n" ); +"nesting multiple igt_fixture()s is invalid\n" );internal_assert (!in_subtest, -"nesting igt_fixture in igt_subtest is invalid\n" ); +"nesting igt_fixture() in igt_subtest is invalid\n" );internal_assert (test_with_subtests, -"igt_fixture in igt_simple_main is invalid\n" ); +"igt_fixture() in igt_simple_main is invalid\n" );if (igt_only_list_subtests ())return false;
@@ -1974,7 +1974,7 @@ void igt_fatal_error(void)/** * igt_can_fail: * -* Returns true if called from either an #igt_fixture, #igt_subtest or a +* Returns true if called from either an #igt_fixture(), #igt_subtest or a * testcase without subtests, i.e. #igt_simple_main. Returns false otherwise. In * other words, it checks whether it's legal to call igt_fail(), igt_skip_on() * and all the convenience macros build around those.
@@ -3119,7 +3119,7 @@ bool igt_run_in_simulation(void)* igt_skip() internally and hence is fully subtest aware. * * Note that in contrast to all other functions which use igt_skip() internally -* it is allowed to use this outside of an #igt_fixture block in a test with +* it is allowed to use this outside of an #igt_fixture() block in a test with * subtests. This is because in contrast to most other test requirements, * checking for simulation mode doesn't depend upon the present hardware and it * so makes a lot of sense to have this check in the outermost #igt_main block.
@@ -3130,7 +3130,7 @@ void igt_skip_on_simulation(void)return ;if (!igt_can_fail ()) { -igt_fixture + igt_fixture()igt_require (!igt_run_in_simulation ()); }else igt_require (!igt_run_in_simulation ());
lib/igt_core.h +4 -4
@@ -149,16 +149,16 @@ bool __igt_fixture(void);void __igt_fixture_complete (void );__noreturn void __igt_fixture_end (void );/** -* igt_fixture: +* igt_fixture(): * * Annotate global test fixture code * * Testcase with subtests often need to set up a bunch of global state as the * common test fixture. To avoid such code interfering with the subtest * enumeration (e.g. when enumerating on systems without an intel gpu) such -* blocks should be annotated with igt_fixture. +* blocks should be annotated with igt_fixture(). */ -#define igt_fixture for (volatile int igt_unique(__tmpint) = 0; \ +#define igt_fixture () for (volatile int igt_unique(__tmpint) = 0; \ igt_unique(__tmpint) < 1 && \ (STATIC_ANALYSIS_BUILD || \ (__igt_fixture() && \
@@ -398,7 +398,7 @@ void __igt_subtest_group_restore(int, int);* e.g. igt_require() would result in all subsequent tests skipping. Even those * from a different group. * -* This macro allows to group together a set of #igt_fixture and #igt_subtest +* This macro allows to group together a set of #igt_fixture() and #igt_subtest * clauses. If any common setup in a fixture fails, only the subtests in this * group will fail or skip. Subtest groups can be arbitrarily nested. */
lib/igt_dir.c +4 -4
@@ -18,7 +18,7 @@* Utilities to facilitate reading and processing files within a directory. * For example, to read and discard all files from debugfs: * -* igt_fixture { +* igt_fixture() { * fd = drm_open_driver_master(DRIVER_ANY); * debugfs = igt_debugfs_dir(fd); * }
@@ -27,7 +27,7 @@* igt_dir_scan_dirfd(igt_dir, -1); // -1 means unlimited scan depth * igt_dir_process_files(igt_dir, NULL, NULL); * -* igt_fixture { +* igt_fixture() { * igt_dir_destroy(igt_dir); * closedir(debugfs); * drm_close_driver(fd);
@@ -47,14 +47,14 @@* igt_dir_process_files(), and igt_dir_destroy(). For using the "_simple" * interface: * -* igt_fixture { +* igt_fixture() { * fd = drm_open_driver_master(DRIVER_ANY); * debugfs = igt_debugfs_dir(fd); * } * * igt_dir_process_files_simple(debugfs); * -* igt_fixture { +* igt_fixture() { * igt_dir_destroy(igt_dir); * closedir(debugfs); * drm_close_driver(fd);
lib/igt_gt.c +1 -1
@@ -483,7 +483,7 @@ void igt_fork_hang_helper(void)* Stops the child process spawned with igt_fork_hang_helper(). * * In tests with subtests this function can be called outside of failure -* catching code blocks like #igt_fixture or #igt_subtest. +* catching code blocks like #igt_fixture() or #igt_subtest. */ void igt_stop_hang_helper (void ) {
lib/igt_kmod.c +4 -4
@@ -1199,7 +1199,7 @@ void igt_kunit(const char *module_name, const char *suite, const char *opts)igt_ignore_warn (igt_kmod_load ("kunit" ,NULL ));kunit_debugfs_path (debugfs_path); - igt_fixture { + igt_fixture() {igt_require (subtest);igt_require (*debugfs_path);
@@ -1222,7 +1222,7 @@ void igt_kunit(const char *module_name, const char *suite, const char *opts)__igt_kunit (&tst, subtest, opts, debugfs_path, &tests, &ktap); } - igt_fixture { + igt_fixture() {char *suite_name =NULL , *case_name =NULL ;igt_ktap_free (&ktap);
@@ -1365,7 +1365,7 @@ void igt_kselftests(const char *module_name,if (igt_ktest_init (&tst, module_name) !=0 )return ; -igt_fixture + igt_fixture()igt_require (igt_ktest_begin (&tst) ==0 );igt_kselftest_get_tests (tst.kmod, filter, &tests);
@@ -1390,7 +1390,7 @@ void igt_kselftests(const char *module_name, } } - igt_fixture { + igt_fixture() {igt_ktest_end (&tst);igt_require (!igt_list_empty (&tests)); }
lib/igt_types.h +1 -1
@@ -23,7 +23,7 @@* igt_subtest_group() { * igt_fd_t(fd); * -* igt_fixture { +* igt_fixture() { * fd = drm_open_driver(); * } *
lib/intel_batchbuffer.c +1 -1
@@ -1110,7 +1110,7 @@ static bool has_ctx_cfg(struct intel_bb *ibb)* * Notes: * -* intel_bb must not be created in igt_fixture. The reason is intel_bb +* intel_bb must not be created in igt_fixture(). The reason is intel_bb * "opens" connection to the allocator and when test completes it can * leave the allocator in unknown state (mostly for failed tests). * As igt_core was armed to reset the allocator infrastructure
lib/tests/igt_abort.c +1 -1
@@ -44,7 +44,7 @@ __noreturn static void fake_fixture_test(void) {igt_subtest_init (fake_argc, fake_argv); - igt_fixture { + igt_fixture() {igt_abort_on_f (true,"I'm out!\n" ); }
lib/tests/igt_audio.c +2 -2
@@ -181,7 +181,7 @@ igt_mainsize_t i; igt_subtest_group { - igt_fixture { +igt_fixture () { signal =audio_signal_init (CHANNELS ,SAMPLING_RATE );for (i =0 ; i < test_freqs_len; i++) {
@@ -215,7 +215,7 @@ igt_main igt_subtest("signal-detect-phaseshift")test_signal_detect_phaseshift (signal); - igt_fixture { + igt_fixture() {audio_signal_fini (signal); } }
lib/tests/igt_can_fail.c +1 -1
@@ -30,7 +30,7 @@ igt_main {internal_assert (igt_can_fail () == false); - igt_fixture { + igt_fixture() {internal_assert (igt_can_fail ()); }
lib/tests/igt_describe.c +1 -1
@@ -42,7 +42,7 @@ __noreturn static void fake_main(void)igt_subtest ("A" ) ; - igt_fixture + igt_fixture()printf ("should not be executed!\n" );igt_describe ("Group with B, C & D" );
lib/tests/igt_exit_handler.c +1 -1
@@ -76,7 +76,7 @@ static int testfunc(enum test_type test_type)if (pid ==0 ) {igt_subtest_init (fake_argc, fake_argv); - igt_fixture { + igt_fixture() {/* register twice, should only be called once */ igt_install_exit_handler (exit_handler1);igt_install_exit_handler (exit_handler1);
lib/tests/igt_hook.c +1 -1
@@ -157,7 +157,7 @@ igt_maintest_print_help (); igt_subtest_group { - igt_fixture { +igt_fixture () {igt_require_f (system (NULL ),"Shell seems not to be available\n" ); }
lib/tests/igt_nesting.c +5 -5
@@ -44,14 +44,14 @@ __noreturn static void all_valid(void) {igt_subtest_init (fake_argc, fake_argv); - igt_fixture { + igt_fixture() { } igt_subtest_group { igt_subtest_group { } - igt_fixture { + igt_fixture() { }igt_subtest ("a" )
@@ -131,8 +131,8 @@ __noreturn static void invalid_fixture_in_fixture(void) {igt_subtest_init (fake_argc, fake_argv); - igt_fixture { - igt_fixture { + igt_fixture() { + igt_fixture() { } }
@@ -178,7 +178,7 @@ __noreturn static void invalid_fixture_in_subtest(void)igt_subtest_init (fake_argc, fake_argv); igt_subtest("a") { - igt_fixture { + igt_fixture() { } }
lib/tests/igt_simulation.c +1 -1
@@ -65,7 +65,7 @@ __noreturn static void fake_test(void) }if (in_fixture) { -igt_fixture + igt_fixture()igt_skip_on_simulation (); }if (in_subtest) {igt_subtest ("sim" )
lib/tests/igt_subtest_group.c +4 -4
@@ -37,12 +37,12 @@ igt_mainvolatile int t2 =0 ; igt_subtest_group { - igt_fixture { +igt_fixture () {igt_require (true); } igt_subtest_group { - igt_fixture { +igt_fixture () {igt_require (false); }
@@ -67,7 +67,7 @@ igt_main } igt_subtest_group { - igt_fixture { +igt_fixture () {internal_assert (t2 ==0 ); t2 =1 ; }
@@ -77,7 +77,7 @@ igt_main t2 =2 ; } - igt_fixture { + igt_fixture() {internal_assert (t2 ==2 ); t2 =3 ;
lib/tests/igt_types.c +6 -6
@@ -24,14 +24,14 @@ static void delegate(void) {scoped_int_t (x); -igt_fixture +igt_fixture () x = 1;igt_describe ("Pretend to be doing a subtest" );igt_subtest ("empty-subtest" ) x = 2; - igt_fixture { + igt_fixture() {/* Check that we went through both blocks without cleanup */ igt_assert (!cleanup_called);igt_assert (x ==2 );
@@ -42,7 +42,7 @@ static void skip_delegate(void) {scoped_int_t (x); -igt_fixture +igt_fixture () x = 1;igt_describe ("Check if skipping a test will not update a scoped variable" );
@@ -52,7 +52,7 @@ static void skip_delegate(void) x =2 ;/* not reached due to lonjmp from igt_skip */ } - igt_fixture { + igt_fixture() {/* Check that we went through both blocks without cleanup */ igt_assert (!cleanup_called);igt_assert (x ==1 );
@@ -63,7 +63,7 @@ igt_main {/* Basic check that scopes will call their destructor */ cleanup_called =0 ; - igt_fixture { + igt_fixture() {scoped_int_t (x); }
@@ -76,7 +76,7 @@ igt_main igt_subtest_group {scoped_int_t (x ); - igt_fixture { + igt_fixture() { x =0xdeadbeef ; }
runner/resultgen.c +1 -1
@@ -524,7 +524,7 @@ static const char *find_subtest_begin_limit_limited(struct matches matches,if (begin_idx < first_idx) {/* * Subtest didn't start, but we have the -* result. Probably because an igt_fixture +* result. Probably because an igt_fixture() * made it fail/skip. * * We go backwards one match from the result match,
runner/runner_kmemleak_test.c +3 -3
@@ -220,7 +220,7 @@ igt_mainint resdirfd;int fd; - igt_fixture { + igt_fixture() {/* resdirfd is used by runner_kmemleak() to store results */ igt_assert (resdirfd =open (runner_kmemleak_unit_testing_resdir,O_DIRECTORY |O_RDONLY ));
@@ -258,10 +258,10 @@ igt_mainigt_assert (runner_kmemleak ("test_name_3" , resdirfd, true, false)); } - igt_fixture { + igt_fixture() {close (resdirfd); } } - igt_fixture + igt_fixture()unlinkat (resdirfd,KMEMLEAK_RESFILENAME ,0 ); }
runner/runner_tests.c +63 -63
504 lines not on this page · raw message
runner/testdata/abort-fixture.c +1 -1
@@ -25,7 +25,7 @@igt_main { - igt_fixture { +igt_fixture () {igt_abort_on_f (true,"I'm out!\n" ); }
runner/testdata/skippers.c +1 -1
@@ -2,7 +2,7 @@igt_main { - igt_fixture { +igt_fixture () {igt_require_f (false,"Skipping from fixture\n" ); }
tests/amdgpu/amd_abm.c +2 -2
@@ -503,7 +503,7 @@ igt_maindata_t data = {0 };igt_skip_on_simulation (); - igt_fixture { + igt_fixture() { data.drm_fd =drm_open_driver_master (DRIVER_AMDGPU );if (data.drm_fd ==-1 )
@@ -527,7 +527,7 @@ igt_main igt_subtest("abm_gradual")abm_gradual (&data); - igt_fixture { + igt_fixture() {test_fini (&data);igt_display_fini (&data.display);drm_close_driver (data.drm_fd);
tests/amdgpu/amd_assr.c +2 -2
@@ -275,7 +275,7 @@ igt_mainmemset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_ANY );
@@ -296,7 +296,7 @@ igt_main igt_subtest("assr-links-suspend")test_assr_links (&data,TEST_SUSPEND ); - igt_fixture + igt_fixture() {igt_display_fini (&data.display);drm_close_driver (data.fd);
tests/amdgpu/amd_basic.c +2 -2
@@ -678,7 +678,7 @@ igt_main enable_test = env &&atoi (env);#endif - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -811,7 +811,7 @@ igt_main } } - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_basic_ex.c +2 -2
@@ -29,7 +29,7 @@ igt_mainint r;bool arr_cap[AMD_IP_MAX ] = {0 }; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -56,7 +56,7 @@ igt_main } } - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_basic_multi_gpu.c +2 -2
@@ -168,7 +168,7 @@ igt_main enable_test = env &&atoi (env);#endif - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -416,7 +416,7 @@ igt_mainigt_waitchildren (); } - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_bo.c +2 -2
@@ -254,7 +254,7 @@ igt_mainstruct bo_data bo;int fd =-1 ; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -285,7 +285,7 @@ igt_main igt_subtest("amdgpu_bo_find_by_cpu_mapping")amdgpu_bo_find_by_cpu_mapping (device); - igt_fixture { + igt_fixture() {amdgpu_bo_clean (device, &bo);amdgpu_device_deinitialize (device);close (fd);
tests/amdgpu/amd_bypass.c +2 -2
@@ -404,7 +404,7 @@ igt_mainigt_skip_on_simulation (); - igt_fixture { + igt_fixture() { data.drm_fd =drm_open_driver_master (DRIVER_AMDGPU );if (data.drm_fd ==-1 )igt_skip ("Not an amdgpu driver.\n" );
@@ -420,7 +420,7 @@ igt_main igt_subtest("8bpc-bypass-mode")bypass_8bpc_test (&data); - igt_fixture { + igt_fixture() {igt_display_fini (&data.display); } }
tests/amdgpu/amd_color.c +2 -2
@@ -400,7 +400,7 @@ igt_mainmemset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_AMDGPU );
@@ -418,7 +418,7 @@ igt_mainigt_describe ("Tests color accuracy of CRTC degamma and regamma" ); igt_subtest("crtc-lut-accuracy") test_crtc_lut_accuracy(&data); - igt_fixture + igt_fixture() {igt_display_fini (&data.display); }
tests/amdgpu/amd_cp_dma_misc.c +2 -2
@@ -41,7 +41,7 @@ igt_main }, *e; - igt_fixture { + igt_fixture() { num_devices =amdgpu_open_devices (true,MAX_CARDS_SUPPORTED , drm_amdgpu_fds);igt_require (num_devices >0 ); r = amdgpu_device_initialize(drm_amdgpu_fds[0], &major,
@@ -97,7 +97,7 @@ igt_main gpu_info2.family_id); } - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);close (drm_amdgpu_fds[0 ]);if (num_devices >1 ) {
tests/amdgpu/amd_cs_nop.c +2 -2
@@ -179,7 +179,7 @@ igt_main enable_test = env &&atoi (env);#endif - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -222,7 +222,7 @@ igt_main }#endif - igt_fixture { + igt_fixture() {amdgpu_cs_ctx_free (context);amdgpu_device_deinitialize (device);drm_close_driver (fd);
tests/amdgpu/amd_deadlock.c +2 -2
@@ -50,7 +50,7 @@ igt_main enable_test = env &&atoi (env);#endif - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -246,7 +246,7 @@ igt_main }#endif - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_dispatch.c +2 -2
@@ -92,7 +92,7 @@ igt_main enable_test = env &&atoi (env);#endif - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -215,7 +215,7 @@ igt_main } } - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_dp_dsc.c +2 -2
@@ -542,7 +542,7 @@ igt_main {igt_skip_on_simulation (); - igt_fixture { + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_ANY );igt_display_require (&data.display, data.fd);
@@ -569,7 +569,7 @@ igt_main { igt_subtest("dsc-bpc")test_dsc_bpc (&data); - igt_fixture { + igt_fixture() {igt_reset_connectors ();igt_display_fini (&data.display); }
tests/amdgpu/amd_freesync_video_mode.c +2 -2
@@ -865,7 +865,7 @@ igt_main {memset (&data,0 ,sizeof (data)); - igt_fixture { + igt_fixture() { data.drm_fd =drm_open_driver_master (DRIVER_AMDGPU );if (data.drm_fd ==-1 ) {igt_skip ("Not an amdgpu driver.\n" );
@@ -898,7 +898,7 @@ igt_main {igt_info ("end of test\n" ); - igt_fixture { + igt_fixture() {igt_display_fini (&data.display);drm_close_driver (data.drm_fd);if (data.modes)
tests/amdgpu/amd_fuzzing.c +2 -2
@@ -164,7 +164,7 @@ igt_mainAMD_IP_VCN_JPEG ,AMD_IP_VPE }; - igt_fixture { + igt_fixture() { fd =drm_open_driver (DRIVER_AMDGPU );igt_require (fd !=-1 ); }
@@ -181,7 +181,7 @@ igt_main igt_subtest("gem-create-fuzzing")amd_gem_create_fuzzing (fd); - igt_fixture { + igt_fixture() {drm_close_driver (fd); } }
tests/amdgpu/amd_gang_cs.c +2 -2
@@ -246,7 +246,7 @@ igt_mainint r;bool arr_cap[AMD_IP_MAX ] = {0 }; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -282,7 +282,7 @@ igt_main } } - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_hotplug.c +2 -2
@@ -208,7 +208,7 @@ igt_mainmemset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_AMDGPU );
@@ -227,7 +227,7 @@ igt_mainigt_describe ("Tests HPD on each connected output after a suspend sequence" ); igt_subtest("basic-suspend") test_hotplug_basic(&data, true); - igt_fixture + igt_fixture() {igt_display_fini (&data.display); }
tests/amdgpu/amd_ilr.c +2 -2
@@ -322,7 +322,7 @@ igt_mainigt_skip_on_simulation (); - igt_fixture + igt_fixture() { data.drm_fd =drm_open_driver_master (DRIVER_AMDGPU );if (data.drm_fd ==-1 )
@@ -342,7 +342,7 @@ igt_main igt_subtest("ilr-policy")test_flow (&data,ILR_POLICY ); - igt_fixture + igt_fixture() {igt_display_fini (&data.display); }
tests/amdgpu/amd_info.c +2 -2
@@ -124,7 +124,7 @@ igt_mainint fd =-1 ;int r =-1 ; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -155,7 +155,7 @@ igt_mainquery_timestamp_test (device,7000000 ,1 ); } - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_jpeg_dec.c +2 -2
@@ -223,7 +223,7 @@ igt_mainstruct mmd_shared_context shared_context = {};int fd =-1 ; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -240,7 +240,7 @@ igt_main igt_subtest("amdgpu_cs_jpeg_decode")amdgpu_cs_jpeg_decode (device, &shared_context); - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_jpeg_queue.c +2 -2
@@ -85,7 +85,7 @@ igt_mainint err;struct pci_addr pci; - igt_fixture { + igt_fixture() { fd =drm_open_driver (DRIVER_AMDGPU ); err =amdgpu_device_initialize (fd, &major, &minor, &device);igt_require (err ==0 );
@@ -107,7 +107,7 @@ igt_mainmm_queue_test_helper (device, &shared_context, jpeg_queue_decode, err, &pci); } - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_link_settings.c +2 -2
@@ -253,7 +253,7 @@ igt_mainigt_skip_on_simulation (); - igt_fixture + igt_fixture() { data.drm_fd =drm_open_driver_master (DRIVER_AMDGPU );if (data.drm_fd ==-1 )
@@ -272,7 +272,7 @@ igt_main igt_subtest("link-training-configs")test_link_training_configs (&data); - igt_fixture + igt_fixture() {igt_display_fini (&data.display); }
tests/amdgpu/amd_mall.c +2 -2
@@ -136,7 +136,7 @@ igt_mainmemset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_AMDGPU );
@@ -151,7 +151,7 @@ igt_main "of GPU VRAM when screen contents are idle"); igt_subtest("static-screen") test_mall_ss(&data); - igt_fixture + igt_fixture() {igt_display_fini (&data.display); }
tests/amdgpu/amd_max_bpc.c +2 -2
@@ -126,7 +126,7 @@ igt_mainmemset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_AMDGPU );
@@ -140,7 +140,7 @@ igt_mainigt_describe ("Tests overly high 'max bpc' should not affect 4K modes on HDMI" ); igt_subtest("4k-mode-max-bpc") test_4k_mode_max_bpc(&data); - igt_fixture + igt_fixture() {igt_display_fini (&data.display); }
tests/amdgpu/amd_mem_leak.c +2 -2
@@ -135,7 +135,7 @@ igt_mainmemset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_AMDGPU );
@@ -151,7 +151,7 @@ igt_mainigt_describe ("Test memroy leaks after connector hotplug" ); igt_subtest("connector-hotplug") test_hotplug(&data); - igt_fixture + igt_fixture() {igt_display_fini (&data.display);drm_close_driver (data.fd);
tests/amdgpu/amd_mode_switch.c +2 -2
@@ -185,7 +185,7 @@ igt_mainmemset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_AMDGPU );
@@ -203,7 +203,7 @@ igt_mainrun_mode_switch_first_last (&data, i +1 ); } - igt_fixture + igt_fixture() {igt_display_fini (&data.display); }
tests/amdgpu/amd_module_load.c +1 -1
@@ -75,7 +75,7 @@ igt_mainigt_amdgpu_driver_unload (); } - igt_fixture + igt_fixture() {/* load the module back in */ igt_amdgpu_driver_load (NULL );
tests/amdgpu/amd_multidisplay_modeset.c +2 -2
@@ -414,7 +414,7 @@ igt_mainmemset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_AMDGPU );
@@ -433,7 +433,7 @@ igt_mainmultiple_display_test (&data,DISPLAY_ENABLE_DISABLE ); - igt_fixture + igt_fixture() {igt_display_fini (&data.display);drm_close_driver (data.fd);
tests/amdgpu/amd_odm.c +2 -2
@@ -166,7 +166,7 @@ igt_mainmemset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_ANY );
@@ -181,7 +181,7 @@ igt_main igt_subtest_f("odm-combine-2-to-1-%s", test_mode[TEST_MODE_IDX_ODMC_2_TO_1].name)run_test_odmc (&data,ODMC_2_TO_1 , &test_mode[TEST_MODE_IDX_ODMC_2_TO_1 ]); - igt_fixture + igt_fixture() {igt_display_fini (&data.display); }
tests/amdgpu/amd_pci_unplug.c +2 -2
@@ -37,7 +37,7 @@ igt_mainstruct amd_pci_unplug_setup setup = {0 };struct amd_pci_unplug unplug = {0 }; - igt_fixture { + igt_fixture() { setup.minor_version_req =46 ; }
@@ -53,5 +53,5 @@ igt_main igt_subtest("amdgpu_hotunplug_with_exported_fence")amdgpu_hotunplug_with_exported_fence (&setup, &unplug); - igt_fixture { } + igt_fixture() { } }
tests/amdgpu/amd_plane.c +2 -2
@@ -904,7 +904,7 @@ igt_mainmemset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_AMDGPU );
@@ -980,7 +980,7 @@ igt_main igt_subtest("mpo-scale-p010-multihead")test_display_mpo (&data,MPO_SCALE ,DRM_FORMAT_P010 ,DISPLAYS_TO_TEST ); - igt_fixture + igt_fixture() {igt_display_fini (&data.display); }
tests/amdgpu/amd_prime.c +2 -2
@@ -435,7 +435,7 @@ igt_mainigt_skip_on_simulation (); - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -459,7 +459,7 @@ igt_main igt_subtest("shrink")shrink (i915, amd, device); - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (amd);drm_close_driver (i915);
tests/amdgpu/amd_psr.c +2 -2
@@ -707,7 +707,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)igt_skip_on_simulation ();memset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_AMDGPU );if (data.fd ==-1 )igt_skip ("Not an amdgpu driver.\n" );
@@ -757,7 +757,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL) "and to validate PSR SU disable/re-enable w/ primary scaling ratio 0.75"); igt_subtest("psr_su_mpo_scaling_0_75") run_check_psr_su_mpo(&data, true, .75); - igt_fixture + igt_fixture() {if (opt.visual_confirm) { igt_require_f(igt_amd_set_visual_confirm(data.fd, VISUAL_CONFIRM_DISABLE),
tests/amdgpu/amd_pstate.c +2 -2
@@ -45,7 +45,7 @@ igt_mainamdgpu_device_handle device;int fd =-1 ; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -61,7 +61,7 @@ igt_main igt_subtest("amdgpu_pstate")amdgpu_stable_pstate_test (device); - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_queue_reset.c +2 -2
@@ -1162,7 +1162,7 @@ igt_mainint const_num_of_tests; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -1255,7 +1255,7 @@ igt_mainif (sh_mem && (!sh_mem->sub_test_is_existed))set_next_test_to_skip (sh_mem); - igt_fixture { + igt_fixture() {if (process ==PROCESS_TEST )waitpid (test_child, &testExitMethod,0 );waitpid (pid_background, &backgrounExitMethod,0 );
tests/amdgpu/amd_ras.c +2 -2
@@ -993,7 +993,7 @@ igt_mainstruct amd_ras_setup setup = {};bool render_mode = true; - igt_fixture { + igt_fixture() {igt_skip_on (!amdgpu_open_devices (render_mode,MAX_CARDS_SUPPORTED , setup.drm_amdgpu));
@@ -1035,7 +1035,7 @@ igt_mainamdgpu_ras_enable_test (&setup); } } - igt_fixture { + igt_fixture() {ras_tests_cleanup (&setup); } }
tests/amdgpu/amd_replay.c +2 -2
@@ -414,7 +414,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)igt_skip_on_simulation ();memset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_AMDGPU );
@@ -449,7 +449,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)igt_describe ("Test whether Panel Replay can be enabled after resume from suspend" ); igt_subtest("replay_suspend") run_check_replay_suspend(&data); - igt_fixture + igt_fixture() {if (opt.visual_confirm) {igt_skip_on (!igt_amd_has_visual_confirm (data.fd));
tests/amdgpu/amd_security.c +2 -2
@@ -324,7 +324,7 @@ igt_main enable_test = env &&atoi (env);#endif - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -379,7 +379,7 @@ igt_main is_secure, true);#endif - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_subvp.c +2 -2
@@ -160,7 +160,7 @@ igt_mainmemset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_AMDGPU );igt_display_require (&data.display, data.fd);
@@ -173,7 +173,7 @@ igt_mainigt_describe ("Tests whether system enables sub-viewport when a specific mode is committed" ); igt_subtest("dual-4k60") test_subvp(&data); - igt_fixture + igt_fixture() {igt_display_fini (&data.display); }
tests/amdgpu/amd_syncobj.c +2 -2
@@ -239,7 +239,7 @@ igt_mainamdgpu_device_handle device;int fd =-1 ; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -255,7 +255,7 @@ igt_main igt_subtest("amdgpu_syncobj_timeline")amdgpu_syncobj_timeline (device); - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);close (fd); }
tests/amdgpu/amd_uvd_dec.c +2 -2
@@ -301,7 +301,7 @@ igt_mainstruct mmd_shared_context shared_context = {};int fd =-1 ; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -329,7 +329,7 @@ igt_main igt_subtest("amdgpu_uvd_dec_destroy")amdgpu_uvd_dec_destroy (device, &context, &shared_context); - igt_fixture { + igt_fixture() {mmd_context_clean (device, &context);amdgpu_device_deinitialize (device);drm_close_driver (fd);
tests/amdgpu/amd_uvd_enc.c +2 -2
@@ -315,7 +315,7 @@ igt_mainstruct mmd_shared_context shared_context = {};int fd =-1 ; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -335,7 +335,7 @@ igt_main igt_subtest("uvd_encoder")amdgpu_uvd_enc_test (device, &shared_context); - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_vce_enc.c +2 -2
@@ -593,7 +593,7 @@ igt_mainint fd =-1 ;bool is_mv_supported = false; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -611,7 +611,7 @@ igt_main igt_subtest("amdgpu_vce_encoder")amdgpu_vce_enc_test (device, &shared_context, is_mv_supported); - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_vcn.c +2 -2
@@ -1239,7 +1239,7 @@ igt_mainstruct mmd_shared_context shared_context = {};int fd =-1 ; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -1280,7 +1280,7 @@ igt_main } } - igt_fixture { + igt_fixture() {mmd_context_clean (device, &context);amdgpu_device_deinitialize (device);drm_close_driver (fd);
tests/amdgpu/amd_vcn_queue.c +2 -2
@@ -67,7 +67,7 @@ igt_mainstruct pci_addr pci;int err; - igt_fixture { + igt_fixture() { fd =drm_open_driver (DRIVER_AMDGPU ); err =amdgpu_device_initialize (fd, &major, &minor, &device);igt_require (err ==0 );
@@ -92,7 +92,7 @@ igt_mainmm_queue_test_helper (device, &shared_context, vcn_queue_test, err, &pci); } - igt_fixture { + igt_fixture() {mmd_context_clean (device, &context);amdgpu_device_deinitialize (device);drm_close_driver (fd);
tests/amdgpu/amd_vm.c +2 -2
@@ -203,7 +203,7 @@ igt_mainstruct amdgpu_gpu_info gpu_info = {};int fd =-1 ; - igt_fixture { + igt_fixture() {uint32_t major, minor;int err;
@@ -230,7 +230,7 @@ igt_main igt_subtest("amdgpu-vm-mapping-test")amdgpu_vm_mapping_test (device); - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_vpe.c +2 -2
@@ -221,7 +221,7 @@ igt_mainamdgpu_device_handle device;int fd =-1 ; - igt_fixture { + igt_fixture() {uint32_t major, minor;int r;
@@ -249,7 +249,7 @@ igt_main igt_subtest("vpe-blit-test")amdgpu_cs_vpe_blit (device, &context); - igt_fixture { + igt_fixture() {amdgpu_device_deinitialize (device);drm_close_driver (fd); }
tests/amdgpu/amd_vrr_range.c +2 -2
@@ -464,7 +464,7 @@ igt_mainmemset (&data,0 ,sizeof (data)); - igt_fixture + igt_fixture() { data.fd =drm_open_driver_master (DRIVER_AMDGPU );
@@ -487,7 +487,7 @@ igt_mainigt_describe ("Freesync range from display after suspend" ); igt_subtest("freesync-range-suspend") test_freesync_range_suspend(&data); - igt_fixture + igt_fixture() {igt_display_fini (&data.display);drm_close_driver (data.fd);
tests/chamelium/kms_chamelium_audio.c +4 -4
@@ -854,13 +854,13 @@ igt_mainstruct chamelium_port *port;int p; - igt_fixture { + igt_fixture() {chamelium_init_test (&data); }igt_describe ("DisplayPort tests" ); igt_subtest_group { - igt_fixture { +igt_fixture () {chamelium_require_connector_present ( data.ports, DRM_MODE_CONNECTOR_DisplayPort, data.port_count,1 );
@@ -878,7 +878,7 @@ igt_mainigt_describe ("HDMI tests" ); igt_subtest_group { - igt_fixture { +igt_fixture () {chamelium_require_connector_present ( data.ports,DRM_MODE_CONNECTOR_HDMIA , data.port_count,1 );
@@ -894,7 +894,7 @@ igt_main IGT_CUSTOM_EDID_HDMI_AUDIO); } - igt_fixture { + igt_fixture() {igt_display_fini (&data.display);drm_close_driver (data.drm_fd); }
tests/chamelium/kms_chamelium_color.c +2 -2
@@ -718,7 +718,7 @@ igt_mainint i;data_t data = {}; - igt_fixture { + igt_fixture() { data.drm_fd =drm_open_driver_master (DRIVER_ANY );if (is_intel_device (data.drm_fd)) data.devid =intel_get_drm_devid (data.drm_fd);
@@ -766,7 +766,7 @@ igt_mainigt_subtest_group run_tests_for_pipe(&data); - igt_fixture { + igt_fixture() {igt_display_fini (&data.display); } }
tests/chamelium/kms_chamelium_edid.c +5 -5
@@ -525,13 +525,13 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)struct chamelium_port *port;int p; - igt_fixture { + igt_fixture() {chamelium_init_test (&data); }igt_describe ("DisplayPort tests" ); igt_subtest_group { - igt_fixture { +igt_fixture () {chamelium_require_connector_present ( data.ports, DRM_MODE_CONNECTOR_DisplayPort, data.port_count,1 );
@@ -585,7 +585,7 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)igt_describe ("HDMI tests" ); igt_subtest_group { - igt_fixture { +igt_fixture () {chamelium_require_connector_present ( data.ports,DRM_MODE_CONNECTOR_HDMIA , data.port_count,1 );
@@ -633,7 +633,7 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)igt_describe ("VGA tests" ); igt_subtest_group { - igt_fixture { +igt_fixture () {chamelium_require_connector_present ( data.ports,DRM_MODE_CONNECTOR_VGA , data.port_count,1 );
@@ -649,7 +649,7 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) } } - igt_fixture { + igt_fixture() {igt_display_fini (&data.display);drm_close_driver (data.drm_fd); }
tests/chamelium/kms_chamelium_frames.c +5 -5
@@ -990,13 +990,13 @@ igt_mainstruct chamelium_port *port;int p; - igt_fixture { + igt_fixture() {chamelium_init_test (&data); }igt_describe ("DisplayPort tests" ); igt_subtest_group { - igt_fixture { +igt_fixture () {chamelium_require_connector_present ( data.ports, DRM_MODE_CONNECTOR_DisplayPort, data.port_count,1 );
@@ -1024,7 +1024,7 @@ igt_mainigt_describe ("HDMI tests" ); igt_subtest_group { - igt_fixture { +igt_fixture () {chamelium_require_connector_present ( data.ports,DRM_MODE_CONNECTOR_HDMIA , data.port_count,1 );
@@ -1137,7 +1137,7 @@ igt_mainigt_describe ("VGA tests" ); igt_subtest_group { - igt_fixture { +igt_fixture () {chamelium_require_connector_present ( data.ports,DRM_MODE_CONNECTOR_VGA , data.port_count,1 );
@@ -1149,7 +1149,7 @@ igt_main CHAMELIUM_CHECK_ANALOG, 1); } - igt_fixture { + igt_fixture() {igt_display_fini (&data.display);drm_close_driver (data.drm_fd); }
tests/chamelium/kms_chamelium_hpd.c +6 -6
@@ -466,13 +466,13 @@ igt_mainstruct chamelium_port *port;int p; - igt_fixture { + igt_fixture() {chamelium_init_test (&data); }igt_describe ("DisplayPort tests" ); igt_subtest_group { - igt_fixture { +igt_fixture () {chamelium_require_connector_present ( data.ports, DRM_MODE_CONNECTOR_DisplayPort, data.port_count,1 );
@@ -524,7 +524,7 @@ igt_mainigt_describe ("HDMI tests" ); igt_subtest_group { - igt_fixture { +igt_fixture () {chamelium_require_connector_present ( data.ports,DRM_MODE_CONNECTOR_HDMIA , data.port_count,1 );
@@ -576,7 +576,7 @@ igt_mainigt_describe ("VGA tests" ); igt_subtest_group { - igt_fixture { +igt_fixture () {chamelium_require_connector_present ( data.ports,DRM_MODE_CONNECTOR_VGA , data.port_count,1 );
@@ -617,7 +617,7 @@ igt_mainigt_describe ("Tests that operate on all connectors" ); igt_subtest_group { - igt_fixture { +igt_fixture () {igt_require (data.port_count); }
@@ -637,7 +637,7 @@ igt_mainconnector_subtest ("vga-hpd-for-each-pipe" ,VGA ) test_hotplug_for_each_pipe(&data, port); - igt_fixture { + igt_fixture() {igt_display_fini (&data.display);drm_close_driver (data.drm_fd); }
tests/chamelium/kms_chamelium_sharpness_filter.c +2 -2
@@ -245,7 +245,7 @@ igt_main {data_t data = {}; - igt_fixture { + igt_fixture() { data.drm_fd =drm_open_driver_master (DRIVER_XE );igt_display_require (&data.display, data.drm_fd);
@@ -289,7 +289,7 @@ igt_mainrun_sharpness_filter_test (&data); - igt_fixture { + igt_fixture() {igt_display_fini (&data.display);drm_close_driver (data.drm_fd); }
tests/core_auth.c +1 -1
@@ -244,7 +244,7 @@ igt_main igt_subtest_group {igt_fd_t (master ); -igt_fixture +igt_fixture () master = drm_open_driver_master(DRIVER_ANY);igt_describe ("Test magic numbers for master and slave." );
tests/core_debugfs.c +2 -2
@@ -28,7 +28,7 @@ igt_mainint debugfs =-1 ;int fd =-1 ; - igt_fixture { + igt_fixture() { fd =drm_open_driver_master (DRIVER_ANY ); debugfs =igt_debugfs_dir (fd);igt_require (debugfs >=0 );
@@ -41,7 +41,7 @@ igt_mainigt_dir_process_files_simple (debugfs); } - igt_fixture { + igt_fixture() {close (debugfs);drm_close_driver (fd); }
tests/core_getclient.c +2 -2
@@ -52,7 +52,7 @@ igt_mainint fd, ret;drm_client_t client; -igt_fixture +igt_fixture () fd = drm_open_driver(DRIVER_ANY);igt_describe ("Check GET_CLIENT ioctl of the first drm device." );
@@ -75,6 +75,6 @@ igt_mainigt_assert (ret ==-1 && errno ==EINVAL ); } -igt_fixture + igt_fixture()drm_close_driver (fd); }
tests/core_getstats.c +2 -2
@@ -60,7 +60,7 @@ igt_mainint fd, ret;drm_stats_t stats; -igt_fixture +igt_fixture () fd = drm_open_driver(DRIVER_ANY);igt_describe ("Check DRM_IOCTL_GET_STATS ioctl of the first drm device." );
@@ -69,6 +69,6 @@ igt_mainigt_assert (ret ==0 ); } -igt_fixture + igt_fixture()drm_close_driver (fd); }
tests/core_getversion.c +2 -2
@@ -86,7 +86,7 @@ igt_mainchar info[256 ];int fd; - igt_fixture { + igt_fixture() { fd =__drm_open_driver (DRIVER_ANY );igt_assert_fd (fd); }
@@ -101,6 +101,6 @@ igt_main igt_subtest("all-cards")check_all_drm (); -igt_fixture + igt_fixture()drm_close_driver (fd); }
tests/core_hotunplug.c +17 -17
@@ -683,7 +683,7 @@ igt_main .chipset = DRIVER_ANY, }; - igt_fixture { + igt_fixture() {int fd_drm;char driver[32 ] = {};
@@ -720,11 +720,11 @@ igt_main igt_subtest("unbind-rebind")unbind_rebind (&priv); -igt_fixture + igt_fixture()recover (&priv); } -igt_fixture + igt_fixture()post_healthcheck (&priv); igt_subtest_group {
@@ -732,11 +732,11 @@ igt_main igt_subtest("unplug-rescan")unplug_rescan (&priv); -igt_fixture + igt_fixture()recover (&priv); } -igt_fixture + igt_fixture()post_healthcheck (&priv); igt_subtest_group {
@@ -744,11 +744,11 @@ igt_main igt_subtest("hotunbind-rebind")hotunbind_rebind (&priv); -igt_fixture + igt_fixture()recover (&priv); } -igt_fixture + igt_fixture()post_healthcheck (&priv); igt_subtest_group {
@@ -756,11 +756,11 @@ igt_main igt_subtest("hotunplug-rescan")hotunplug_rescan (&priv); -igt_fixture + igt_fixture()recover (&priv); } -igt_fixture + igt_fixture()post_healthcheck (&priv); igt_subtest_group {
@@ -768,11 +768,11 @@ igt_main igt_subtest("hotrebind")hotrebind (&priv); -igt_fixture + igt_fixture()recover (&priv); } -igt_fixture + igt_fixture()post_healthcheck (&priv); igt_subtest_group {
@@ -780,11 +780,11 @@ igt_main igt_subtest("hotreplug")hotreplug (&priv); -igt_fixture + igt_fixture()recover (&priv); } -igt_fixture + igt_fixture()post_healthcheck (&priv); igt_subtest_group {
@@ -792,11 +792,11 @@ igt_main igt_subtest("hotrebind-lateclose")hotrebind_lateclose (&priv); -igt_fixture + igt_fixture()recover (&priv); } -igt_fixture + igt_fixture()post_healthcheck (&priv); igt_subtest_group {
@@ -804,11 +804,11 @@ igt_main igt_subtest("hotreplug-lateclose")hotreplug_lateclose (&priv); -igt_fixture + igt_fixture()recover (&priv); } - igt_fixture { + igt_fixture() {post_healthcheck (&priv);igt_ignore_warn (close (priv.fd.sysfs_bus));
tests/core_setmaster.c +3 -3
@@ -135,7 +135,7 @@ static void tweak_perm(uint8_t *saved_perm, char *path, bool save)igt_main { - igt_fixture { +igt_fixture () {/* * We're operating on the device files themselves * before opening them, make sure the drivers are
@@ -166,7 +166,7 @@ igt_main/* Note: we use a fixture to ensure the permissions are * restored on skip or failure. */ - igt_fixture { + igt_fixture() {char path[255 ];int len;int fd;
@@ -202,7 +202,7 @@ igt_main }/* Restore the original permissions */ - igt_fixture { + igt_fixture() {tweak_perm (&saved_perm, buf, false); } }
tests/core_sysfs.c +2 -2
@@ -29,7 +29,7 @@ igt_mainint fd =-1 ;int sysfs =-1 ; - igt_fixture { + igt_fixture() { fd =drm_open_driver_master (DRIVER_ANY ); sysfs =igt_sysfs_open (fd);igt_require (sysfs >=0 );
@@ -41,7 +41,7 @@ igt_main igt_subtest("read-all-entries")igt_dir_process_files_simple (sysfs); - igt_fixture { + igt_fixture() {close (sysfs);drm_close_driver (fd); }
tests/device_reset.c +2 -2
@@ -443,7 +443,7 @@ igt_main {struct device_fds dev = { .fds = {-1 ,-1 ,-1 }, .dev_bus_addr = {0 }, }; - igt_fixture { + igt_fixture() {char dev_path[PATH_MAX ];igt_debug ("opening device\n" );
@@ -496,7 +496,7 @@ igt_main } } - igt_fixture { + igt_fixture() {cleanup_device_fds (&dev); } }
tests/dmabuf_sync_file.c +2 -2
@@ -358,7 +358,7 @@ igt_main {int fd; - igt_fixture { + igt_fixture() { fd =drm_open_driver (DRIVER_VGEM ); }
@@ -399,6 +399,6 @@ igt_main igt_subtest("import-multiple-read-write")test_import_multiple (fd, true); -igt_fixture + igt_fixture()drm_close_driver (fd); }
tests/drm_read.c +1 -1
@@ -277,7 +277,7 @@ igt_mainenum pipe pipe;igt_fd_t (fd); - igt_fixture { + igt_fixture() {struct sigaction alarm_action = {};igt_output_t *output;
tests/drm_virtgpu.c +2 -2
@@ -159,7 +159,7 @@ static void create_resource_if_needed(void) igt_main {void *caps_buf =NULL ; - igt_fixture { + igt_fixture() { drm_fd =open_virtgpu_device ();igt_require (drm_fd >=0 );
@@ -424,7 +424,7 @@ igt_main { "No GETPARAM query returned a value."); } - igt_fixture { + igt_fixture() {free (caps_buf);close (drm_fd); }
tests/dumb_buffer.c +2 -2
@@ -393,7 +393,7 @@ igt_main {int fd =-1 ; - igt_fixture { + igt_fixture() { fd =drm_open_driver (DRIVER_ANY ); }
@@ -415,7 +415,7 @@ igt_main igt_subtest("create-clear")always_clear (fd,30 ); - igt_fixture { + igt_fixture() {drm_close_driver (fd); } }
tests/fbdev.c +6 -6
@@ -116,7 +116,7 @@ static void mode_tests(int fd)struct fb_var_screeninfo var_info;struct fb_fix_screeninfo fix_info; - igt_fixture { + igt_fixture() {igt_require (ioctl (fd,FBIOGET_VSCREENINFO , &var_info) ==0 );igt_require (ioctl (fd,FBIOGET_FSCREENINFO , &fix_info) ==0 ); }
@@ -233,7 +233,7 @@ static void mode_tests(int fd) pan_var.vmode &= ~FB_VMODE_YWRAP ; } - igt_fixture { + igt_fixture() {/* restore original panning offsets */ ioctl (fd,FBIOPAN_DISPLAY , &var_info); }
@@ -247,7 +247,7 @@ static void framebuffer_tests(int fd)unsigned char *volatile buf;volatile size_t pagesize; - igt_fixture { + igt_fixture() {long ret;igt_require (ioctl (fd,FBIOGET_FSCREENINFO , &fix_info) ==0 );
@@ -444,7 +444,7 @@ static void framebuffer_tests(int fd) ret); } - igt_fixture { + igt_fixture() {free (buf);/* don't leave garbage on the screen */ memset (map,0 , fix_info.smem_len);
@@ -460,7 +460,7 @@ igt_main* Should this test focus on the fbdev independent of any drm driver, * or should it look for fbdev of a particular device? */ - igt_fixture { + igt_fixture() { fd =open ("/dev/fb0" ,O_RDWR );if (fd <0 ) {drm_load_module (DRIVER_ANY );
@@ -479,7 +479,7 @@ igt_mainframebuffer_tests (fd); } - igt_fixture { + igt_fixture() {close (fd); } }
tests/intel/api_intel_allocator.c +2 -2
@@ -815,7 +815,7 @@ igt_mainint fd;struct allocators *a; - igt_fixture { + igt_fixture() { fd =drm_open_driver (DRIVER_INTEL |DRIVER_XE );atomic_init (&next_handle,1 );srandom (0xdeadbeef );
@@ -900,6 +900,6 @@ igt_maingem_pool (fd); } -igt_fixture + igt_fixture()drm_close_driver (fd); }
tests/intel/api_intel_bb.c +2 -2
@@ -1594,7 +1594,7 @@ igt_main_args("dpibc:", NULL, help_str, opt_handler, NULL) { I915_TILING_Y, "y" }, }; - igt_fixture { + igt_fixture() { i915 =drm_open_driver (DRIVER_INTEL ); bops =buf_ops_create (i915); gen =intel_gen (intel_get_drm_devid (i915));
@@ -1717,7 +1717,7 @@ igt_main_args("dpibc:", NULL, help_str, opt_handler, NULL) } } - igt_fixture { + igt_fixture() {buf_ops_destroy (bops);drm_close_driver (i915); }
tests/intel/gem_bad_reloc.c +2 -2
@@ -210,7 +210,7 @@ igt_main {int fd =-1 ; - igt_fixture { + igt_fixture() { fd =drm_open_driver (DRIVER_INTEL );igt_require_gem (fd);/* Check if relocations supported by platform */
@@ -232,6 +232,6 @@ igt_main igt_subtest("negative-reloc-bltcopy")negative_reloc_blt (fd); -igt_fixture + igt_fixture()drm_close_driver (fd); }
tests/intel/gem_barrier_race.c +2 -2
@@ -147,7 +147,7 @@ igt_main {int fd; - igt_fixture { + igt_fixture() { fd =drm_open_driver_render (DRIVER_INTEL );igt_require_gem (fd); }
@@ -169,6 +169,6 @@ igt_main } } -igt_fixture + igt_fixture()drm_close_driver (fd); }
tests/intel/gem_basic.c +1 -1
@@ -110,7 +110,7 @@ igt_mainigt_fd_t (fd);int gpu_count; - igt_fixture { + igt_fixture() { fd =drm_open_driver (DRIVER_INTEL ); gpu_count =igt_device_filter_count (); }
tests/intel/gem_blits.c +2 -2
@@ -824,7 +824,7 @@ igt_main {struct device device; - igt_fixture { + igt_fixture() { device.fd =drm_open_driver_render (DRIVER_INTEL );igt_require_gem (device.fd);gem_require_blitter (device.fd);
@@ -900,7 +900,7 @@ igt_main } } - igt_fixture { + igt_fixture() {put_ahnd (device.ahnd);drm_close_driver (device.fd); }
tests/intel/gem_busy.c +11 -11
@@ -475,14 +475,14 @@ igt_mainconst intel_ctx_t *ctx;int fd =-1 ; - igt_fixture { + igt_fixture() { fd =drm_open_driver_master (DRIVER_INTEL );igt_require_gem (fd); ctx =intel_ctx_create_all_physical (fd); } igt_subtest_group { - igt_fixture { +igt_fixture () {intel_allocator_multiprocess_start ();igt_fork_hang_detector (fd); }
@@ -507,7 +507,7 @@ igt_main igt_subtest("close-race")close_race (fd, ctx); - igt_fixture { + igt_fixture() {igt_stop_hang_detector ();intel_allocator_multiprocess_stop (); }
@@ -515,12 +515,12 @@ igt_main igt_subtest_group { - igt_fixture { +igt_fixture () {igt_fork_hang_detector (fd); } igt_subtest_group { - igt_fixture { +igt_fixture () {igt_require (has_extended_busy_ioctl (fd));gem_require_mmap_device_coherent (fd); }
@@ -544,7 +544,7 @@ igt_main } igt_subtest_group { - igt_fixture { +igt_fixture () {igt_require (has_extended_busy_ioctl (fd));igt_require (has_semaphores (fd)); }
@@ -559,7 +559,7 @@ igt_main } } - igt_fixture { + igt_fixture() {igt_stop_hang_detector (); } }
@@ -567,7 +567,7 @@ igt_main igt_subtest_group {igt_hang_t hang; - igt_fixture { + igt_fixture() { hang =igt_allow_hang (fd, ctx->id,0 ); }
@@ -580,7 +580,7 @@ igt_main } igt_subtest_group { - igt_fixture { +igt_fixture () {igt_require (has_extended_busy_ioctl (fd));gem_require_mmap_device_coherent (fd); }
@@ -595,12 +595,12 @@ igt_main } } - igt_fixture { + igt_fixture() {igt_disallow_hang (fd, hang); } } - igt_fixture { + igt_fixture() {intel_ctx_destroy (fd, ctx);drm_close_driver (fd); }
tests/intel/gem_caching.c +2 -2
@@ -165,7 +165,7 @@ igt_mainuint8_t *cpu_ptr;uint8_t *gtt_ptr; - igt_fixture { + igt_fixture() {srandom (0xdeadbeef ); data.fd =drm_open_driver (DRIVER_INTEL );
@@ -352,7 +352,7 @@ igt_mainintel_bb_destroy (ibb); } - igt_fixture { + igt_fixture() {intel_buf_destroy (scratch_buf);intel_buf_destroy (staging_buf);buf_ops_destroy (data.bops);
tests/intel/gem_ccs.c +2 -2
@@ -774,7 +774,7 @@ igt_main_args("bf:pst:W:H:", NULL, help_str, opt_handler, NULL)int i915;igt_hang_t hang; - igt_fixture { + igt_fixture() { i915 =drm_open_driver (DRIVER_INTEL );igt_require_gem (i915);igt_require (blt_has_block_copy (i915));
@@ -853,7 +853,7 @@ igt_main_args("bf:pst:W:H:", NULL, help_str, opt_handler, NULL)block_copy_test (i915, &config, ctx, set,BLOCK_COPY ); } - igt_fixture { + igt_fixture() {igt_disallow_hang (i915, hang);drm_close_driver (i915); }
tests/intel/gem_close.c +1 -1
@@ -141,7 +141,7 @@ igt_main {igt_fd_t (fd); - igt_fixture { + igt_fixture() {/* Create an flink requires DRM_AUTH */ fd =drm_open_driver_master (DRIVER_INTEL );igt_require_gem (fd);
tests/intel/gem_close_race.c +2 -2
@@ -340,7 +340,7 @@ igt_main {int gpu_count; - igt_fixture { + igt_fixture() {int fd; fd =drm_open_driver (DRIVER_INTEL );
@@ -422,6 +422,6 @@ igt_main igt_subtest("gem-close-race")threads (150 ,0 ); -igt_fixture + igt_fixture()igt_stop_hang_detector (); }
tests/intel/gem_compute.c +2 -2
@@ -35,12 +35,12 @@ igt_main {int i915; -igt_fixture +igt_fixture () i915 = drm_open_driver(DRIVER_INTEL); igt_subtest("compute-square")test_compute_square (i915); -igt_fixture + igt_fixture()drm_close_driver (i915); }
tests/intel/gem_concurrent_all.c +16 -16
@@ -1564,7 +1564,7 @@ run_mode(const char *prefix, }, *h;struct buffers buffers; -igt_fixture + igt_fixture()buffers_init (&buffers, prefix, create, mode, size, num_buffers, fd);
@@ -1573,12 +1573,12 @@ run_mode(const char *prefix,continue ;if (!*h->suffix) - igt_fixture + igt_fixture()igt_fork_hang_detector (fd);for (p = all ? pipelines : pskip; p->prefix; p++) { igt_subtest_group { - igt_fixture p->require(); + igt_fixture() p->require(); igt_subtest_f("%s-%s-%s-sanitycheck0%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) {buffers_create (&buffers);
@@ -1707,11 +1707,11 @@ run_mode(const char *prefix, }if (!*h->suffix) - igt_fixture + igt_fixture()igt_stop_hang_detector (); } -igt_fixture + igt_fixture()buffers_fini (&buffers); }
@@ -1736,7 +1736,7 @@ run_modes(const char *style,while (mode->name) { igt_subtest_group { - igt_fixture { +igt_fixture () {if (mode->require) mode->require (create, num); }
@@ -1897,7 +1897,7 @@ igt_mainif (strstr (igt_test_name (),"all" )) all = true; - igt_fixture { + igt_fixture() {igt_allow_unlimited_files (); fd =drm_open_driver (DRIVER_INTEL );
@@ -1921,7 +1921,7 @@ igt_mainsnprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"tiny" ); igt_subtest_group { - igt_fixture { +igt_fixture () { count =num_buffers (0 , s, c,CHECK_RAM ); }run_modes (name, c, modes, s, count);
@@ -1931,7 +1931,7 @@ igt_mainsnprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"small" ); igt_subtest_group { - igt_fixture { +igt_fixture () { count =num_buffers (gem_mappable_aperture_size (fd)/4 , s, c,CHECK_RAM ); }
@@ -1942,7 +1942,7 @@ igt_mainsnprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"thrash" ); igt_subtest_group { - igt_fixture { +igt_fixture () { count =num_buffers (gem_mappable_aperture_size (fd), s, c,CHECK_RAM ); }
@@ -1953,7 +1953,7 @@ igt_mainsnprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"global" ); igt_subtest_group { - igt_fixture { +igt_fixture () { count =num_buffers (gem_global_aperture_size (fd), s, c,CHECK_RAM ); }
@@ -1964,7 +1964,7 @@ igt_mainsnprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"full" ); igt_subtest_group { - igt_fixture { +igt_fixture () { count =num_buffers (gem_aperture_size (fd), s, c,CHECK_RAM ); }
@@ -1974,7 +1974,7 @@ igt_mainsnprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"shrink" ); igt_subtest_group { - igt_fixture { +igt_fixture () { count =num_buffers (gem_mappable_aperture_size (fd), s, c,CHECK_RAM );
@@ -1982,7 +1982,7 @@ igt_main }run_modes (name, c, modes, s, count); -igt_fixture + igt_fixture()igt_stop_shrink_helper (); }
@@ -1990,7 +1990,7 @@ igt_mainsnprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"swap" ); igt_subtest_group { - igt_fixture { +igt_fixture () {if (igt_get_avail_ram_mb () >gem_mappable_aperture_size (fd)/(1024 *1024 )) { pin_sz =igt_get_avail_ram_mb () -gem_mappable_aperture_size (fd)/(1024 *1024 );
@@ -2021,7 +2021,7 @@ igt_main } } - igt_fixture { + igt_fixture() {drm_close_driver (fd);drm_close_driver (vgem_drv); }
tests/intel/gem_create.c +3 -3
@@ -950,7 +950,7 @@ igt_main {igt_fd_t (fd); - igt_fixture { + igt_fixture() { fd =drm_open_driver (DRIVER_INTEL ); }
@@ -985,7 +985,7 @@ igt_mainigt_describe ("Create buffer objects while GPU is busy." ); igt_subtest_group { -igt_fixture +igt_fixture ()igt_fork_hang_detector (fd); igt_subtest_with_dynamic("busy-create") {
@@ -1002,7 +1002,7 @@ igt_main } } -igt_fixture + igt_fixture()igt_stop_hang_detector (); }
tests/intel/gem_cs_tlb.c +2 -2
@@ -160,7 +160,7 @@ igt_mainconst intel_ctx_t *ctx;int fd =-1 ; - igt_fixture { + igt_fixture() { fd =drm_open_driver (DRIVER_INTEL );igt_require_gem (fd); ctx =intel_ctx_create_all_physical (fd);
@@ -173,6 +173,6 @@ igt_main } } -igt_fixture + igt_fixture()drm_close_driver (fd); }
tests/intel/gem_ctx_bad_destroy.c +2 -2
@@ -60,7 +60,7 @@ int fd;igt_main { - igt_fixture { +igt_fixture () { fd =drm_open_driver_render (DRIVER_INTEL );gem_require_contexts (fd);
@@ -97,6 +97,6 @@ igt_maingem_context_destroy (fd, ctx_id); } -igt_fixture + igt_fixture()drm_close_driver (fd); }
tests/intel/gem_ctx_create.c +2 -2
@@ -622,7 +622,7 @@ igt_mainintel_ctx_cfg_t cfg;int fd =-1 ; - igt_fixture { + igt_fixture() { fd =drm_open_driver (DRIVER_INTEL );igt_require_gem (fd);gem_require_contexts (fd);
@@ -721,7 +721,7 @@ igt_main } } - igt_fixture { + igt_fixture() {igt_stop_hang_detector ();drm_close_driver (fd); }
tests/intel/gem_ctx_engines.c +2 -2
@@ -614,7 +614,7 @@ igt_mainconst struct intel_execution_engine2 *e;igt_fd_t (i915); - igt_fixture { + igt_fixture() { i915 =drm_open_driver (DRIVER_INTEL );igt_require_gem (i915);
@@ -654,6 +654,6 @@ igt_mainindependent_all (i915, ctx); } -igt_fixture + igt_fixture()igt_stop_hang_detector (); }
tests/intel/gem_ctx_exec.c +4 -4
@@ -493,7 +493,7 @@ igt_mainuint32_t ctx_id;int fd; - igt_fixture { + igt_fixture() { fd =drm_open_driver_render (DRIVER_INTEL );igt_require_gem (fd);
@@ -541,14 +541,14 @@ igt_mainigt_describe ("Race the execution and interrupt handlers along a context," " while closing it at a random time." ); igt_subtest_group { - igt_fixture { +igt_fixture () {intel_allocator_multiprocess_start (); } igt_subtest("basic-close-race")close_race (fd); - igt_fixture { + igt_fixture() {intel_allocator_multiprocess_stop (); } }
@@ -585,6 +585,6 @@ igt_mainput_ahnd (ahnd); } -igt_fixture + igt_fixture()drm_close_driver (fd); }
tests/intel/gem_ctx_freq.c +2 -2
@@ -262,7 +262,7 @@ static void disable_boost(void)igt_main { - igt_fixture { +igt_fixture () { i915 =drm_open_driver (DRIVER_INTEL );igt_require_gem (i915);
@@ -281,7 +281,7 @@ igt_mainsysfs_range (dirfd, gt); } - igt_fixture { + igt_fixture() {close (sysfs);drm_close_driver (i915); }
tests/intel/gem_ctx_isolation.c +3 -3
@@ -1011,7 +1011,7 @@ igt_mainintel_ctx_cfg_t cfg;igt_fd_t (i915); - igt_fixture { + igt_fixture() {int gen; i915 =drm_open_driver (DRIVER_INTEL );
@@ -1029,7 +1029,7 @@ igt_main igt_skip_on(gen > LAST_KNOWN_GEN); } - igt_fixture { + igt_fixture() { igt_fork_hang_detector(i915); }
@@ -1073,7 +1073,7 @@ igt_main preservation(i915, &cfg, e, S4); } - igt_fixture { + igt_fixture() { igt_stop_hang_detector(); }
tests/intel/gem_ctx_param.c +3 -3
@@ -380,7 +380,7 @@ igt_main memset(&arg, 0, sizeof(arg)); - igt_fixture { + igt_fixture() { fd = drm_open_driver_render(DRIVER_INTEL); gem_require_contexts(fd);
@@ -483,7 +483,7 @@ igt_main igt_describe("Test performed with context param set to priority"); igt_subtest_group { - igt_fixture { + igt_fixture() { igt_require(gem_scheduler_has_ctx_priority(fd)); }
@@ -549,6 +549,6 @@ igt_main igt_subtest("invalid-get-engines") test_get_invalid_param(fd, I915_CONTEXT_PARAM_ENGINES); - igt_fixture + igt_fixture() drm_close_driver(fd); }
tests/intel/gem_ctx_persistence.c +6 -6
@@ -1351,7 +1351,7 @@ igt_main }; const intel_ctx_t *ctx; - igt_fixture { + igt_fixture() { i915 = drm_open_driver(DRIVER_INTEL); igt_require_gem(i915);
@@ -1401,7 +1401,7 @@ igt_main test_noheartbeat_close(i915, IGT_SPIN_NO_PREEMPTION); igt_subtest_group { - igt_fixture + igt_fixture() gem_require_contexts(i915); for (test = tests; test->name; test++) {
@@ -1423,7 +1423,7 @@ igt_main igt_subtest_group { const struct intel_execution_engine2 *e; - igt_fixture + igt_fixture() gem_require_contexts(i915); for (test = tests; test->name; test++) {
@@ -1457,7 +1457,7 @@ igt_main } igt_subtest_group { - igt_fixture { + igt_fixture() { gem_require_contexts(i915); intel_allocator_multiprocess_start(); }
@@ -1465,13 +1465,13 @@ igt_main igt_subtest("smoketest") smoketest(i915, &ctx->cfg); - igt_fixture { + igt_fixture() { intel_allocator_multiprocess_stop(); } } - igt_fixture { + igt_fixture() { drm_close_driver(i915); } }
tests/intel/gem_ctx_shared.c +6 -6
@@ -1029,14 +1029,14 @@ igt_main intel_ctx_cfg_t cfg; igt_fd_t(i915); - igt_fixture { + igt_fixture() { i915 = drm_open_driver(DRIVER_INTEL); igt_require_gem(i915); cfg = intel_ctx_cfg_all_physical(i915); } igt_subtest_group { - igt_fixture { + igt_fixture() { igt_require(gem_has_vm(i915)); igt_fork_hang_detector(i915); }
@@ -1072,7 +1072,7 @@ igt_main * and so rely on gem_exec_schedule to prove the rest. */ igt_subtest_group { - igt_fixture { + igt_fixture() { igt_require(gem_scheduler_enabled(i915)); igt_require(gem_scheduler_has_ctx_priority(i915)); igt_require(gem_has_vm(i915));
@@ -1101,7 +1101,7 @@ igt_main } igt_subtest_group { - igt_fixture { + igt_fixture() { igt_require(gem_scheduler_enabled(i915)); igt_require(gem_scheduler_has_ctx_priority(i915)); igt_require(gem_has_vm(i915));
@@ -1117,7 +1117,7 @@ igt_main igt_subtest("Q-smoketest-all") smoketest(i915, &cfg, -1, 30); - igt_fixture { + igt_fixture() { intel_allocator_multiprocess_stop(); } }
@@ -1129,7 +1129,7 @@ igt_main igt_subtest("exhaust-shared-gtt-lrc") exhaust_shared_gtt(i915, EXHAUST_LRC); - igt_fixture { + igt_fixture() { igt_stop_hang_detector(); } }
tests/intel/gem_ctx_sseu.c +3 -3
@@ -518,7 +518,7 @@ igt_main { int fd; - igt_fixture { + igt_fixture() { fd = drm_open_driver(DRIVER_INTEL); igt_require_gem(fd);
@@ -529,7 +529,7 @@ igt_main } igt_subtest_group { - igt_fixture { + igt_fixture() { drm_i915_getparam_t gp; gp.param = I915_PARAM_SLICE_MASK;
@@ -561,7 +561,7 @@ igt_main test_engines(fd); } - igt_fixture { + igt_fixture() { drm_close_driver(fd); } }
tests/intel/gem_ctx_switch.c +5 -5
@@ -707,7 +707,7 @@ igt_main uint32_t light = 0, heavy; int fd = -1; - igt_fixture { + igt_fixture() { const uint32_t bbe = MI_BATCH_BUFFER_END; fd = drm_open_driver(DRIVER_INTEL);
@@ -738,7 +738,7 @@ igt_main for (typeof(*phases) *p = phases; p->name; p++) { igt_subtest_group { - igt_fixture { + igt_fixture() { gem_require_ring(fd, e2->flags); if (p->require) igt_require(p->require(fd));
@@ -767,7 +767,7 @@ igt_main for_each_ctx_cfg_engine(fd, &engines_cfg, e2) { for (typeof(*phases) *p = phases; p->name; p++) { igt_subtest_group { - igt_fixture { + igt_fixture() { if (p->require) igt_require(p->require(fd)); }
@@ -795,7 +795,7 @@ igt_main all(fd, heavy, &engines_cfg, 0, 2); igt_subtest_group { - igt_fixture { + igt_fixture() { gem_require_vm(fd); } igt_subtest("queue-light")
@@ -804,7 +804,7 @@ igt_main all(fd, heavy, &engines_cfg, QUEUE, 2); } - igt_fixture { + igt_fixture() { igt_stop_hang_detector(); gem_close(fd, heavy); gem_close(fd, light);
tests/intel/gem_eio.c +5 -5
@@ -1104,7 +1104,7 @@ exit_handler(int sig) igt_main { - igt_fixture { + igt_fixture() { fd = drm_open_driver(DRIVER_INTEL); igt_device_drop_master(fd);
@@ -1153,7 +1153,7 @@ igt_main test_inflight_suspend(fd); igt_subtest_group { - igt_fixture { + igt_fixture() { igt_require(gem_has_contexts(fd)); }
@@ -1198,7 +1198,7 @@ igt_main .drm_fd = -1, .n_pipes = IGT_MAX_PIPES }; - igt_fixture { + igt_fixture() { igt_device_set_master(fd); igt_display_require(&display, fd);
@@ -1209,11 +1209,11 @@ igt_main igt_subtest("kms") test_kms(fd, &display); - igt_fixture { + igt_fixture() { intel_allocator_multiprocess_stop(); } } - igt_fixture + igt_fixture() drm_close_driver(fd); }
tests/intel/gem_evict_alignment.c +3 -3
@@ -214,7 +214,7 @@ igt_main uint64_t size, count; int fd = -1; - igt_fixture { + igt_fixture() { fd = drm_open_driver(DRIVER_INTEL); igt_require_gem(fd); gem_require_blitter(fd);
@@ -240,7 +240,7 @@ igt_main major_evictions(fd, size, count); } - igt_fixture { + igt_fixture() { igt_stop_hang_detector(); }
@@ -283,7 +283,7 @@ igt_main } igt_stop_signal_helper(); - igt_fixture { + igt_fixture() { igt_stop_hang_helper(); drm_close_driver(fd); }
tests/intel/gem_evict_everything.c +4 -4
@@ -249,7 +249,7 @@ igt_main size = count = 0; fd = -1; - igt_fixture { + igt_fixture() { fd = drm_open_driver(DRIVER_INTEL); igt_require_gem(fd); gem_require_blitter(fd);
@@ -293,7 +293,7 @@ igt_main test_major_evictions(fd, size, count); } - igt_fixture { + igt_fixture() { size = 1024 * 1024; count = gem_aperture_size(fd); if (count >> 32)
@@ -321,7 +321,7 @@ igt_main test_major_evictions(fd, size, count);
Lines of this file are not shown. View the raw message.
tests/intel/gem_pipe_control_store_loop.c +2 -2
Lines of this file are not shown. View the raw message.
tests/intel/gem_tiled_partial_pwrite_pread.c +2 -2
Lines of this file are not shown. View the raw message.
tests/intel/kms_dp_linktrain_fallback.c +2 -2
Lines of this file are not shown. View the raw message.
tests/intel/xe_sriov_auto_provisioning.c +2 -2
Lines of this file are not shown. View the raw message.
tests/intel/xe_sysfs_timeslice_duration.c +2 -2
Lines of this file are not shown. View the raw message.
tests/kms_addfb_basic.c +25 -25
50 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.49.1
Part of the diff is not shown here. View the raw message.
Re: [PATCH i-g-t 1/7] igt: Make igt_fixture look like an iterator
Hi Ville,
Quoted 10 lines · Ville Syrjala
From: Ville Syrjälä <[email protected]>
Turn
igt_fixtureintoigt_fixture(). This allows coccinelle to parse it when given a helping hand with the 'iterator nameigt_fixture' directive.Conversion done via:
$ find -type f -name \*.[ch] -exec sed -i 's/\([^_]\)igt_fixture/\1igt_fixture()/g' {} +Signed-off-by Ville Syrjälä <[email protected]>
I could ack this series but before merging please add at least one, non-trivial patch which makes actual change with cocci.
Regards,
Kamil
[cut]
PATCH 2/7 igt: Make igt_subtest_group look like an iterator
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Turn igt_subtest_group into igt_subtest_group(). This allows coccinelle to parse it when given a helping hand with the
'iterator name igt_subtest_group' directive.
Conversion done via:
$ find -type f -name \*.[ch] -exec sed -i 's/igt_subtest_group\([^_(]\|$\)/igt_subtest_group()\1/g' {} +--- lib/igt_core.c | 8 ++-- lib/igt_core.h | 14 +++---- lib/tests/igt_audio.c | 2 +- lib/tests/igt_describe.c | 6 +-- lib/tests/igt_hook.c | 2 +- lib/tests/igt_nesting.c | 6 +-- lib/tests/igt_subtest_group.c | 8 ++-- lib/tests/igt_types.c | 8 ++-- runner/runner_kmemleak_test.c | 2 +- runner/runner_tests.c | 56 +++++++++++++------------- tests/chamelium/kms_chamelium_audio.c | 4 +- tests/chamelium/kms_chamelium_color.c | 2 +- tests/chamelium/kms_chamelium_edid.c | 6 +-- tests/chamelium/kms_chamelium_frames.c | 6 +-- tests/chamelium/kms_chamelium_hpd.c | 8 ++-- tests/core_auth.c | 2 +- tests/core_hotunplug.c | 16 ++++---- tests/core_setmaster.c | 2 +- tests/device_reset.c | 2 +- tests/fbdev.c | 4 +- tests/intel/gem_busy.c | 12 +++--- tests/intel/gem_concurrent_all.c | 18 ++++----- tests/intel/gem_create.c | 2 +- tests/intel/gem_ctx_exec.c | 2 +- tests/intel/gem_ctx_param.c | 2 +- tests/intel/gem_ctx_persistence.c | 6 +-- tests/intel/gem_ctx_shared.c | 6 +-- tests/intel/gem_ctx_sseu.c | 2 +- tests/intel/gem_ctx_switch.c | 6 +-- tests/intel/gem_eio.c | 6 +-- tests/intel/gem_exec_async.c | 2 +- tests/intel/gem_exec_balancer.c | 10 ++--- tests/intel/gem_exec_endless.c | 2 +- tests/intel/gem_exec_fence.c | 16 ++++---- tests/intel/gem_exec_flush.c | 2 +- tests/intel/gem_exec_latency.c | 4 +- tests/intel/gem_exec_nop.c | 4 +- tests/intel/gem_exec_reloc.c | 4 +- tests/intel/gem_exec_schedule.c | 18 ++++----- tests/intel/gem_exec_whisper.c | 2 +- tests/intel/gem_linear_blits.c | 2 +- tests/intel/gem_mmap_gtt.c | 2 +- tests/intel/gem_mmap_wc.c | 2 +- tests/intel/gem_ppgtt.c | 2 +- tests/intel/gem_pxp.c | 10 ++--- tests/intel/gem_reset_stats.c | 2 +- tests/intel/gem_softpin.c | 4 +- tests/intel/gem_spin_batch.c | 2 +- tests/intel/gem_sync.c | 2 +- tests/intel/gem_tiled_blits.c | 2 +- tests/intel/gem_tiled_fence_blits.c | 2 +- tests/intel/gem_userptr_blits.c | 8 ++-- tests/intel/gem_vm_create.c | 2 +- tests/intel/gem_wait.c | 4 +- tests/intel/gem_watchdog.c | 2 +- tests/intel/gem_workarounds.c | 2 +- tests/intel/gen7_exec_parse.c | 2 +- tests/intel/i915_drm_fdinfo.c | 2 +- tests/intel/i915_pm_rc6_residency.c | 2 +- tests/intel/i915_query.c | 2 +- tests/intel/kms_frontbuffer_tracking.c | 2 +- tests/intel/kms_joiner.c | 8 ++-- tests/intel/perf.c | 6 +-- tests/intel/perf_pmu.c | 6 +-- tests/intel/prime_busy.c | 2 +- tests/intel/xe_eudebug.c | 4 +- tests/intel/xe_eudebug_online.c | 2 +- tests/intel/xe_exec_queue_property.c | 2 +- tests/intel/xe_exec_sip_eudebug.c | 4 +- tests/intel/xe_mmap.c | 2 +- tests/intel/xe_oa.c | 10 ++--- tests/intel/xe_pmu.c | 8 ++-- tests/intel/xe_pxp.c | 8 ++-- tests/kms_addfb_basic.c | 16 ++++---- tests/kms_async_flips.c | 2 +- tests/kms_color.c | 4 +- tests/kms_content_protection.c | 4 +- tests/kms_cursor_crc.c | 6 +-- tests/kms_cursor_legacy.c | 18 ++++----- tests/kms_feature_discovery.c | 4 +- tests/kms_getfb.c | 8 ++-- tests/kms_lease.c | 4 +- tests/kms_plane_scaling.c | 4 +- tests/kms_prime.c | 4 +- tests/kms_properties.c | 6 +-- tests/kms_vrr.c | 2 +- tests/prime_vgem.c | 6 +-- tests/vgem_basic.c | 4 +- tests/vmwgfx/vmw_prime.c | 2 +- 89 files changed, 253 insertions(+), 253 deletions(-)
lib/igt_core.c +4 -4
@@ -122,7 +122,7 @@* of subtests and automatically skips the subtest code blocks themselves. For * special cases igt_only_list_subtests() is also provided. For setup code only * shared by a group of subtest encapsulate the #igt_fixture() block and all the -* subtestest in a #igt_subtest_group block. +* subtestest in a #igt_subtest_group() block. * * # Magic Control Blocks *
@@ -1500,7 +1500,7 @@ bool __igt_run_subtest(const char *subtest_name, const char *file, const int lin {internal_assert (!igt_can_fail (),"igt_subtest can be nested only in igt_main" -" or igt_subtest_group\n" ); +" or igt_subtest_group()\n" );if (!valid_name_for_subtest (subtest_name)) { igt_critical("Invalid subtest name \"%s\".\n",
@@ -1627,7 +1627,7 @@ bool igt_only_list_subtests(void)void __igt_subtest_group_save (int *save,int *desc) {internal_assert (test_with_subtests, -"igt_subtest_group is not allowed in igt_simple_main\n" ); +"igt_subtest_group() is not allowed in igt_simple_main\n" );if (__current_description[0 ] !='\0' ) {struct description_node *new =calloc (1 ,sizeof (*new));
@@ -1992,7 +1992,7 @@ bool igt_can_fail(void)* @fmt: format string containing description * @...: argument used by the format string * -* Attach a description to the following #igt_subtest or #igt_subtest_group +* Attach a description to the following #igt_subtest or #igt_subtest_group() * block. * * Check #igt_describe for more details.
lib/igt_core.h +7 -7
@@ -388,7 +388,7 @@ bool igt_only_list_subtests(void);void __igt_subtest_group_save (int *,int *);void __igt_subtest_group_restore (int ,int );/** -* igt_subtest_group: +* igt_subtest_group(): * * Group a set of subtests together with their common setup code *
@@ -402,7 +402,7 @@ void __igt_subtest_group_restore(int, int);* clauses. If any common setup in a fixture fails, only the subtests in this * group will fail or skip. Subtest groups can be arbitrarily nested. */ -#define igt_subtest_group for (int igt_unique(__tmpint) = 0, \ +#define igt_subtest_group () for (int igt_unique(__tmpint) = 0, \ igt_unique(__save) = 0, \ igt_unique(__desc) = 0; \ igt_unique(__tmpint) < 1 && \
@@ -556,7 +556,7 @@ void igt_describe_f(const char *fmt, ...);* igt_describe: * @dsc: string containing description * -* Attach a description to the following #igt_subtest or #igt_subtest_group +* Attach a description to the following #igt_subtest or #igt_subtest_group() * block. * * The description should complement the test/subtest name and provide more
@@ -588,7 +588,7 @@ void igt_describe_f(const char *fmt, ...);* * * Resulting #igt_subtest documentation is a concatenation of its own -* description and all the parenting #igt_subtest_group descriptions, starting +* description and all the parenting #igt_subtest_group() descriptions, starting * from the outermost one. Example: * * |[<!-- language="C" -->
@@ -598,7 +598,7 @@ void igt_describe_f(const char *fmt, ...);* igt_main * { * igt_describe("Desc of the subgroup with A and B"); -* igt_subtest_group { +* igt_subtest_group() { * igt_describe("Desc of the subtest A"); * igt_subtest("subtest-a") { * ...
@@ -638,7 +638,7 @@ void igt_describe_f(const char *fmt, ...);* ]| * * Every single #igt_subtest does not have to be preceded with a #igt_describe -* as long as it has good-enough explanation provided on the #igt_subtest_group +* as long as it has good-enough explanation provided on the #igt_subtest_group() * level. * * Example:
@@ -649,7 +649,7 @@ void igt_describe_f(const char *fmt, ...);* igt_main * { * igt_describe("check xyz with different tilings"); -* igt_subtest_group { +* igt_subtest_group() { * // no need for extra description, group is enough and tiling is * // obvious from the test name * igt_subtest("foo-tiling-x") {
lib/tests/igt_audio.c +1 -1
@@ -180,7 +180,7 @@ igt_mainint ret;size_t i; - igt_subtest_group { + igt_subtest_group() { igt_fixture() { signal =audio_signal_init (CHANNELS ,SAMPLING_RATE );
lib/tests/igt_describe.c +3 -3
@@ -46,7 +46,7 @@ __noreturn static void fake_main(void)printf ("should not be executed!\n" );igt_describe ("Group with B, C & D" ); - igt_subtest_group { + igt_subtest_group() {igt_describe ("Basic B" );igt_subtest ("B" ) ;
@@ -55,7 +55,7 @@ __noreturn static void fake_main(void)printf ("should not be executed!\n" );igt_describe ("Group with C & D" ); - igt_subtest_group { + igt_subtest_group() {igt_describe ("Basic C" ); igt_subtest("C")printf ("should not be executed!\n" );
@@ -67,7 +67,7 @@ __noreturn static void fake_main(void) }// NO DOC - igt_subtest_group { + igt_subtest_group() {// NO DOC igt_subtest ("E" ) ;
lib/tests/igt_hook.c +1 -1
@@ -156,7 +156,7 @@ igt_main igt_subtest("help-description")test_print_help (); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require_f (system (NULL ),"Shell seems not to be available\n" ); }
lib/tests/igt_nesting.c +3 -3
@@ -47,8 +47,8 @@ __noreturn static void all_valid(void) igt_fixture() { } - igt_subtest_group { - igt_subtest_group { + igt_subtest_group() { + igt_subtest_group() { } igt_fixture() {
@@ -101,7 +101,7 @@ __noreturn static void invalid_subtest_group_in_simple_test(void) {igt_simple_init (fake_argc, fake_argv); - igt_subtest_group { + igt_subtest_group() { }igt_exit ();
lib/tests/igt_subtest_group.c +4 -4
@@ -36,12 +36,12 @@ igt_mainvolatile bool t1 = false;volatile int t2 =0 ; - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (true); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (false); }
@@ -50,7 +50,7 @@ igt_maininternal_assert (0 ); } - igt_subtest_group { + igt_subtest_group() {/* need to make sure we don't accidentally * restore to "run testcases" when an outer * group is already in SKIP state. */
@@ -66,7 +66,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {internal_assert (t2 ==0 ); t2 =1 ;
lib/tests/igt_types.c +4 -4
@@ -73,7 +73,7 @@ igt_main/* But not before we go out of scope! */ cleanup_called =0 ; - igt_subtest_group { + igt_subtest_group() {scoped_int_t (x); igt_fixture() {
@@ -112,7 +112,7 @@ igt_main* will get cleanup on the outer scope. */ cleanup_called =0 ; - igt_subtest_group { + igt_subtest_group() {scoped_int_t (x);igt_describe ("Check skipping a subtest group" );
@@ -131,7 +131,7 @@ igt_mainigt_assert (cleanup_called); cleanup_called =0 ; -igt_subtest_group + igt_subtest_group()delegate ();igt_describe ("Check cleanup after group delegation" );igt_subtest ("cleanup-after-group-delegation" )
@@ -145,7 +145,7 @@ igt_mainigt_assert (cleanup_called); cleanup_called =0 ; -igt_subtest_group + igt_subtest_group()skip_delegate ();igt_describe ("Check cleanup after skipping group delegation" );igt_subtest ("cleanup-after-group-skipped-delegation" )
runner/runner_kmemleak_test.c +1 -1
@@ -246,7 +246,7 @@ igt_mainigt_assert (runner_kmemleak_init (unit_testing_kmemleak_filepath)); } - igt_subtest_group { + igt_subtest_group() { igt_subtest("test_runner_kmemleak_once")igt_assert (runner_kmemleak (NULL , resdirfd, false, true));
runner/runner_tests.c +28 -28
224 lines not on this page · raw message
tests/chamelium/kms_chamelium_audio.c +2 -2
@@ -859,7 +859,7 @@ igt_main }igt_describe ("DisplayPort tests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { chamelium_require_connector_present( data.ports, DRM_MODE_CONNECTOR_DisplayPort,
@@ -877,7 +877,7 @@ igt_main }igt_describe ("HDMI tests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { chamelium_require_connector_present( data.ports, DRM_MODE_CONNECTOR_HDMIA,
tests/chamelium/kms_chamelium_color.c +1 -1
@@ -763,7 +763,7 @@ igt_mainkmstest_set_vt_graphics_mode (); } -igt_subtest_group + igt_subtest_group()run_tests_for_pipe (&data); igt_fixture() {
tests/chamelium/kms_chamelium_edid.c +3 -3
@@ -530,7 +530,7 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) }igt_describe ("DisplayPort tests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { chamelium_require_connector_present( data.ports, DRM_MODE_CONNECTOR_DisplayPort,
@@ -584,7 +584,7 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) }igt_describe ("HDMI tests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { chamelium_require_connector_present( data.ports, DRM_MODE_CONNECTOR_HDMIA,
@@ -632,7 +632,7 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) }igt_describe ("VGA tests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { chamelium_require_connector_present( data.ports, DRM_MODE_CONNECTOR_VGA,
tests/chamelium/kms_chamelium_frames.c +3 -3
@@ -995,7 +995,7 @@ igt_main }igt_describe ("DisplayPort tests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { chamelium_require_connector_present( data.ports, DRM_MODE_CONNECTOR_DisplayPort,
@@ -1023,7 +1023,7 @@ igt_main }igt_describe ("HDMI tests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { chamelium_require_connector_present( data.ports, DRM_MODE_CONNECTOR_HDMIA,
@@ -1136,7 +1136,7 @@ igt_main }igt_describe ("VGA tests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { chamelium_require_connector_present( data.ports, DRM_MODE_CONNECTOR_VGA,
tests/chamelium/kms_chamelium_hpd.c +4 -4
@@ -471,7 +471,7 @@ igt_main }igt_describe ("DisplayPort tests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { chamelium_require_connector_present( data.ports, DRM_MODE_CONNECTOR_DisplayPort,
@@ -523,7 +523,7 @@ igt_main }igt_describe ("HDMI tests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { chamelium_require_connector_present( data.ports, DRM_MODE_CONNECTOR_HDMIA,
@@ -575,7 +575,7 @@ igt_main }igt_describe ("VGA tests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { chamelium_require_connector_present( data.ports, DRM_MODE_CONNECTOR_VGA,
@@ -616,7 +616,7 @@ igt_main }igt_describe ("Tests that operate on all connectors" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (data.port_count); }
tests/core_auth.c +1 -1
@@ -241,7 +241,7 @@ igt_main }/* above tests require that no drm fd is open */ - igt_subtest_group { + igt_subtest_group() {igt_fd_t (master);igt_fixture ()
tests/core_hotunplug.c +8 -8
@@ -715,7 +715,7 @@ igt_mainprepare (&priv); } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Check if the driver can be cleanly unbound from a device believed to be closed, then rebound" ); igt_subtest("unbind-rebind")unbind_rebind (&priv);
@@ -727,7 +727,7 @@ igt_main igt_fixture()post_healthcheck (&priv); - igt_subtest_group { + igt_subtest_group() {igt_describe ("Check if a device believed to be closed can be cleanly unplugged, then restored" ); igt_subtest("unplug-rescan")unplug_rescan (&priv);
@@ -739,7 +739,7 @@ igt_main igt_fixture()post_healthcheck (&priv); - igt_subtest_group { + igt_subtest_group() {igt_describe ("Check if the driver can be cleanly unbound from an open device, then released and rebound" ); igt_subtest("hotunbind-rebind")hotunbind_rebind (&priv);
@@ -751,7 +751,7 @@ igt_main igt_fixture()post_healthcheck (&priv); - igt_subtest_group { + igt_subtest_group() {igt_describe ("Check if an open device can be cleanly unplugged, then released and restored" ); igt_subtest("hotunplug-rescan")hotunplug_rescan (&priv);
@@ -763,7 +763,7 @@ igt_main igt_fixture()post_healthcheck (&priv); - igt_subtest_group { + igt_subtest_group() {igt_describe ("Check if the driver can be cleanly rebound to a device with a still open hot unbound driver instance" ); igt_subtest("hotrebind")hotrebind (&priv);
@@ -775,7 +775,7 @@ igt_main igt_fixture()post_healthcheck (&priv); - igt_subtest_group { + igt_subtest_group() {igt_describe ("Check if a hot unplugged and still open device can be cleanly restored" ); igt_subtest("hotreplug")hotreplug (&priv);
@@ -787,7 +787,7 @@ igt_main igt_fixture()post_healthcheck (&priv); - igt_subtest_group { + igt_subtest_group() {igt_describe ("Check if a hot unbound driver instance still open after hot rebind can be cleanly released" ); igt_subtest("hotrebind-lateclose")hotrebind_lateclose (&priv);
@@ -799,7 +799,7 @@ igt_main igt_fixture()post_healthcheck (&priv); - igt_subtest_group { + igt_subtest_group() {igt_describe ("Check if an instance of a still open while hot replugged device can be cleanly released" ); igt_subtest("hotreplug-lateclose")hotreplug_lateclose (&priv);
tests/core_setmaster.c +1 -1
@@ -150,7 +150,7 @@ igt_main } - igt_subtest_group { + igt_subtest_group() {uint8_t saved_perm;char buf[255 ];
tests/device_reset.c +1 -1
@@ -470,7 +470,7 @@ igt_main } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Unbinds driver from device, initiates cold reset" " then rebinds driver to device" ); igt_subtest("unbind-cold-reset-rebind") {
tests/fbdev.c +2 -2
@@ -470,12 +470,12 @@ igt_main }igt_describe ("Check modesetting" ); - igt_subtest_group { + igt_subtest_group() {mode_tests (fd); }igt_describe ("Check framebuffer access" ); - igt_subtest_group { + igt_subtest_group() {framebuffer_tests (fd); }
tests/intel/gem_busy.c +6 -6
@@ -481,7 +481,7 @@ igt_main ctx =intel_ctx_create_all_physical (fd); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {intel_allocator_multiprocess_start ();igt_fork_hang_detector (fd);
@@ -514,12 +514,12 @@ igt_main } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_fork_hang_detector (fd); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (has_extended_busy_ioctl (fd));gem_require_mmap_device_coherent (fd);
@@ -543,7 +543,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (has_extended_busy_ioctl (fd));igt_require (has_semaphores (fd));
@@ -564,7 +564,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() {igt_hang_t hang; igt_fixture() {
@@ -579,7 +579,7 @@ igt_maingem_quiescent_gpu (fd); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (has_extended_busy_ioctl (fd));gem_require_mmap_device_coherent (fd);
tests/intel/gem_concurrent_all.c +9 -9
@@ -1577,7 +1577,7 @@ run_mode(const char *prefix,igt_fork_hang_detector (fd);for (p = all ? pipelines : pskip; p->prefix; p++) { - igt_subtest_group { + igt_subtest_group() { igt_fixture() p->require(); igt_subtest_f("%s-%s-%s-sanitycheck0%s%s", prefix, mode->name, p->prefix, suffix, h->suffix) {
@@ -1735,7 +1735,7 @@ run_modes(const char *style, };while (mode->name) { - igt_subtest_group { + igt_subtest_group() { igt_fixture() {if (mode->require) mode->require (create, num);
@@ -1920,7 +1920,7 @@ igt_main/* Minimum test set */ snprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"tiny" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { count =num_buffers (0 , s, c,CHECK_RAM ); }
@@ -1930,7 +1930,7 @@ igt_main/* "Average" test set */ snprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"small" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { count =num_buffers (gem_mappable_aperture_size (fd)/4 , s, c,CHECK_RAM );
@@ -1941,7 +1941,7 @@ igt_main/* Use the entire mappable aperture */ snprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"thrash" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { count =num_buffers (gem_mappable_aperture_size (fd), s, c,CHECK_RAM );
@@ -1952,7 +1952,7 @@ igt_main/* Use the entire global GTT */ snprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"global" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { count =num_buffers (gem_global_aperture_size (fd), s, c,CHECK_RAM );
@@ -1963,7 +1963,7 @@ igt_main/* Use the entire per-process GTT */ snprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"full" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { count =num_buffers (gem_aperture_size (fd), s, c,CHECK_RAM );
@@ -1973,7 +1973,7 @@ igt_mainsnprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"shrink" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { count =num_buffers (gem_mappable_aperture_size (fd), s, c,CHECK_RAM );
@@ -1989,7 +1989,7 @@ igt_main/* Use the entire mappable aperture, force swapping */ snprintf (name,sizeof (name),"%s%s-%s" , c->name, s->name,"swap" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {if (igt_get_avail_ram_mb () >gem_mappable_aperture_size (fd)/(1024 *1024 )) { pin_sz =igt_get_avail_ram_mb () -gem_mappable_aperture_size (fd)/(1024 *1024 );
tests/intel/gem_create.c +1 -1
@@ -984,7 +984,7 @@ igt_main }igt_describe ("Create buffer objects while GPU is busy." ); - igt_subtest_group { + igt_subtest_group() { igt_fixture()igt_fork_hang_detector (fd);
tests/intel/gem_ctx_exec.c +1 -1
@@ -540,7 +540,7 @@ igt_mainigt_describe ("Race the execution and interrupt handlers along a context," " while closing it at a random time." ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {intel_allocator_multiprocess_start (); }
tests/intel/gem_ctx_param.c +1 -1
@@ -482,7 +482,7 @@ igt_main }igt_describe ("Test performed with context param set to priority" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (gem_scheduler_has_ctx_priority (fd)); }
tests/intel/gem_ctx_persistence.c +3 -3
@@ -1400,7 +1400,7 @@ igt_main igt_subtest("heartbeat-hostile")test_noheartbeat_close (i915,IGT_SPIN_NO_PREEMPTION ); - igt_subtest_group { + igt_subtest_group() { igt_fixture()gem_require_contexts (i915);
@@ -1420,7 +1420,7 @@ igt_main/* New way of selecting engines. */ - igt_subtest_group { + igt_subtest_group() {const struct intel_execution_engine2 *e;igt_fixture ()
@@ -1456,7 +1456,7 @@ igt_mainmany_contexts (i915, &ctx->cfg); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {gem_require_contexts (i915);intel_allocator_multiprocess_start ();
tests/intel/gem_ctx_shared.c +3 -3
@@ -1035,7 +1035,7 @@ igt_main cfg =intel_ctx_cfg_all_physical (i915); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (gem_has_vm (i915));igt_fork_hang_detector (i915);
@@ -1071,7 +1071,7 @@ igt_main* enough to reduce the queue into just another context, * and so rely on gem_exec_schedule to prove the rest. */ - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (gem_scheduler_enabled (i915));igt_require (gem_scheduler_has_ctx_priority (i915));
@@ -1100,7 +1100,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (gem_scheduler_enabled (i915));igt_require (gem_scheduler_has_ctx_priority (i915));
tests/intel/gem_ctx_sseu.c +1 -1
@@ -528,7 +528,7 @@ igt_mainigt_require (kernel_has_per_context_sseu_support (fd)); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {drm_i915_getparam_t gp;
tests/intel/gem_ctx_switch.c +3 -3
@@ -737,7 +737,7 @@ igt_main e2 = &e2__;for (typeof (*phases) *p = phases; p->name; p++) { - igt_subtest_group { + igt_subtest_group() { igt_fixture() {gem_require_ring (fd, e2->flags);if (p->require)
@@ -766,7 +766,7 @@ igt_main/* Must come after legacy subtests. */ for_each_ctx_cfg_engine (fd, &engines_cfg, e2) {for (typeof (*phases) *p = phases; p->name; p++) { - igt_subtest_group { + igt_subtest_group() { igt_fixture() {if (p->require)igt_require (p->require (fd));
@@ -794,7 +794,7 @@ igt_main igt_subtest("all-heavy")all (fd, heavy, &engines_cfg,0 ,2 ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {gem_require_vm (fd); }
tests/intel/gem_eio.c +3 -3
@@ -1152,7 +1152,7 @@ igt_main igt_subtest("in-flight-suspend")test_inflight_suspend (fd); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (gem_has_contexts (fd)); }
@@ -1164,7 +1164,7 @@ igt_maintest_reset_stress (fd,TEST_WEDGE ); } - igt_subtest_group { + igt_subtest_group() { const struct { unsigned int wait; const char *name;
@@ -1193,7 +1193,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() {igt_display_t display = { .drm_fd =-1 , .n_pipes =IGT_MAX_PIPES };
tests/intel/gem_exec_async.c +1 -1
@@ -209,7 +209,7 @@ igt_main test_each_engine("concurrent-writes", fd, ctx, e)one (fd, ctx, e->flags,0 ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {intel_allocator_multiprocess_start (); }
tests/intel/gem_exec_balancer.c +5 -5
@@ -3440,7 +3440,7 @@ igt_main igt_subtest("busy")busy (i915); - igt_subtest_group { + igt_subtest_group() { static const struct { const char *name; unsigned int flags;
@@ -3483,7 +3483,7 @@ igt_main igt_subtest("bonded-semaphore")bonded_semaphore (i915); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {intel_allocator_multiprocess_start (); }
@@ -3509,7 +3509,7 @@ igt_mainigt_stop_hang_detector (); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (has_logical_mapping (i915));igt_require (has_parallel_execbuf (i915));
@@ -3546,7 +3546,7 @@ igt_mainparallel_balancer (i915,0 ); } - igt_subtest_group { + igt_subtest_group() {igt_hang_t hang;igt_fixture ()
@@ -3565,7 +3565,7 @@ igt_mainhangme (i915); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require_gem (i915);/* reset parameters */ igt_require (has_persistence (i915));
tests/intel/gem_exec_endless.c +1 -1
@@ -353,7 +353,7 @@ igt_mainigt_require_gem (i915); } - igt_subtest_group { + igt_subtest_group() {struct intel_mmio_data mmio;int sysfs;
tests/intel/gem_exec_fence.c +8 -8
@@ -3171,7 +3171,7 @@ igt_maingem_submission_print_method (i915); } - igt_subtest_group { + igt_subtest_group() {igt_hang_t hang; igt_fixture() {
@@ -3207,13 +3207,13 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() {for_each_ctx_engine (i915, ctx, e) { igt_fixture() {igt_require (gem_class_can_store_dword (i915, e->class)); } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_fork_hang_detector (i915);intel_allocator_multiprocess_start ();
@@ -3336,7 +3336,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() {igt_hang_t hang; igt_fixture() {
@@ -3383,7 +3383,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() {long ring_size =0 ; igt_fixture() {
@@ -3404,7 +3404,7 @@ igt_maintest_long_history (i915, ctx, ring_size,EXPIRED ); } - igt_subtest_group { /* syncobj */ + igt_subtest_group() { /* syncobj */ igt_fixture() {igt_require (exec_has_fence_array (i915));igt_assert (has_syncobj (i915));
@@ -3462,7 +3462,7 @@ igt_main } } - igt_subtest_group { /* syncobj timeline */ + igt_subtest_group() { /* syncobj timeline */ igt_fixture() {igt_require (exec_has_timeline_fences (i915));igt_require (has_syncobj_timeline (i915));
@@ -3505,7 +3505,7 @@ igt_main igt_subtest("syncobj-timeline-multiple-ext-nodes")test_syncobj_timeline_multiple_ext_nodes (i915); - igt_subtest_group { /* syncobj timeline engine chaining */ + igt_subtest_group() { /* syncobj timeline engine chaining */ igt_fixture() {/* * We need support for MI_ALU on all
tests/intel/gem_exec_flush.c +1 -1
@@ -2123,7 +2123,7 @@ igt_mainigt_fork_hang_detector (fd); } - for (e = intel_execution_rings; e->name; e++) igt_subtest_group { + for (e = intel_execution_rings; e->name; e++) igt_subtest_group() {unsigned ring =eb_ring (e);unsigned timeout =5 +120 *!!e->exec_id;
tests/intel/gem_exec_latency.c +2 -2
@@ -956,7 +956,7 @@ igt_main rcs_clock =1e9 / rcs_clock; } - igt_subtest_group { + igt_subtest_group() { igt_fixture()igt_require (intel_gen (intel_get_drm_devid (device)) >=7 );
@@ -986,7 +986,7 @@ igt_main test_each_engine("wakeup-latency", device, ctx, e)wakeup_latency (device, ctx, e); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {gem_require_contexts (device);igt_require (gem_scheduler_has_preemption (device));
tests/intel/gem_exec_nop.c +2 -2
@@ -1077,7 +1077,7 @@ igt_main igt_subtest("context-sequential")sequential (device, handle, ctx,FORKED |CONTEXT ,20 ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {gem_require_contexts (device);igt_require (gem_scheduler_has_ctx_priority (device));
@@ -1091,7 +1091,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_device_set_master (device); }
tests/intel/gem_exec_reloc.c +2 -2
@@ -1677,7 +1677,7 @@ igt_mainfor (f = flags; f->name; f++) {igt_hang_t hang; - igt_subtest_group { + igt_subtest_group() { igt_fixture() {if (f->flags &HANG ) hang =igt_allow_hang (fd,0 ,0 );
@@ -1752,7 +1752,7 @@ igt_main igt_subtest("invalid-domains")invalid_domains (fd); - igt_subtest_group { + igt_subtest_group() {igt_display_t display = { .drm_fd = fd, .n_pipes =IGT_MAX_PIPES
tests/intel/gem_exec_schedule.c +9 -9
@@ -3222,7 +3222,7 @@ igt_mainigt_fork_hang_detector (fd); } - igt_subtest_group { + igt_subtest_group() {const struct intel_execution_engine2 *e;test_each_ggtt_binder_nonblocking_engine ("fifo" , fd, ctx, e)
@@ -3244,7 +3244,7 @@ igt_mainindependent (fd, ctx, e->flags,IGT_SPIN_USERPTR ); } - igt_subtest_group { + igt_subtest_group() {const struct intel_execution_engine2 *e; igt_fixture() {
@@ -3266,7 +3266,7 @@ igt_main test_each_engine("u-lateslice", fd, ctx, e)lateslice (fd, &ctx->cfg, e->flags,IGT_SPIN_USERPTR ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (gem_scheduler_has_timeslicing (fd));igt_require (intel_gen (intel_get_drm_devid (fd)) >=8 );
@@ -3345,7 +3345,7 @@ igt_main test_each_ggtt_binder_nonblocking_engine("promotion", fd, ctx, e)promotion (fd, &ctx->cfg, e->flags); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (gem_scheduler_has_preemption (fd)); }
@@ -3371,7 +3371,7 @@ igt_main test_each_engine_store("preempt-engines", fd, ctx, e)preempt_engines (fd, e,0 ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (!gem_scheduler_has_static_priority (fd)); }
@@ -3388,7 +3388,7 @@ igt_mainpreempt_queue (fd, &ctx->cfg, e->flags,CONTEXTS |CHAIN ); } - igt_subtest_group { + igt_subtest_group() {igt_hang_t hang; igt_fixture() {
@@ -3431,7 +3431,7 @@ igt_main test_each_engine_store("smoketest", fd, ctx, e)smoketest (fd, &ctx->cfg, e->flags,5 ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (!gem_scheduler_has_static_priority (fd)); }
@@ -3441,7 +3441,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() {const struct intel_execution_engine2 *e; igt_fixture() {
@@ -3466,7 +3466,7 @@ igt_maintest_pi_iova (fd, &ctx->cfg, e->flags,SHARED ); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (gem_scheduler_enabled (fd));igt_require (gem_scheduler_has_semaphores (fd));
tests/intel/gem_exec_whisper.c +1 -1
@@ -756,7 +756,7 @@ igt_mainigt_stop_hang_detector (); } - igt_subtest_group { + igt_subtest_group() {for (const struct mode *m = modes; m->name; m++) {if (m->flags &INTERRUPTIBLE )continue ;
tests/intel/gem_linear_blits.c +1 -1
@@ -300,7 +300,7 @@ igt_main igt_subtest("basic")run_test (fd,2 , do_relocs); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {intel_allocator_multiprocess_start (); }
tests/intel/gem_mmap_gtt.c +1 -1
@@ -1750,7 +1750,7 @@ igt_main igt_subtest("huge-bo-tiledY")test_huge_bo (fd,1 ,I915_TILING_Y ); - igt_subtest_group { + igt_subtest_group() { const struct copy_size { const char *prefix; int size;
tests/intel/gem_mmap_wc.c +1 -1
@@ -637,7 +637,7 @@ igt_main igt_subtest("write-cpu-read-wc-unflushed")test_write_cpu_read_wc (fd,0 ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() gem_require_mappable_ggtt(fd); igt_subtest("write-wc-read-gtt")test_write_wc_read_gtt (fd);
tests/intel/gem_ppgtt.c +1 -1
@@ -474,7 +474,7 @@ igt_mainflink_and_close ();igt_describe ("Regression test to verify GTT eviction can't randomly fail due to object lock contention" ); - igt_subtest_group { + igt_subtest_group() { igt_subtest("shrink-vs-evict-any")shrink_vs_evict (IGT_USE_ANY );igt_subtest ("shrink-vs-evict-pinned" )
tests/intel/gem_pxp.c +5 -5
@@ -1319,7 +1319,7 @@ igt_main rendercopy =igt_get_render_copyfunc (i915); } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Verify protected buffer on unsupported hw:" ); igt_subtest("hw-rejects-pxp-buffer") {require_nopxp (pxp_supported, devid);
@@ -1332,7 +1332,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Verify protected buffer on supported hw:" ); igt_subtest("create-regular-buffer") {require_pxp (pxp_supported, devid);
@@ -1379,7 +1379,7 @@ igt_maintest_ctx_mod_protected_to_all_invalid (i915); } } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Verify protected render operations:" ); igt_subtest("regular-baseline-src-copy-readible") {require_pxp_render (pxp_supported, devid, rendercopy);
@@ -1398,7 +1398,7 @@ igt_maintest_pxp_dmabuffshare_refcnt (i915); } } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Verify suspend-resume teardown management:" ); igt_subtest("verify-pxp-key-change-after-suspend-resume") {require_pxp_render (pxp_supported, devid, rendercopy);
@@ -1426,7 +1426,7 @@ igt_maintest_pxp_pwrcycle_staleasset_execution (i915, &pm); } } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Test the display CRC" ); igt_subtest("display-protected-crc") {require_pxp_render (pxp_supported, devid, rendercopy);
tests/intel/gem_reset_stats.c +1 -1
@@ -1156,7 +1156,7 @@ igt_mainRUN_TEST (defer_hangcheck (e)); } - igt_subtest_group { + igt_subtest_group() {const struct intel_execution_engine2 *e2;intel_ctx_cfg_t cfg = {};
tests/intel/gem_softpin.c +2 -2
@@ -1484,7 +1484,7 @@ igt_main igt_subtest("invalid")test_invalid (fd); - igt_subtest_group { + igt_subtest_group() {/* Under full-ppgtt, we have complete control of the GTT */ igt_fixture() {
@@ -1553,7 +1553,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (gem_uses_full_ppgtt (fd));intel_allocator_multiprocess_start ();
tests/intel/gem_spin_batch.c +1 -1
@@ -302,7 +302,7 @@ igt_main#undef test_each_engine - igt_subtest_group { + igt_subtest_group() { igt_fixture()intel_allocator_multiprocess_start ();
tests/intel/gem_sync.c +1 -1
@@ -1502,7 +1502,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {gem_require_contexts (fd);igt_require (gem_scheduler_has_ctx_priority (fd));
tests/intel/gem_tiled_blits.c +1 -1
@@ -212,7 +212,7 @@ igt_main igt_subtest("basic")run_test (fd,2 ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {intel_allocator_multiprocess_start (); }
tests/intel/gem_tiled_fence_blits.c +1 -1
@@ -325,7 +325,7 @@ igt_main igt_subtest("basic")run_test (fd,2 , end); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {intel_allocator_multiprocess_start (); }
tests/intel/gem_userptr_blits.c +4 -4
@@ -2532,7 +2532,7 @@ igt_main_args("c:", NULL, help_str, opt_handler, NULL) } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {/* Either mode will do for parameter checking */ gem_userptr_test_synchronized ();
@@ -2577,7 +2577,7 @@ igt_main_args("c:", NULL, help_str, opt_handler, NULL) } } - igt_subtest_group { + igt_subtest_group() {gem_userptr_test_unsynchronized (); igt_fixture() {
@@ -2671,7 +2671,7 @@ igt_main_args("c:", NULL, help_str, opt_handler, NULL)igt_stop_signal_helper (); } - igt_subtest_group { + igt_subtest_group() {gem_userptr_test_synchronized (); igt_fixture() {
@@ -2797,7 +2797,7 @@ igt_main_args("c:", NULL, help_str, opt_handler, NULL)igt_stop_signal_helper (); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {gem_userptr_test_synchronized ();if (!has_userptr (fd))
tests/intel/gem_vm_create.c +1 -1
@@ -396,7 +396,7 @@ igt_main igt_subtest("invalid-destroy")invalid_destroy (i915); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {gem_context_require_param (i915,I915_CONTEXT_PARAM_VM ); }
tests/intel/gem_wait.c +2 -2
@@ -248,7 +248,7 @@ igt_main igt_subtest("invalid-buf")invalid_buf (fd); - igt_subtest_group { + igt_subtest_group() { static const struct { const char *name; unsigned int flags;
@@ -278,7 +278,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { static const struct { const char *name; unsigned int flags;
tests/intel/gem_watchdog.c +1 -1
@@ -592,7 +592,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_subtest("default-physical")physical (i915, ctx);
tests/intel/gem_workarounds.c +1 -1
@@ -349,7 +349,7 @@ igt_main }for (op = ops; op->name; op++) { - igt_subtest_group { + igt_subtest_group() {igt_hang_t hang = {}; igt_fixture() {
tests/intel/gen7_exec_parse.c +1 -1
@@ -579,7 +579,7 @@ igt_maintest_allocations (fd); } - igt_subtest_group { + igt_subtest_group() {#define REG (R ,MSK ,INI ,V ,OK ,MIN_V ) { #R, R, MSK, INI, V, OK, MIN_V }struct test_lri lris[] = {/* dummy head pointer */
tests/intel/i915_drm_fdinfo.c +1 -1
@@ -1092,7 +1092,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() {int newfd;igt_fixture ()
tests/intel/i915_pm_rc6_residency.c +1 -1
@@ -647,7 +647,7 @@ igt_mainrc6_fence (i915, gt); } - igt_subtest_group { + igt_subtest_group() {unsigned int rc6_enabled =0 ;unsigned int devid =0 ;
tests/intel/i915_query.c +1 -1
@@ -1515,7 +1515,7 @@ igt_maintest_query_regions_unallocated (fd); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (query_engine_info_supported (fd)); }
tests/intel/kms_frontbuffer_tracking.c +1 -1
@@ -4148,7 +4148,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)plane_fbc_rte_subtest (&t); } - igt_subtest_group { + igt_subtest_group() { igt_subtest_with_dynamic("pipe-fbc-rte") {enum pipe default_pipe = prim_mode_params.pipe;
tests/intel/kms_joiner.c +4 -4
@@ -627,7 +627,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (data.big_joiner_output_count >0 );igt_require (data.n_pipes >1 );
@@ -657,7 +657,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (data.non_big_joiner_output_count >0 );igt_require (data.n_pipes >1 );
@@ -699,7 +699,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (data.ultra_joiner_output_count >0 );igt_require (data.n_pipes >3 );
@@ -723,7 +723,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (ultra_joiner_supported);igt_require (data.non_ultra_joiner_output_count >0 );
tests/intel/perf.c +3 -3
@@ -6053,7 +6053,7 @@ igt_maingen8_test_single_ctx_render_target_writes_a_counter (); } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Test MI REPORT PERF COUNT for Gen 12" ); igt_subtest_with_dynamic("gen12-mi-rpc") {igt_require (intel_gen (devid) >=12 );
@@ -6079,7 +6079,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Verify invalid class instance" ); igt_subtest("gen12-invalid-class-instance") {igt_require (i915_perf_revision (drm_fd) >=6 );
@@ -6117,7 +6117,7 @@ igt_main __for_random_engine_in_each_group(perf_oa_groups, ctx, e)test_stress_open_close (e); - igt_subtest_group { + igt_subtest_group() {igt_describe ("Verify invalid SSEU opening parameters" ); igt_subtest_with_dynamic("global-sseu-config-invalid") {igt_require (i915_perf_revision (drm_fd) >=4 );
tests/intel/perf_pmu.c +3 -3
@@ -2423,7 +2423,7 @@ igt_main* Check that reported usage is correct when PMU is * enabled after two batches are running. */ - igt_subtest_group { + igt_subtest_group() { igt_fixture() gem_require_contexts(fd);test_each_engine ("busy-double-start" , fd, ctx, e)
@@ -2437,7 +2437,7 @@ igt_main test_each_engine("enable-race", fd, ctx, e)test_enable_race (fd, ctx, e); - igt_subtest_group { + igt_subtest_group() {const unsigned int pct[] = {2 ,50 ,98 };/**
@@ -2537,7 +2537,7 @@ igt_main/** * Check render nodes are counted. */ - igt_subtest_group { + igt_subtest_group() {int render_fd =-1 ;const intel_ctx_t *render_ctx =NULL ;
tests/intel/prime_busy.c +1 -1
@@ -159,7 +159,7 @@ igt_main ctx =intel_ctx_create_all_physical (fd); } - igt_subtest_group { + igt_subtest_group() { const struct mode { const char *name; unsigned int flags;
tests/intel/xe_eudebug.c +2 -2
@@ -2830,7 +2830,7 @@ igt_maintest_basic_sessions_th (fd,0 ,1 , true); - igt_subtest_group { + igt_subtest_group() {uint32_t flags[] = {0 ,TEST_FAULTABLE };const char *suffix[] = {"" ,"-faultable" };
@@ -2926,7 +2926,7 @@ igt_maindrm_close_driver (fd); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() { gpu_count =drm_prepare_filtered_multigpu (DRIVER_XE );
tests/intel/xe_eudebug_online.c +1 -1
@@ -2637,7 +2637,7 @@ igt_main test_gt_render_or_compute("interrupt-other-debuggable", fd, hwe)test_interrupt_other (fd, hwe,SHADER_LOOP ); - igt_subtest_group { + igt_subtest_group() { test_gt_render_or_compute("interrupt-other", fd, hwe) { engine_class = hwe->engine_class;
tests/intel/xe_exec_queue_property.c +1 -1
@@ -239,7 +239,7 @@ igt_mainigt_waitchildren (); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {int sys_fd =igt_sysfs_open (xe);
tests/intel/xe_exec_sip_eudebug.c +2 -2
@@ -324,7 +324,7 @@ igt_main fd =drm_open_driver (DRIVER_XE );/* Debugger disabled (TD_CTL not set) */ - igt_subtest_group { + igt_subtest_group() { igt_fixture() { was_enabled =xe_eudebug_enable (fd, false);igt_require (!xe_eudebug_debugger_available (fd));
@@ -341,7 +341,7 @@ igt_main }/* Debugger enabled (TD_CTL set) */ - igt_subtest_group { + igt_subtest_group() { igt_fixture() { was_enabled =xe_eudebug_enable (fd, true); }
tests/intel/xe_mmap.c +1 -1
@@ -458,7 +458,7 @@ igt_maintest_mmap (fd,vram_memory (fd,0 ) |system_memory (fd),DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM ); - igt_subtest_group { + igt_subtest_group() {int fw_handle =-1 ; igt_subtest("pci-membarrier") {
tests/intel/xe_oa.c +5 -5
@@ -5131,7 +5131,7 @@ igt_main_args("b:t", long_options, help_str, opt_handler, NULL) igt_subtest("short-reads")test_short_reads (); - igt_subtest_group { + igt_subtest_group() { igt_subtest_with_dynamic("mi-rpc")__for_oa_unit_by_type (DRM_XE_OA_UNIT_TYPE_OAG)test_mi_rpc (oau);
@@ -5150,7 +5150,7 @@ igt_main_args("b:t", long_options, help_str, opt_handler, NULL) } } - igt_subtest_group { + igt_subtest_group() { igt_subtest("oa-unit-exclusive-stream-sample-oa")test_oa_unit_exclusive_stream (true);
@@ -5185,7 +5185,7 @@ igt_main_args("b:t", long_options, help_str, opt_handler, NULL) igt_subtest("whitelisted-registers-userspace-config")test_whitelisted_registers_userspace_config (); - igt_subtest_group { + igt_subtest_group() { igt_subtest_with_dynamic("map-oa-buffer")__for_oa_unit_by_type (DRM_XE_OA_UNIT_TYPE_OAG)test_mapped_oa_buffer (check_reports_from_mapped_buffer, oau);
@@ -5219,7 +5219,7 @@ igt_main_args("b:t", long_options, help_str, opt_handler, NULL)test_tail_address_wrap (oau, buf_sizes[k].size); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {perf_init_whitelist (); }
@@ -5241,7 +5241,7 @@ igt_main_args("b:t", long_options, help_str, opt_handler, NULL) } } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (oau->capabilities &DRM_XE_OA_CAPS_SYNCS ); }
tests/intel/xe_pmu.c +4 -4
@@ -1130,7 +1130,7 @@ igt_mainengine_activity_load_all (fd, num_engines,TEST_LOAD ); } - igt_subtest_group { + igt_subtest_group() {const unsigned int percent[] = {2 ,50 ,90 };for (unsigned int i =0 ; i <ARRAY_SIZE (percent); i++) {
@@ -1152,7 +1152,7 @@ igt_main test_each_engine("engine-activity-multi-client", fd, eci)engine_activity_multi_client (fd, eci); - igt_subtest_group { + igt_subtest_group() {int render_fd; igt_fixture() {
@@ -1176,7 +1176,7 @@ igt_maindrm_close_driver (render_fd); } - igt_subtest_group { + igt_subtest_group() {unsigned int num_fns;igt_fixture ()
@@ -1202,7 +1202,7 @@ igt_mainunprovision_and_disable_vfs (fd); } - igt_subtest_group { + igt_subtest_group() {bool has_freq0_node, needs_freq_restore = false;uint32_t *stash_min, *stash_max;
tests/intel/xe_pxp.c +4 -4
@@ -1116,7 +1116,7 @@ igt_mainigt_install_exit_handler (exit_handler); } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Verify PXP allocations work as expected" ); igt_subtest("pxp-bo-alloc")test_pxp_bo_alloc (xe_fd, pxp_supported);
@@ -1125,7 +1125,7 @@ igt_maintest_pxp_queue_creation (xe_fd, pxp_supported); } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Verify protected render operations:" ); igt_subtest("regular-src-to-pxp-dest-rendercopy") {require_pxp_render (xe_fd, pxp_supported);
@@ -1137,7 +1137,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { const struct mode { enum termination_type type; const char *tag;
@@ -1159,7 +1159,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() {igt_display_t display;igt_describe ("Test the flip of PXP objects to display" );
tests/kms_addfb_basic.c +8 -8
@@ -477,7 +477,7 @@ static void tiling_tests(int fd) f.pixel_format =DRM_FORMAT_XRGB8888 ; f.pitches[0 ] =1024 *4 ; - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require_intel (fd); tiled_x_bo = igt_create_bo_with_dimensions(fd, 1024, 1024,
@@ -704,7 +704,7 @@ static void addfb25_tests(int fd)do_ioctl_err (fd,DRM_IOCTL_MODE_ADDFB2 , &f,EINVAL ); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require_intel (fd);if (is_i915_device (fd)) {
@@ -989,22 +989,22 @@ igt_mainigt_require (has_addfb2_iface (fd)); } -igt_subtest_group + igt_subtest_group()invalid_tests (fd); -igt_subtest_group + igt_subtest_group()pitch_tests (fd); -igt_subtest_group + igt_subtest_group()prop_tests (fd); -igt_subtest_group + igt_subtest_group()master_tests (fd); -igt_subtest_group + igt_subtest_group()tiling_tests (fd); - igt_subtest_group { + igt_subtest_group() { igt_fixture()igt_display_require (&display, fd);
tests/kms_async_flips.c +1 -1
@@ -1087,7 +1087,7 @@ igt_main }igt_describe ("Verify the async flip functionality and the fps during async flips" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture()require_monotonic_timestamp (data.drm_fd);
tests/kms_color.c +2 -2
@@ -1184,10 +1184,10 @@ igt_mainigt_display_require (&data.display, data.drm_fd); } -igt_subtest_group + igt_subtest_group()run_tests_for_pipe (&data); -igt_subtest_group + igt_subtest_group()run_invalid_tests_for_pipe (&data); igt_fixture() {
tests/kms_content_protection.c +2 -2
@@ -995,7 +995,7 @@ igt_maintest_content_protection (COMMIT_LEGACY ,HDCP_CONTENT_TYPE_0 ); } - igt_subtest_group { + igt_subtest_group() { igt_fixture()igt_require (data.display.is_atomic);
@@ -1018,7 +1018,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_fixture()igt_require (data.display.is_atomic);
tests/kms_cursor_crc.c +3 -3
@@ -1226,7 +1226,7 @@ static void run_tests_on_pipe(data_t *data)int w = cursor_size;int h = cursor_size; -igt_subtest_group + igt_subtest_group()run_size_tests (data, w, h);/*
@@ -1236,7 +1236,7 @@ static void run_tests_on_pipe(data_t *data)*/ h /=3 ; -igt_subtest_group + igt_subtest_group()run_size_tests (data, w, h); }
@@ -1300,7 +1300,7 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL) data.cursor_max_w = cursor_width; data.cursor_max_h = cursor_height; -igt_subtest_group + igt_subtest_group()run_tests_on_pipe (&data); igt_fixture() {
tests/kms_cursor_legacy.c +9 -9
@@ -1858,7 +1858,7 @@ igt_mainigt_describe ("Test checks how many cursor updates we can fit between vblanks " "on single/all pipes with different modes, priority and number of processes" ); - igt_subtest_group { + igt_subtest_group() {enum pipe n;struct {const char *name;
@@ -1891,7 +1891,7 @@ igt_mainigt_describe ("Test checks how many cursor updates we can fit between vblanks " "on all pipes with different modes, priority and number of processes" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture()igt_display_require_output (&display);
@@ -1904,7 +1904,7 @@ igt_mainigt_describe ("Test changes the cursor hotspot and checks that the " "property is updated accordignly" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture()igt_display_require_output (&display);
@@ -1915,7 +1915,7 @@ igt_mainigt_describe ("This test executes flips on both CRTCs " "while running cursor updates in parallel" ); - igt_subtest_group { + igt_subtest_group() {struct {const char *name;int nloops;
@@ -1944,7 +1944,7 @@ igt_mainigt_describe ("This test executes flips on both CRTCs " "while running cursor updates in parallel" ); - igt_subtest_group { + igt_subtest_group() {struct {const char *name;int nloops;
@@ -1968,7 +1968,7 @@ igt_main }igt_describe ("Test will first does a page flip and then cursor update" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require_pipe_crc (display.drm_fd);igt_display_require_output (&display);
@@ -1982,7 +1982,7 @@ igt_main }igt_describe ("this test perform a busy bo update followed by a cursor update" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require_intel (display.drm_fd);igt_require_pipe_crc (display.drm_fd);
@@ -2001,7 +2001,7 @@ igt_main"* atomic-transition: alternates between a full screen sprite plane " "and full screen primary plane.\n" "* toggle: which toggles cursor visibility and make sure cursor moves between updates."); - igt_subtest_group { + igt_subtest_group() {struct {const char *name;enum basic_flip_cursor order;
@@ -2043,7 +2043,7 @@ igt_mainigt_describe ("The essence of the basic test is that neither the cursor nor the " "nonblocking flip stall the application of the next" ); - igt_subtest_group { + igt_subtest_group() {struct {const char *name;int cursor_pipe;
tests/kms_feature_discovery.c +2 -2
@@ -80,7 +80,7 @@ igt_main { debugfs_fd =igt_debugfs_dir (fd); } - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_display_require (&display, fd); }
@@ -90,7 +90,7 @@ igt_main {/* will skip because of the fixture */ } - igt_subtest_group { + igt_subtest_group() {volatile int output_count =0 ;igt_output_t *output;enum pipe pipe;
tests/kms_getfb.c +4 -4
@@ -436,16 +436,16 @@ igt_mainigt_display_require (&display, fd); } -igt_subtest_group + igt_subtest_group()test_handle_input (&display); -igt_subtest_group + igt_subtest_group()test_duplicate_handles (&display); -igt_subtest_group + igt_subtest_group()test_getfb2 (&display); -igt_subtest_group + igt_subtest_group()test_handle_protection (); igt_fixture() {
tests/kms_lease.c +2 -2
@@ -1252,7 +1252,7 @@ igt_main }//Display dependent subtests - igt_subtest_group { + igt_subtest_group() { const struct { const char *name;
@@ -1312,7 +1312,7 @@ igt_main }//Display independent subtests - igt_subtest_group { + igt_subtest_group() {igt_describe ("Tests error handling while creating invalid corner-cases for " "create-lease ioctl" );
tests/kms_plane_scaling.c +2 -2
@@ -1360,7 +1360,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)igt_require (data.display.is_atomic); } - igt_subtest_group { + igt_subtest_group() {igt_output_t *output;for (int index =0 ; index <ARRAY_SIZE (scaler_with_pixel_format_tests); index++) {
@@ -1607,7 +1607,7 @@ igt_main_args("", long_opts, help_str, opt_handler, &data) } } -igt_subtest_group + igt_subtest_group()invalid_parameter_tests (&data);igt_describe ("Tests scaling with multi-pipe." );
tests/kms_prime.c +2 -2
@@ -567,7 +567,7 @@ igt_main }igt_describe ("Hybrid GPU subtests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { second_fd_hybrid =__drm_open_driver_another (1 ,DRIVER_ANY );igt_require (second_fd_hybrid >=0 );
@@ -630,7 +630,7 @@ igt_main }igt_describe ("VGEM subtests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { second_fd_vgem =__drm_open_driver_another (1 ,DRIVER_VGEM );igt_require (second_fd_vgem >=0 );
tests/kms_properties.c +3 -3
@@ -862,7 +862,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Checks each property of any type with combination of mode object " "with legacy commit and make sure only valid properties are set to " "mode object else return with relevant error" );
@@ -876,7 +876,7 @@ igt_maininvalid_properties (&display, true); } - igt_subtest_group { + igt_subtest_group() {igt_describe ("Test validates the properties of all planes, crtc and connectors with legacy commit" ); igt_subtest("get_properties-sanity-non-atomic") {if (display.is_atomic)
@@ -887,7 +887,7 @@ igt_main } } - igt_subtest_group { + igt_subtest_group() { igt_fixture()igt_require (display.is_atomic);
tests/kms_vrr.c +1 -1
@@ -1184,7 +1184,7 @@ igt_main_args("drs:", long_opts, help_str, opt_handler, &data) igt_subtest_with_dynamic("max-min")run_vrr_test (&data, test_basic,TEST_MAXMIN ); - igt_subtest_group { + igt_subtest_group() { igt_fixture()igt_require_intel (data.drm_fd);
tests/prime_vgem.c +3 -3
@@ -1213,7 +1213,7 @@ igt_main }/* Fence testing */ - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (vgem_has_fences (vgem)); }
@@ -1236,7 +1236,7 @@ igt_main igt_subtest("basic-fence-flip")test_flip (i915, vgem,0 ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (vgem_fence_has_flag (vgem,WIP_VGEM_FENCE_NOTIMEOUT )); }
@@ -1257,7 +1257,7 @@ igt_main }/* Fence testing, requires multiprocess allocator */ - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (vgem_has_fences (vgem));intel_allocator_multiprocess_start ();
tests/vgem_basic.c +2 -2
@@ -559,7 +559,7 @@ igt_main igt_subtest("busy-fence")test_busy_fence (fd); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (has_prime_export (fd)); }
@@ -574,7 +574,7 @@ igt_main igt_subtest("dmabuf-mmap")test_dmabuf_mmap (fd); - igt_subtest_group { + igt_subtest_group() { igt_fixture() {igt_require (vgem_has_fences (fd)); }
tests/vmwgfx/vmw_prime.c +1 -1
@@ -557,7 +557,7 @@ igt_main }igt_describe ("VGEM subtests" ); - igt_subtest_group { + igt_subtest_group() { igt_fixture() { second_fd_vgem =__drm_open_driver_another (1 ,DRIVER_VGEM );
Signature · 1 line
2.49.1
PATCH 3/7 igt: Make igt_main look more like a function
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Turn igt_main into igt_main(). This is a step towads allowing coccinelle to parse it.
Conversion done via:
$ find -type f -name \*.[ch] -exec sed -i 's/\([^_]\?\)igt_main\([^_(]\|$\)/\1igt_main()\2/g' {} +--- benchmarks/gem_userptr_benchmark.c | 2 +- lib/igt_core.c | 6 +++--- lib/igt_core.h | 12 ++++++------ lib/igt_kmod.c | 2 +- lib/tests/bad_subtest_type.c | 2 +- lib/tests/i915_perf_data_alignment.c | 2 +- lib/tests/igt_assert.c | 2 +- lib/tests/igt_audio.c | 2 +- lib/tests/igt_can_fail.c | 2 +- lib/tests/igt_hook.c | 2 +- lib/tests/igt_ktap_parser.c | 2 +- lib/tests/igt_runnercomms_packets.c | 2 +- lib/tests/igt_subtest_group.c | 2 +- lib/tests/igt_types.c | 2 +- runner/runner_json_tests.c | 2 +- runner/runner_kmemleak_test.c | 2 +- runner/runner_tests.c | 2 +- runner/testdata/abort-dynamic.c | 2 +- runner/testdata/abort-fixture.c | 2 +- runner/testdata/abort.c | 2 +- runner/testdata/dynamic.c | 2 +- runner/testdata/skippers.c | 2 +- runner/testdata/successtest.c | 2 +- tests/amdgpu/amd_abm.c | 2 +- tests/amdgpu/amd_assr.c | 2 +- tests/amdgpu/amd_basic.c | 2 +- tests/amdgpu/amd_basic_ex.c | 2 +- tests/amdgpu/amd_basic_multi_gpu.c | 2 +- tests/amdgpu/amd_bo.c | 2 +- tests/amdgpu/amd_bypass.c | 2 +- tests/amdgpu/amd_color.c | 2 +- tests/amdgpu/amd_cp_dma_misc.c | 2 +- tests/amdgpu/amd_cs_nop.c | 2 +- tests/amdgpu/amd_deadlock.c | 2 +- tests/amdgpu/amd_dispatch.c | 2 +- tests/amdgpu/amd_dp_dsc.c | 2 +- tests/amdgpu/amd_freesync_video_mode.c | 2 +- tests/amdgpu/amd_fuzzing.c | 2 +- tests/amdgpu/amd_gang_cs.c | 2 +- tests/amdgpu/amd_hotplug.c | 2 +- tests/amdgpu/amd_ilr.c | 2 +- tests/amdgpu/amd_info.c | 2 +- tests/amdgpu/amd_jpeg_dec.c | 2 +- tests/amdgpu/amd_jpeg_queue.c | 2 +- tests/amdgpu/amd_link_settings.c | 2 +- tests/amdgpu/amd_mall.c | 2 +- tests/amdgpu/amd_max_bpc.c | 2 +- tests/amdgpu/amd_mem_leak.c | 2 +- tests/amdgpu/amd_mode_switch.c | 2 +- tests/amdgpu/amd_module_load.c | 2 +- tests/amdgpu/amd_multidisplay_modeset.c | 2 +- tests/amdgpu/amd_odm.c | 2 +- tests/amdgpu/amd_pci_unplug.c | 2 +- tests/amdgpu/amd_plane.c | 2 +- tests/amdgpu/amd_prime.c | 2 +- tests/amdgpu/amd_pstate.c | 2 +- tests/amdgpu/amd_queue_reset.c | 2 +- tests/amdgpu/amd_ras.c | 2 +- tests/amdgpu/amd_security.c | 2 +- tests/amdgpu/amd_subvp.c | 2 +- tests/amdgpu/amd_syncobj.c | 2 +- tests/amdgpu/amd_uvd_dec.c | 2 +- tests/amdgpu/amd_uvd_enc.c | 2 +- tests/amdgpu/amd_vce_enc.c | 2 +- tests/amdgpu/amd_vcn.c | 2 +- tests/amdgpu/amd_vcn_queue.c | 2 +- tests/amdgpu/amd_vm.c | 2 +- tests/amdgpu/amd_vpe.c | 2 +- tests/amdgpu/amd_vrr_range.c | 2 +- tests/chamelium/kms_chamelium_audio.c | 2 +- tests/chamelium/kms_chamelium_color.c | 2 +- tests/chamelium/kms_chamelium_frames.c | 2 +- tests/chamelium/kms_chamelium_hpd.c | 2 +- tests/chamelium/kms_chamelium_sharpness_filter.c | 2 +- tests/core_auth.c | 2 +- tests/core_debugfs.c | 2 +- tests/core_getclient.c | 2 +- tests/core_getstats.c | 2 +- tests/core_getversion.c | 2 +- tests/core_hotunplug.c | 2 +- tests/core_setmaster.c | 2 +- tests/core_sysfs.c | 2 +- tests/device_reset.c | 2 +- tests/dmabuf.c | 2 +- tests/dmabuf_sync_file.c | 2 +- tests/drm_buddy.c | 2 +- tests/drm_mm.c | 2 +- tests/drm_read.c | 2 +- tests/drm_virtgpu.c | 2 +- tests/dumb_buffer.c | 2 +- tests/fbdev.c | 2 +- tests/intel/api_intel_allocator.c | 2 +- tests/intel/gem_bad_reloc.c | 2 +- tests/intel/gem_barrier_race.c | 2 +- tests/intel/gem_basic.c | 2 +- tests/intel/gem_blits.c | 2 +- tests/intel/gem_busy.c | 2 +- tests/intel/gem_caching.c | 2 +- tests/intel/gem_close.c | 2 +- tests/intel/gem_close_race.c | 2 +- tests/intel/gem_compute.c | 2 +- tests/intel/gem_concurrent_all.c | 2 +- tests/intel/gem_create.c | 2 +- tests/intel/gem_cs_tlb.c | 2 +- tests/intel/gem_ctx_bad_destroy.c | 2 +- tests/intel/gem_ctx_create.c | 2 +- tests/intel/gem_ctx_engines.c | 2 +- tests/intel/gem_ctx_exec.c | 2 +- tests/intel/gem_ctx_freq.c | 2 +- tests/intel/gem_ctx_isolation.c | 2 +- tests/intel/gem_ctx_param.c | 2 +- tests/intel/gem_ctx_persistence.c | 2 +- tests/intel/gem_ctx_shared.c | 2 +- tests/intel/gem_ctx_sseu.c | 2 +- tests/intel/gem_ctx_switch.c | 2 +- tests/intel/gem_eio.c | 2 +- tests/intel/gem_evict_alignment.c | 2 +- tests/intel/gem_evict_everything.c | 2 +- tests/intel/gem_exec_alignment.c | 2 +- tests/intel/gem_exec_async.c | 2 +- tests/intel/gem_exec_await.c | 2 +- tests/intel/gem_exec_balancer.c | 2 +- tests/intel/gem_exec_basic.c | 2 +- tests/intel/gem_exec_big.c | 2 +- tests/intel/gem_exec_capture.c | 2 +- tests/intel/gem_exec_create.c | 2 +- tests/intel/gem_exec_endless.c | 2 +- tests/intel/gem_exec_fair.c | 2 +- tests/intel/gem_exec_fence.c | 2 +- tests/intel/gem_exec_flush.c | 2 +- tests/intel/gem_exec_gttfill.c | 2 +- tests/intel/gem_exec_latency.c | 2 +- tests/intel/gem_exec_nop.c | 2 +- tests/intel/gem_exec_parallel.c | 2 +- tests/intel/gem_exec_params.c | 2 +- tests/intel/gem_exec_reloc.c | 2 +- tests/intel/gem_exec_schedule.c | 2 +- tests/intel/gem_exec_store.c | 2 +- tests/intel/gem_exec_suspend.c | 2 +- tests/intel/gem_exec_whisper.c | 2 +- tests/intel/gem_fence_thrash.c | 2 +- tests/intel/gem_fence_upload.c | 2 +- tests/intel/gem_fenced_exec_thrash.c | 2 +- tests/intel/gem_flink_basic.c | 2 +- tests/intel/gem_flink_race.c | 2 +- tests/intel/gem_huc_copy.c | 2 +- tests/intel/gem_linear_blits.c | 2 +- tests/intel/gem_lmem_evict.c | 2 +- tests/intel/gem_madvise.c | 2 +- tests/intel/gem_media_fill.c | 2 +- tests/intel/gem_mmap.c | 2 +- tests/intel/gem_mmap_gtt.c | 2 +- tests/intel/gem_mmap_offset.c | 2 +- tests/intel/gem_mmap_wc.c | 2 +- tests/intel/gem_partial_pwrite_pread.c | 2 +- tests/intel/gem_pipe_control_store_loop.c | 2 +- tests/intel/gem_ppgtt.c | 2 +- tests/intel/gem_pread_after_blit.c | 2 +- tests/intel/gem_pxp.c | 2 +- tests/intel/gem_read_read_speed.c | 2 +- tests/intel/gem_readwrite.c | 2 +- tests/intel/gem_reg_read.c | 2 +- tests/intel/gem_render_copy_redux.c | 2 +- tests/intel/gem_render_linear_blits.c | 2 +- tests/intel/gem_render_tiled_blits.c | 2 +- tests/intel/gem_request_retire.c | 2 +- tests/intel/gem_reset_stats.c | 2 +- tests/intel/gem_ringfill.c | 2 +- tests/intel/gem_set_tiling_vs_blt.c | 2 +- tests/intel/gem_shrink.c | 2 +- tests/intel/gem_softpin.c | 2 +- tests/intel/gem_spin_batch.c | 2 +- tests/intel/gem_streaming_writes.c | 2 +- tests/intel/gem_sync.c | 2 +- tests/intel/gem_tiled_blits.c | 2 +- tests/intel/gem_tiled_fence_blits.c | 2 +- tests/intel/gem_tiled_partial_pwrite_pread.c | 2 +- tests/intel/gem_tiled_swapping.c | 2 +- tests/intel/gem_vm_create.c | 2 +- tests/intel/gem_wait.c | 2 +- tests/intel/gem_watchdog.c | 2 +- tests/intel/gem_workarounds.c | 2 +- tests/intel/gen7_exec_parse.c | 2 +- tests/intel/gen9_exec_parse.c | 2 +- tests/intel/i915_drm_fdinfo.c | 2 +- tests/intel/i915_fb_tiling.c | 2 +- tests/intel/i915_getparams_basic.c | 2 +- tests/intel/i915_hangman.c | 2 +- tests/intel/i915_module_load.c | 2 +- tests/intel/i915_pm_freq_api.c | 2 +- tests/intel/i915_pm_freq_mult.c | 2 +- tests/intel/i915_pm_rc6_residency.c | 2 +- tests/intel/i915_pm_rps.c | 2 +- tests/intel/i915_pm_sseu.c | 2 +- tests/intel/i915_power.c | 2 +- tests/intel/i915_query.c | 2 +- tests/intel/i915_selftest.c | 2 +- tests/intel/i915_suspend.c | 2 +- tests/intel/intel_hwmon.c | 2 +- tests/intel/kms_big_fb.c | 2 +- tests/intel/kms_cdclk.c | 2 +- tests/intel/kms_dirtyfb.c | 2 +- tests/intel/kms_dp_link_training.c | 2 +- tests/intel/kms_dp_linktrain_fallback.c | 2 +- tests/intel/kms_draw_crc.c | 2 +- tests/intel/kms_fb_coherency.c | 2 +- tests/intel/kms_fbc_dirty_rect.c | 2 +- tests/intel/kms_fbcon_fbt.c | 2 +- tests/intel/kms_flip_scaled_crc.c | 2 +- tests/intel/kms_flip_tiling.c | 2 +- tests/intel/kms_joiner.c | 2 +- tests/intel/kms_legacy_colorkey.c | 2 +- tests/intel/kms_pipe_b_c_ivb.c | 2 +- tests/intel/kms_pipe_stress.c | 2 +- tests/intel/kms_pm_backlight.c | 2 +- tests/intel/kms_pm_dc.c | 2 +- tests/intel/kms_pm_lpsp.c | 2 +- tests/intel/kms_psr.c | 2 +- tests/intel/kms_psr2_sf.c | 2 +- tests/intel/kms_psr2_su.c | 2 +- tests/intel/kms_psr_stress_test.c | 2 +- tests/intel/perf.c | 2 +- tests/intel/perf_pmu.c | 2 +- tests/intel/prime_busy.c | 2 +- tests/intel/prime_mmap.c | 2 +- tests/intel/prime_mmap_coherency.c | 2 +- tests/intel/prime_mmap_kms.c | 2 +- tests/intel/prime_self_import.c | 2 +- tests/intel/sysfs_defaults.c | 2 +- tests/intel/sysfs_heartbeat_interval.c | 2 +- tests/intel/sysfs_preempt_timeout.c | 2 +- tests/intel/sysfs_timeslice_duration.c | 2 +- tests/intel/xe_compute.c | 2 +- tests/intel/xe_compute_preempt.c | 2 +- tests/intel/xe_configfs.c | 2 +- tests/intel/xe_dma_buf_sync.c | 2 +- tests/intel/xe_drm_fdinfo.c | 2 +- tests/intel/xe_eudebug.c | 2 +- tests/intel/xe_eudebug_online.c | 2 +- tests/intel/xe_eudebug_sriov.c | 2 +- tests/intel/xe_evict.c | 2 +- tests/intel/xe_exec_atomic.c | 2 +- tests/intel/xe_exec_balancer.c | 2 +- tests/intel/xe_exec_basic.c | 2 +- tests/intel/xe_exec_capture.c | 2 +- tests/intel/xe_exec_compute_mode.c | 2 +- tests/intel/xe_exec_fault_mode.c | 2 +- tests/intel/xe_exec_mix_modes.c | 2 +- tests/intel/xe_exec_queue_property.c | 2 +- tests/intel/xe_exec_reset.c | 2 +- tests/intel/xe_exec_sip.c | 2 +- tests/intel/xe_exec_sip_eudebug.c | 2 +- tests/intel/xe_exec_store.c | 2 +- tests/intel/xe_exec_system_allocator.c | 2 +- tests/intel/xe_exec_threads.c | 2 +- tests/intel/xe_gt_freq.c | 2 +- tests/intel/xe_huc_copy.c | 2 +- tests/intel/xe_live_ktest.c | 2 +- tests/intel/xe_media_fill.c | 2 +- tests/intel/xe_mmap.c | 2 +- tests/intel/xe_module_load.c | 2 +- tests/intel/xe_noexec_ping_pong.c | 2 +- tests/intel/xe_pm.c | 2 +- tests/intel/xe_pm_residency.c | 2 +- tests/intel/xe_pmu.c | 2 +- tests/intel/xe_prime_self_import.c | 2 +- tests/intel/xe_pxp.c | 2 +- tests/intel/xe_query.c | 2 +- tests/intel/xe_spin_batch.c | 2 +- tests/intel/xe_sriov_flr.c | 2 +- tests/intel/xe_survivability.c | 2 +- tests/intel/xe_sysfs_defaults.c | 2 +- tests/intel/xe_sysfs_preempt_timeout.c | 2 +- tests/intel/xe_sysfs_scheduler.c | 2 +- tests/intel/xe_sysfs_timeslice_duration.c | 2 +- tests/intel/xe_tlb.c | 2 +- tests/intel/xe_vm.c | 2 +- tests/intel/xe_waitfence.c | 2 +- tests/intel/xe_wedged.c | 2 +- tests/kms_3d.c | 2 +- tests/kms_addfb_basic.c | 2 +- tests/kms_async_flips.c | 2 +- tests/kms_atomic_interruptible.c | 2 +- tests/kms_bw.c | 2 +- tests/kms_color.c | 2 +- tests/kms_content_protection.c | 2 +- tests/kms_cursor_legacy.c | 2 +- tests/kms_debugfs.c | 2 +- tests/kms_display_modes.c | 2 +- tests/kms_dither.c | 2 +- tests/kms_feature_discovery.c | 2 +- tests/kms_flip_event_leak.c | 2 +- tests/kms_getfb.c | 2 +- tests/kms_hdmi_inject.c | 2 +- tests/kms_hdr.c | 2 +- tests/kms_invalid_mode.c | 2 +- tests/kms_lease.c | 2 +- tests/kms_multipipe_modeset.c | 2 +- tests/kms_panel_fitting.c | 2 +- tests/kms_plane_cursor.c | 2 +- tests/kms_plane_lowres.c | 2 +- tests/kms_prime.c | 2 +- tests/kms_prop_blob.c | 2 +- tests/kms_properties.c | 2 +- tests/kms_rmfb.c | 2 +- tests/kms_scaling_modes.c | 2 +- tests/kms_selftest.c | 2 +- tests/kms_sequence.c | 2 +- tests/kms_tiled_display.c | 2 +- tests/kms_tv_load_detect.c | 2 +- tests/kms_universal_plane.c | 2 +- tests/meta_test.c | 2 +- tests/msm/msm_mapping.c | 2 +- tests/msm/msm_recovery.c | 2 +- tests/msm/msm_shrink.c | 2 +- tests/msm/msm_submit.c | 2 +- tests/msm/msm_submitoverhead.c | 2 +- tests/nouveau_crc.c | 2 +- tests/panfrost/panfrost_gem_new.c | 2 +- tests/panfrost/panfrost_get_param.c | 2 +- tests/panfrost/panfrost_prime.c | 2 +- tests/panfrost/panfrost_submit.c | 2 +- tests/panthor/panthor_gem.c | 2 +- tests/panthor/panthor_group.c | 2 +- tests/panthor/panthor_query.c | 2 +- tests/panthor/panthor_vm.c | 2 +- tests/prime_nv_api.c | 2 +- tests/prime_nv_pcopy.c | 2 +- tests/prime_nv_test.c | 2 +- tests/prime_vgem.c | 2 +- tests/sriov_basic.c | 2 +- tests/sw_sync.c | 2 +- tests/syncobj_basic.c | 2 +- tests/syncobj_eventfd.c | 2 +- tests/syncobj_timeline.c | 2 +- tests/syncobj_wait.c | 2 +- tests/template.c | 2 +- tests/tools_test.c | 2 +- tests/v3d/v3d_create_bo.c | 2 +- tests/v3d/v3d_get_bo_offset.c | 2 +- tests/v3d/v3d_get_param.c | 2 +- tests/v3d/v3d_job_submission.c | 2 +- tests/v3d/v3d_mmap.c | 2 +- tests/v3d/v3d_perfmon.c | 2 +- tests/v3d/v3d_submit_cl.c | 2 +- tests/v3d/v3d_submit_csd.c | 2 +- tests/v3d/v3d_wait_bo.c | 2 +- tests/vc4/vc4_create_bo.c | 2 +- tests/vc4/vc4_dmabuf_poll.c | 2 +- tests/vc4/vc4_label_bo.c | 2 +- tests/vc4/vc4_lookup_fail.c | 2 +- tests/vc4/vc4_mmap.c | 2 +- tests/vc4/vc4_perfmon.c | 2 +- tests/vc4/vc4_purgeable_bo.c | 2 +- tests/vc4/vc4_tiling.c | 2 +- tests/vc4/vc4_wait_bo.c | 2 +- tests/vc4/vc4_wait_seqno.c | 2 +- tests/vgem_basic.c | 2 +- tests/vgem_slow.c | 2 +- tests/vkms/vkms_configfs.c | 2 +- tests/vmwgfx/vmw_mob_stress.c | 2 +- tests/vmwgfx/vmw_prime.c | 2 +- tests/vmwgfx/vmw_ref_count.c | 2 +- tests/vmwgfx/vmw_surface_copy.c | 2 +- tests/vmwgfx/vmw_tri.c | 2 +- 365 files changed, 372 insertions(+), 372 deletions(-)
benchmarks/gem_userptr_benchmark.c +1 -1
@@ -450,7 +450,7 @@ static void test_userptr(int fd)test_multiple (fd,100 ,1 ); } -igt_main +igt_main() {int fd =-1 , ret;
lib/igt_core.c +3 -3
@@ -1499,7 +1499,7 @@ static bool valid_name_for_subtest(const char *subtest_name)bool __igt_run_subtest (const char *subtest_name,const char *file,const int line) {internal_assert (!igt_can_fail (), -"igt_subtest can be nested only in igt_main" +"igt_subtest can be nested only in igt_main()" " or igt_subtest_group()\n" );if (!valid_name_for_subtest (subtest_name)) {
@@ -2362,7 +2362,7 @@ void __igt_abort(const char *domain, const char *file, const int line,* * It is an error to normally exit a test calling igt_exit() - without it the * result reporting will be wrong. To avoid such issues it is highly recommended -* to use #igt_main or #igt_simple_main instead of a hand-rolled main() function. +* to use #igt_main() or #igt_simple_main instead of a hand-rolled main() function. */ void igt_exit (void ) {
@@ -3122,7 +3122,7 @@ bool igt_run_in_simulation(void)* it is allowed to use this outside of an #igt_fixture() block in a test with * subtests. This is because in contrast to most other test requirements, * checking for simulation mode doesn't depend upon the present hardware and it -* so makes a lot of sense to have this check in the outermost #igt_main block. +* so makes a lot of sense to have this check in the outermost #igt_main() block. */ void igt_skip_on_simulation (void ) {
lib/igt_core.h +6 -6
@@ -193,7 +193,7 @@ int igt_subtest_init_parse_opts(int *argc, char **argv,* igt_subtest_init_parse_opts(). * * If there's not a reason to the contrary it's less error prone to just use an -* #igt_main block instead of stitching the test's main() function together +* #igt_main() block instead of stitching the test's main() function together * manually. */ #define igt_subtest_init (argc, argv) \
@@ -318,7 +318,7 @@ bool __igt_run_dynamic_subtest(const char *dynamic_subtest_name);* allowed. Example: * * |[<!-- language="C" --> -* igt_main +* igt_main() * { * igt_subtest_with_dynamic("engine-tests") { * igt_require(is_awesome(fd)); // requires ok here
@@ -438,12 +438,12 @@ void __igt_subtest_group_restore(int, int);/** -* igt_main: +* igt_main(): * * This is a magic control flow block used instead of a main() function for * tests with subtests. Open-coding the main() function is not recommended. */ -#define igt_main igt_main_args(NULL, NULL, NULL, NULL, NULL) +#define igt_main () igt_main_args(NULL, NULL, NULL, NULL, NULL)const char *igt_test_name (void ); void igt_simple_init_parse_opts(int *argc, char **argv,
@@ -595,7 +595,7 @@ void igt_describe_f(const char *fmt, ...);* #include "igt.h" * * IGT_TEST_DESCRIPTION("Global description of the whole binary"); -* igt_main +* igt_main() * { * igt_describe("Desc of the subgroup with A and B"); * igt_subtest_group() {
@@ -646,7 +646,7 @@ void igt_describe_f(const char *fmt, ...);* |[<!-- language="C" --> * #include "igt.h" * -* igt_main +* igt_main() * { * igt_describe("check xyz with different tilings"); * igt_subtest_group() {
lib/igt_kmod.c +1 -1
@@ -1212,7 +1212,7 @@ void igt_kunit(const char *module_name, const char *suite, const char *opts)/* * We need to use igt_subtest here, as otherwise it may crash with: * "skipping is allowed only in fixtures, subtests or igt_simple_main" -* if used on igt_main. This is also needed in order to provide +* if used on igt_main(). This is also needed in order to provide * proper namespace for dynamic subtests, with is required for CI * and for documentation. */
lib/tests/bad_subtest_type.c +1 -1
@@ -8,7 +8,7 @@IGT_TEST_DESCRIPTION ("Test bad-scoped file descriptor variable" ); -igt_main +igt_main() {igt_describe ("Check if using a scoped variable inside a subtest will abort it" ); igt_subtest("bad-scoped-variable") {
lib/tests/i915_perf_data_alignment.c +1 -1
@@ -30,7 +30,7 @@#define is_aligned (s) ((sizeof(s) % 8) == 0) -igt_main +igt_main() { igt_subtest("alignment") {internal_assert (is_aligned(struct intel_perf_record_version ));
lib/tests/igt_assert.c +1 -1
@@ -125,7 +125,7 @@ static void test_fd(void)igt_assert_fd (INT_MAX ); } -igt_main +igt_main() {int ret;
lib/tests/igt_audio.c +1 -1
@@ -174,7 +174,7 @@ static void test_signal_detect_phaseshift(struct audio_signal *signal)igt_assert (!ok); } -igt_main +igt_main() {struct audio_signal *signal =NULL ;int ret;
lib/tests/igt_can_fail.c +1 -1
@@ -26,7 +26,7 @@#include "igt_tests_common.h" -igt_main +igt_main() {internal_assert (igt_can_fail () == false);
lib/tests/igt_hook.c +1 -1
@@ -149,7 +149,7 @@ static void test_all_env_vars(void)free (line); } -igt_main +igt_main() {test_invalid_hook_descriptors ();
lib/tests/igt_ktap_parser.c +1 -1
@@ -230,7 +230,7 @@ static void ktap_top_version(void)igt_ktap_free (&ktap); } -igt_main +igt_main() { igt_subtest("list")ktap_list ();
lib/tests/igt_runnercomms_packets.c +1 -1
@@ -214,7 +214,7 @@ struct { { NULL, NULL } }; -igt_main +igt_main() { igt_subtest("create-and-parse-normal") {for (typeof (*basic_creation) *t = basic_creation; t->create; t++) {
lib/tests/igt_subtest_group.c +1 -1
@@ -26,7 +26,7 @@#include "igt_tests_common.h" -igt_main +igt_main() {/* * local variables have to be volatile here otherwise they end up being
lib/tests/igt_types.c +1 -1
@@ -59,7 +59,7 @@ static void skip_delegate(void) } } -igt_main +igt_main() {/* Basic check that scopes will call their destructor */ cleanup_called =0 ;
runner/runner_json_tests.c +1 -1
@@ -172,7 +172,7 @@ static const char *dirnames[] = {"graceful-notrun" , }; -igt_main +igt_main() {int dirfd =open (testdatadir,O_RDONLY |O_DIRECTORY );size_t i;
runner/runner_kmemleak_test.c +1 -1
@@ -213,7 +213,7 @@ const char *kmemleak_file_example =static const char *runner_kmemleak_unit_testing_resdir ="/tmp" ; -igt_main +igt_main() {char unit_testing_kmemleak_filepath[256 ] ="/tmp/runner_kmemleak_test_XXXXXX" ;int written_bytes;
runner/runner_tests.c +1 -1
@@ -261,7 +261,7 @@ static void write_packet_with_canary(int fd, struct runnerpacket *packet)free (packet); } -igt_main +igt_main() {struct settings *settings =malloc (sizeof (*settings));
runner/testdata/abort-dynamic.c +1 -1
@@ -23,7 +23,7 @@#include "igt.h" -igt_main +igt_main() { igt_subtest_with_dynamic("a-subtest") {igt_dynamic ("dynamic-1" )
runner/testdata/abort-fixture.c +1 -1
@@ -23,7 +23,7 @@#include "igt.h" -igt_main +igt_main() { igt_fixture() {igt_abort_on_f (true,"I'm out!\n" );
runner/testdata/abort.c +1 -1
@@ -23,7 +23,7 @@#include "igt.h" -igt_main +igt_main() {igt_subtest ("a-subtest" ) ;
runner/testdata/dynamic.c +1 -1
@@ -1,6 +1,6 @@#include "igt.h" -igt_main +igt_main() { igt_subtest_with_dynamic("dynamic-subtest") {igt_dynamic ("failing" )
runner/testdata/skippers.c +1 -1
@@ -1,6 +1,6 @@#include "igt.h" -igt_main +igt_main() { igt_fixture() {igt_require_f (false,"Skipping from fixture\n" );
runner/testdata/successtest.c +1 -1
@@ -1,6 +1,6 @@#include "igt.h" -igt_main +igt_main() { igt_subtest("first-subtest")igt_debug ("Running first subtest\n" );
tests/amdgpu/amd_abm.c +1 -1
@@ -498,7 +498,7 @@ static void abm_gradual(data_t *data) } } -igt_main +igt_main() {data_t data = {0 };igt_skip_on_simulation ();
tests/amdgpu/amd_assr.c +1 -1
@@ -267,7 +267,7 @@ static void test_assr_links(data_t *data, uint32_t test_flags) } -igt_main +igt_main() {data_t data;
tests/amdgpu/amd_basic.c +1 -1
@@ -662,7 +662,7 @@ amdgpu_sync_dependency_test(amdgpu_device_handle device_handle, bool user_queue)free (ring_context); } -igt_main +igt_main() {amdgpu_device_handle device;struct amdgpu_gpu_info gpu_info = {0 };
tests/amdgpu/amd_basic_ex.c +1 -1
@@ -21,7 +21,7 @@ amdgpu_ce_write_after_fence(amdgpu_device_handle device_handle)amdgpu_cs_ctx_free (context_handle); } -igt_main +igt_main() {amdgpu_device_handle device;struct amdgpu_gpu_info gpu_info = {0 };
tests/amdgpu/amd_basic_multi_gpu.c +1 -1
@@ -157,7 +157,7 @@ static void amdgpu_command_submission_multi_fence(amdgpu_device_handle device)amdgpu_command_submission_multi_fence_wait_all (device, false); } -igt_main +igt_main() {amdgpu_device_handle device;int fd =-1 ;
tests/amdgpu/amd_bo.c +1 -1
@@ -248,7 +248,7 @@ amdgpu_bo_find_by_cpu_mapping(amdgpu_device_handle device_handle) bo_mc_address, 4096); } -igt_main +igt_main() {amdgpu_device_handle device;struct bo_data bo;
tests/amdgpu/amd_bypass.c +1 -1
@@ -397,7 +397,7 @@ static void bypass_8bpc_test(data_t *data) } } -igt_main +igt_main() {data_t data;memset (&data,0 ,sizeof (data));
tests/amdgpu/amd_color.c +1 -1
@@ -392,7 +392,7 @@ static void test_crtc_lut_accuracy(data_t *data)lut_free (&lut_degamma); } -igt_main +igt_main() {data_t data;
tests/amdgpu/amd_cp_dma_misc.c +1 -1
@@ -8,7 +8,7 @@#include "lib/amdgpu/amd_cp_dma.h" #include "lib/amdgpu/amd_ip_blocks.h" -igt_main +igt_main() {amdgpu_device_handle device;amdgpu_device_handle device2;
tests/amdgpu/amd_cs_nop.c +1 -1
@@ -146,7 +146,7 @@ static void nop_cs(amdgpu_device_handle device,free (ring_context); } -igt_main +igt_main() {amdgpu_device_handle device;amdgpu_context_handle context;
tests/amdgpu/amd_deadlock.c +1 -1
@@ -33,7 +33,7 @@ is_deadlock_tests_enable(const struct amdgpu_gpu_info *gpu_info)return enable; } -igt_main +igt_main() {amdgpu_device_handle device;struct amdgpu_gpu_info gpu_info = {0 };
tests/amdgpu/amd_dispatch.c +1 -1
@@ -76,7 +76,7 @@ amdgpu_gpu_reset_test(amdgpu_device_handle device_handle, int drm_amdgpu,amdgpu_gfx_dispatch_test (device_handle,AMDGPU_HW_IP_COMPUTE ,0 , pci, false); } -igt_main +igt_main() {amdgpu_device_handle device;struct amdgpu_gpu_info gpu_info = {0 };
tests/amdgpu/amd_dp_dsc.c +1 -1
@@ -537,7 +537,7 @@ static void test_dsc_bpc(data_t *data)test_fini (data); } -igt_main { +igt_main() {data_t data = {0 };igt_skip_on_simulation ();
tests/amdgpu/amd_freesync_video_mode.c +1 -1
@@ -860,7 +860,7 @@ run_test(data_t *data, uint32_t scene)igt_skip ("No vrr capable outputs found.\n" ); } -igt_main { +igt_main() {data_t data = {};memset (&data,0 ,sizeof (data));
tests/amdgpu/amd_fuzzing.c +1 -1
@@ -155,7 +155,7 @@ amd_gem_create_fuzzing(int fd) } -igt_main +igt_main() {int fd =-1 ;const enum amd_ip_block_type arr_types[] = {
tests/amdgpu/amd_gang_cs.c +1 -1
@@ -238,7 +238,7 @@ amdgpu_cs_gang(amdgpu_device_handle device, uint32_t ring, bool is_vmid)free (ring_context); } -igt_main +igt_main() {amdgpu_device_handle device;struct amdgpu_gpu_info gpu_info = {0 };
tests/amdgpu/amd_hotplug.c +1 -1
@@ -200,7 +200,7 @@ static void test_hotplug_basic(data_t *data, bool suspend)test_fini (data); } -igt_main +igt_main() {data_t data;
tests/amdgpu/amd_ilr.c +1 -1
@@ -315,7 +315,7 @@ static void test_flow(data_t *data, enum sub_test option) } } -igt_main +igt_main() {data_t data;memset (&data,0 ,sizeof (data));
tests/amdgpu/amd_info.c +1 -1
@@ -117,7 +117,7 @@ time_stamp_test_enable(struct amdgpu_gpu_info *gpu_info)return true; } -igt_main +igt_main() {amdgpu_device_handle device;struct amdgpu_gpu_info gpu_info = {};
tests/amdgpu/amd_jpeg_dec.c +1 -1
@@ -217,7 +217,7 @@ amdgpu_cs_jpeg_decode(amdgpu_device_handle device_handle,mmd_context_clean (device_handle, context); } -igt_main +igt_main() {amdgpu_device_handle device;struct mmd_shared_context shared_context = {};
tests/amdgpu/amd_jpeg_queue.c +1 -1
@@ -76,7 +76,7 @@ err_handle:return ret; } -igt_main +igt_main() {amdgpu_device_handle device;struct mmd_shared_context shared_context = {};
tests/amdgpu/amd_link_settings.c +1 -1
@@ -246,7 +246,7 @@ static void test_link_training_configs(data_t *data)test_fini (data); } -igt_main +igt_main() {data_t data;memset (&data,0 ,sizeof (data));
tests/amdgpu/amd_mall.c +1 -1
@@ -128,7 +128,7 @@ static void test_mall_ss(data_t *data)test_fini (data); } -igt_main +igt_main() {data_t data;
tests/amdgpu/amd_max_bpc.c +1 -1
@@ -118,7 +118,7 @@ static void test_4k_mode_max_bpc(data_t *data)test_fini (data); } -igt_main +igt_main() {data_t data;
tests/amdgpu/amd_mem_leak.c +1 -1
@@ -127,7 +127,7 @@ static void test_hotplug(data_t *data)test_fini (data); } -igt_main +igt_main() {data_t data;
tests/amdgpu/amd_mode_switch.c +1 -1
@@ -176,7 +176,7 @@ static void run_mode_switch_first_last(data_t *data, int num_pipes) }IGT_TEST_DESCRIPTION ("Test switching between supported modes" ); -igt_main +igt_main() {data_t data;int i =0 ;
tests/amdgpu/amd_module_load.c +1 -1
@@ -59,7 +59,7 @@ static void sanity_check(void)igt_assert_eq (err,0 ); } -igt_main +igt_main() {igt_describe ("Make sure reloading amdgpu drivers works" ); igt_subtest("reload") {
tests/amdgpu/amd_multidisplay_modeset.c +1 -1
@@ -406,7 +406,7 @@ static void multiple_display_test(struct data_t *data, enum sub_test test_mode) }IGT_TEST_DESCRIPTION ("Test multi-display mode set, display enable and disable" ); -igt_main +igt_main() {struct data_t data;
tests/amdgpu/amd_odm.c +1 -1
@@ -160,7 +160,7 @@ static void run_test_odmc(struct data *data, enum odmc_mode m, const drmModeModetest_fini (data); } -igt_main +igt_main() {struct data data;
tests/amdgpu/amd_pci_unplug.c +1 -1
@@ -31,7 +31,7 @@#include "lib/amdgpu/amd_ip_blocks.h" -igt_main +igt_main() {struct amd_pci_unplug_setup setup = {0 };
tests/amdgpu/amd_plane.c +1 -1
@@ -896,7 +896,7 @@ static void test_mpo_swizzle_toggle(data_t *data) } -igt_main +igt_main() {data_t data;
tests/amdgpu/amd_prime.c +1 -1
@@ -428,7 +428,7 @@ static void shrink(int i915, int amd, amdgpu_device_handle device)gem_close (i915, handle); } -igt_main +igt_main() {amdgpu_device_handle device;int i915 =-1 , amd =-1 ;
tests/amdgpu/amd_pstate.c +1 -1
@@ -40,7 +40,7 @@ amdgpu_stable_pstate_test(amdgpu_device_handle device_handle) } -igt_main +igt_main() {amdgpu_device_handle device;int fd =-1 ;
tests/amdgpu/amd_queue_reset.c +1 -1
@@ -1100,7 +1100,7 @@ get_num_of_tests(struct dynamic_test *arr_err, enum amd_ip_block_type *ip_tests,return cnt; } -igt_main +igt_main() {char cmdline[2048 ];int argc =0 ;
tests/amdgpu/amd_ras.c +1 -1
@@ -988,7 +988,7 @@ ras_tests_cleanup(struct amd_ras_setup *setup) } } -igt_main +igt_main() {struct amd_ras_setup setup = {};bool render_mode = true;
tests/amdgpu/amd_security.c +1 -1
@@ -308,7 +308,7 @@ is_security_tests_enable(amdgpu_device_handle device_handle,return enable; } -igt_main +igt_main() {amdgpu_device_handle device;struct amdgpu_gpu_info gpu_info = {};
tests/amdgpu/amd_subvp.c +1 -1
@@ -152,7 +152,7 @@ static void test_subvp(struct data *data)test_fini (data); } -igt_main +igt_main() {struct data data;
tests/amdgpu/amd_syncobj.c +1 -1
@@ -234,7 +234,7 @@ amdgpu_syncobj_timeline(amdgpu_device_handle device_handle) } -igt_main +igt_main() {amdgpu_device_handle device;int fd =-1 ;
tests/amdgpu/amd_uvd_dec.c +1 -1
@@ -294,7 +294,7 @@ amdgpu_uvd_dec_destroy(amdgpu_device_handle device_handle, struct mmd_context *cigt_assert_eq (r,0 ); } -igt_main +igt_main() {amdgpu_device_handle device;struct mmd_context context = {};
tests/amdgpu/amd_uvd_enc.c +1 -1
@@ -309,7 +309,7 @@ amdgpu_uvd_enc_test(amdgpu_device_handle device, struct mmd_shared_context *shar } -igt_main +igt_main() {amdgpu_device_handle device;struct mmd_shared_context shared_context = {};
tests/amdgpu/amd_vce_enc.c +1 -1
@@ -586,7 +586,7 @@ amdgpu_vce_enc_test(amdgpu_device_handle device, struct mmd_shared_context *sharmmd_context_clean (device, context); } -igt_main +igt_main() {amdgpu_device_handle device;struct mmd_shared_context shared_context = {};
tests/amdgpu/amd_vcn.c +1 -1
@@ -1231,7 +1231,7 @@ amdgpu_cs_vcn_enc_destroy(amdgpu_device_handle device_handle,free_resource (&v_context->enc_buf); } -igt_main +igt_main() {amdgpu_device_handle device;struct mmd_context context = {};
tests/amdgpu/amd_vcn_queue.c +1 -1
@@ -57,7 +57,7 @@ vcn_queue_test(amdgpu_device_handle device_handle,return 0 ; } -igt_main +igt_main() {amdgpu_device_handle device;struct mmd_context context = {};
tests/amdgpu/amd_vm.c +1 -1
@@ -197,7 +197,7 @@ amdgpu_vm_mapping_test(amdgpu_device_handle device_handle)amdgpu_bo_free (buf); } -igt_main +igt_main() {amdgpu_device_handle device;struct amdgpu_gpu_info gpu_info = {};
tests/amdgpu/amd_vpe.c +1 -1
@@ -214,7 +214,7 @@ static void amdgpu_cs_vpe_blit(amdgpu_device_handle device_handle,free_resource (&dst_plane_bo); } -igt_main +igt_main() {struct mmd_context context = {};struct mmd_shared_context shared_context = {};
tests/amdgpu/amd_vrr_range.c +1 -1
@@ -456,7 +456,7 @@ static inline void test_freesync_range_suspend(data_t *data)test_freesync_range_base (data,TEST_SUSPEND ); } -igt_main +igt_main() {data_t data;
tests/chamelium/kms_chamelium_audio.c +1 -1
@@ -848,7 +848,7 @@ static void test_display_audio_edid(chamelium_data_t *data, }IGT_TEST_DESCRIPTION ("Testing Audio with a Chamelium board" ); -igt_main +igt_main() {chamelium_data_t data;struct chamelium_port *port;
tests/chamelium/kms_chamelium_color.c +1 -1
@@ -713,7 +713,7 @@ run_tests_for_pipe(data_t *data) } -igt_main +igt_main() {int i;data_t data = {};
tests/chamelium/kms_chamelium_frames.c +1 -1
@@ -984,7 +984,7 @@ static void test_display_planes_random(chamelium_data_t *data, }IGT_TEST_DESCRIPTION ("Tests requiring a Chamelium board" ); -igt_main +igt_main() {chamelium_data_t data;struct chamelium_port *port;
tests/chamelium/kms_chamelium_hpd.c +1 -1
@@ -460,7 +460,7 @@ static void test_hpd_storm_disable(chamelium_data_t *data, }IGT_TEST_DESCRIPTION ("Testing HPD with a Chamelium board" ); -igt_main +igt_main() {chamelium_data_t data;struct chamelium_port *port;
tests/chamelium/kms_chamelium_sharpness_filter.c +1 -1
@@ -241,7 +241,7 @@ run_sharpness_filter_test(data_t *data) } } -igt_main +igt_main() {data_t data = {};
tests/core_auth.c +1 -1
@@ -214,7 +214,7 @@ static void test_basic_auth(int master)drm_close_driver (slave); } -igt_main +igt_main() {/* root (which we run igt as) should always be authenticated */ igt_describe ("Check drm client is always authenticated." );
tests/core_debugfs.c +1 -1
@@ -23,7 +23,7 @@IGT_TEST_DESCRIPTION ("Read entries from debugfs" ); -igt_main +igt_main() {int debugfs =-1 ;int fd =-1 ;
tests/core_getclient.c +1 -1
@@ -47,7 +47,7 @@IGT_TEST_DESCRIPTION ("Tests the DRM_IOCTL_GET_CLIENT ioctl." ); -igt_main +igt_main() {int fd, ret;drm_client_t client;
tests/core_getstats.c +1 -1
@@ -55,7 +55,7 @@IGT_TEST_DESCRIPTION ("Tests the DRM_IOCTL_GET_STATS ioctl." ); -igt_main +igt_main() {int fd, ret;drm_stats_t stats;
tests/core_getversion.c +1 -1
@@ -81,7 +81,7 @@ static void check_all_drm(void) } } -igt_main +igt_main() {char info[256 ];int fd;
tests/core_hotunplug.c +1 -1
@@ -672,7 +672,7 @@ static void hotreplug_lateclose(struct hotunplug *priv)/* Main */ -igt_main +igt_main() {struct hotunplug priv = { .fd = { .drm =-1 , .drm_hc =-1 , .sysfs_dev =-1 , },
tests/core_setmaster.c +1 -1
@@ -133,7 +133,7 @@ static void tweak_perm(uint8_t *saved_perm, char *path, bool save)igt_assert_f (!ret,"chmod failed with %d path=%s\n" , errno, path); } -igt_main +igt_main() { igt_fixture() {/*
tests/core_sysfs.c +1 -1
@@ -24,7 +24,7 @@IGT_TEST_DESCRIPTION ("Read entries from sysfs paths." ); -igt_main +igt_main() {int fd =-1 ;int sysfs =-1 ;
tests/device_reset.c +1 -1
@@ -439,7 +439,7 @@ static void unbind_reset_rebind(struct device_fds *dev, enum reset type)driver_bind (dev); } -igt_main +igt_main() {struct device_fds dev = { .fds = {-1 ,-1 ,-1 }, .dev_bus_addr = {0 }, };
tests/dmabuf.c +1 -1
@@ -92,7 +92,7 @@ static int wrapper(const char *dynamic_name,return igt_kselftest_execute (tst, tl,NULL ,NULL ); } -igt_main +igt_main() {igt_kselftests ("dmabuf_selftests" ,NULL ,NULL ,NULL , wrapper); }
tests/dmabuf_sync_file.c +1 -1
@@ -354,7 +354,7 @@ static void test_import_multiple(int fd, bool write)igt_assert (!sync_file_busy (write_sync_file)); } -igt_main +igt_main() {int fd;
tests/drm_buddy.c +1 -1
@@ -8,7 +8,7 @@IGT_TEST_DESCRIPTION ("Basic sanity check of DRM's buddy allocator (struct drm_buddy)" ); -igt_main +igt_main() {igt_kunit ("drm_buddy_test" ,NULL ,NULL ); }
tests/drm_mm.c +1 -1
@@ -78,7 +78,7 @@IGT_TEST_DESCRIPTION ("Basic sanity check of DRM's range manager (struct drm_mm)" ); -igt_main +igt_main() {igt_kunit ("drm_mm_test" ,NULL ,NULL ); }
tests/drm_read.c +1 -1
@@ -270,7 +270,7 @@ static void test_short_buffer_wakeup(int in, enum pipe pipe)close (w.fd); } -igt_main +igt_main() {igt_display_t display;struct igt_fb fb;
tests/drm_virtgpu.c +1 -1
@@ -156,7 +156,7 @@ static void create_resource_if_needed(void) args.res_handle, args.bo_handle); } -igt_main { +igt_main() {void *caps_buf =NULL ; igt_fixture() {
tests/dumb_buffer.c +1 -1
@@ -389,7 +389,7 @@ static void always_clear(int fd, int timeout)igt_info ("Checked %'lu page allocations\n" , checked); } -igt_main +igt_main() {int fd =-1 ;
tests/fbdev.c +1 -1
@@ -452,7 +452,7 @@ static void framebuffer_tests(int fd) } } -igt_main +igt_main() {volatile int fd =-1 ;
tests/intel/api_intel_allocator.c +1 -1
@@ -810,7 +810,7 @@ struct allocators { {NULL, 0}, }; -igt_main +igt_main() {int fd;struct allocators *a;
tests/intel/gem_bad_reloc.c +1 -1
@@ -206,7 +206,7 @@ static void negative_reloc_blt(int fd)igt_assert_eq (buf[i],0xc0ffee ^ i); } -igt_main +igt_main() {int fd =-1 ;
tests/intel/gem_barrier_race.c +1 -1
@@ -143,7 +143,7 @@ static void test_remote_request(int fd, uint64_t engine, unsigned int timeout)munmap (done,4096 ); } -igt_main +igt_main() {int fd;
tests/intel/gem_basic.c +1 -1
@@ -105,7 +105,7 @@ test_create_fd_close(int fd)close (fd); } -igt_main +igt_main() {igt_fd_t (fd);int gpu_count;
tests/intel/gem_blits.c +1 -1
@@ -820,7 +820,7 @@ static bool blit_supports_tiling(int fd, enum blt_tiling_type tiling) } } -igt_main +igt_main() {struct device device;
tests/intel/gem_busy.c +1 -1
@@ -469,7 +469,7 @@ static void all(int i915, const intel_ctx_t *ctx) for_each_if (gem_class_can_store_dword(i915, (e)->class)) \ igt_dynamic_f("%s", (e)->name) -igt_main +igt_main() {const struct intel_execution_engine2 *e;const intel_ctx_t *ctx;
tests/intel/gem_caching.c +1 -1
@@ -155,7 +155,7 @@ blt_bo_fill(data_t *data, struct intel_bb *ibb, struct intel_buf *tmp_bo,#define TEST_READ 0x1#define TEST_WRITE 0x2#define TEST_BOTH (TEST_READ | TEST_WRITE) -igt_main +igt_main() {struct intel_buf *scratch_buf, *staging_buf;struct intel_bb *ibb;
tests/intel/gem_close.c +1 -1
@@ -137,7 +137,7 @@ static void test_many_handles(int fd) } } -igt_main +igt_main() {igt_fd_t (fd);
tests/intel/gem_close_race.c +1 -1
@@ -336,7 +336,7 @@ static void threads(int timeout, unsigned int flags)drm_close_driver (fd); } -igt_main +igt_main() {int gpu_count;
tests/intel/gem_compute.c +1 -1
@@ -31,7 +31,7 @@ test_compute_square(int fd) "GPU not supported\n"); } -igt_main +igt_main() {int i915;
tests/intel/gem_concurrent_all.c +1 -1
@@ -1775,7 +1775,7 @@ num_buffers(uint64_t max,return n; } -igt_main +igt_main() {const struct access_mode modes[] = { {
tests/intel/gem_create.c +1 -1
@@ -946,7 +946,7 @@ static void create_ext_cpu_access_big(int fd)free (regions); } -igt_main +igt_main() {igt_fd_t (fd);
tests/intel/gem_cs_tlb.c +1 -1
@@ -154,7 +154,7 @@ static void run_on_ring(int fd, const intel_ctx_t *ctx, } } -igt_main +igt_main() {const struct intel_execution_engine2 *e;const intel_ctx_t *ctx;
tests/intel/gem_ctx_bad_destroy.c +1 -1
@@ -58,7 +58,7 @@ IGT_TEST_DESCRIPTION("Negative test cases for destroy contexts.");uint32_t ctx_id;int fd; -igt_main +igt_main() { igt_fixture() { fd =drm_open_driver_render (DRIVER_INTEL );
tests/intel/gem_ctx_create.c +1 -1
@@ -614,7 +614,7 @@ static void iris_pipeline(int i915)#endif /* I915_DEFINE_CONTEXT_PARAM_ENGINES */ } -igt_main +igt_main() {const int ncpus =sysconf (_SC_NPROCESSORS_ONLN);struct drm_i915_gem_context_create create;
tests/intel/gem_ctx_engines.c +1 -1
@@ -609,7 +609,7 @@ static void independent_all(int i915, const intel_ctx_t *ctx)igt_waitchildren (); } -igt_main +igt_main() {const struct intel_execution_engine2 *e;igt_fd_t (i915);
tests/intel/gem_ctx_exec.c +1 -1
@@ -486,7 +486,7 @@ static void close_race(int i915)munmap (ctx_id,4096 ); } -igt_main +igt_main() {const uint32_t batch[2 ] = {0 ,MI_BATCH_BUFFER_END };uint32_t handle;
tests/intel/gem_ctx_freq.c +1 -1
@@ -260,7 +260,7 @@ static void disable_boost(void)__disable_boost (dirfd); } -igt_main +igt_main() { igt_fixture() { i915 =drm_open_driver (DRIVER_INTEL );
tests/intel/gem_ctx_isolation.c +1 -1
@@ -1004,7 +1004,7 @@ static unsigned int __has_context_isolation(int fd) for_each_if(mask & (1 << (e)->class)) \ igt_dynamic_f("%s", (e)->name) -igt_main +igt_main() {unsigned int has_context_isolation =0 ;const struct intel_execution_engine2 *e;
tests/intel/gem_ctx_param.c +1 -1
@@ -372,7 +372,7 @@ static void test_get_invalid_param(int fd, uint64_t param)igt_assert_eq (err, -EINVAL ); } -igt_main +igt_main() {struct drm_i915_gem_context_param arg;int fd;
tests/intel/gem_ctx_persistence.c +1 -1
@@ -1331,7 +1331,7 @@ static void exit_handler(int sig)enable_hangcheck (i915); } -igt_main +igt_main() {const intel_ctx_cfg_t empty_cfg = {};struct {
tests/intel/gem_ctx_shared.c +1 -1
@@ -1023,7 +1023,7 @@ static void smoketest(int i915, const intel_ctx_cfg_t *cfg, !gem_engine_can_block_ggtt_binder(i915, e)) \ igt_dynamic_f("%s", e->name) -igt_main +igt_main() {const struct intel_execution_engine2 *e;intel_ctx_cfg_t cfg;
tests/intel/gem_ctx_sseu.c +1 -1
@@ -514,7 +514,7 @@ out:gem_context_destroy (fd, arg.ctx_id); } -igt_main +igt_main() {int fd;
tests/intel/gem_ctx_switch.c +1 -1
@@ -686,7 +686,7 @@ has_queues(int fd)return gem_has_vm (fd) &&gem_context_has_single_timeline (fd); } -igt_main +igt_main() {const int ncpus =sysconf (_SC_NPROCESSORS_ONLN);const struct intel_execution_engine2 *e2;
tests/intel/gem_eio.c +1 -1
@@ -1102,7 +1102,7 @@ exit_handler(int sig)igt_force_gpu_reset (fd); } -igt_main +igt_main() { igt_fixture() { fd =drm_open_driver (DRIVER_INTEL );
tests/intel/gem_evict_alignment.c +1 -1
@@ -209,7 +209,7 @@ static void major_evictions(int fd, uint64_t size, uint64_t count)#define MAX_32b ((1ull << 32) - 4096) -igt_main +igt_main() {uint64_t size, count;int fd =-1 ;
tests/intel/gem_evict_everything.c +1 -1
@@ -241,7 +241,7 @@ static void test_major_evictions(int fd, uint64_t size, uint64_t count)#define MAX_32b ((1ull << 32) - 4096) -igt_main +igt_main() {uint64_t size, count;int fd;
tests/intel/gem_exec_alignment.c +1 -1
@@ -548,7 +548,7 @@ static void single(int fd)gem_close (fd, execobj.handle); } -igt_main +igt_main() {igt_fd_t (fd);
tests/intel/gem_exec_async.c +1 -1
@@ -189,7 +189,7 @@ static bool has_async_execbuf(int fd) igt_subtest_with_dynamic(T) for_each_ctx_engine(i915, ctx, e) \ igt_dynamic_f("%s", (e)->name) -igt_main +igt_main() {const struct intel_execution_engine2 *e;const intel_ctx_t *ctx;
tests/intel/gem_exec_await.c +1 -1
@@ -251,7 +251,7 @@ static void wide(int fd, intel_ctx_cfg_t *cfg, int ring_size,#define TIMEOUT 20 -igt_main +igt_main() {intel_ctx_cfg_t cfg;int ring_size =0 ;
tests/intel/gem_exec_balancer.c +1 -1
@@ -3409,7 +3409,7 @@ static bool has_parallel_execbuf(int i915)return false; } -igt_main +igt_main() {igt_fd_t (i915);
tests/intel/gem_exec_basic.c +1 -1
@@ -53,7 +53,7 @@ static uint32_t batch_create(int fd, uint64_t *batch_size, uint32_t region)return handle; } -igt_main +igt_main() {const struct intel_execution_engine2 *e;struct drm_i915_query_memory_regions *query_info;
tests/intel/gem_exec_big.c +1 -1
@@ -318,7 +318,7 @@ static void single(int i915)munmap (ptr, batch_size); } -igt_main +igt_main() {int i915 =-1 ;
tests/intel/gem_exec_capture.c +1 -1
@@ -955,7 +955,7 @@ static size_t safer_strlen(const char *s)igt_subtest_with_dynamic (T)for_each_ctx_engine (i915 ,ctx ,e ) \ for_each_if(gem_class_can_store_dword(i915, (e)->class)) \ -igt_main +igt_main () {const struct intel_execution_engine2 *e;const intel_ctx_t *ctx;
tests/intel/gem_exec_create.c +1 -1
@@ -176,7 +176,7 @@ static void all(int fd, unsigned flags, int timeout, int ncpus, uint32_t region)intel_ctx_destroy (fd, ctx); } -igt_main +igt_main() {const int ncpus =sysconf (_SC_NPROCESSORS_ONLN);struct drm_i915_query_memory_regions *query_info;
tests/intel/gem_exec_endless.c +1 -1
@@ -341,7 +341,7 @@ static void unpin_rps(int sysfs) } } -igt_main +igt_main() {const struct intel_execution_engine2 *e;igt_fd_t (i915);
tests/intel/gem_exec_fair.c +1 -1
@@ -1289,7 +1289,7 @@ static bool set_heartbeat(int i915, const char *name, unsigned int value)return true; } -igt_main +igt_main() { static const struct { const char *name;
tests/intel/gem_exec_fence.c +1 -1
@@ -3155,7 +3155,7 @@ static void test_syncobj_backward_timeline_chain_engines(int fd, const intel_ctxteardown_timeline_chain_engines (&ctx); } -igt_main +igt_main() {const struct intel_execution_engine2 *e;const intel_ctx_t *ctx;
tests/intel/gem_exec_flush.c +1 -1
@@ -2074,7 +2074,7 @@ static const char *yesno(bool x)return x ?"yes" :"no" ; } -igt_main +igt_main() {const struct intel_execution_ring *e;const int ncpus =sysconf (_SC_NPROCESSORS_ONLN);
tests/intel/gem_exec_gttfill.c +1 -1
@@ -244,7 +244,7 @@ static void fillgtt(int fd, const intel_ctx_t *ctx, unsigned ring, int timeout)igt_assert_eq (intel_detect_and_clear_missed_interrupts (fd),0 ); } -igt_main +igt_main() {const struct intel_execution_engine2 *e;const intel_ctx_t *ctx;
tests/intel/gem_exec_latency.c +1 -1
@@ -928,7 +928,7 @@ static double clockrate(int i915, int reg) for_each_if(gem_class_can_store_dword(i915, (e)->class)) \ igt_dynamic_f("%s", (e)->name) -igt_main +igt_main() {const struct intel_execution_engine2 *e;const intel_ctx_t *ctx;
tests/intel/gem_exec_nop.c +1 -1
@@ -1000,7 +1000,7 @@ static void preempt(int fd, uint32_t handle, e->name, count, elapsed(&start, &now)*1e6 / count); } -igt_main +igt_main() {const struct intel_execution_engine2 *e;const intel_ctx_t *ctx;
tests/intel/gem_exec_parallel.c +1 -1
@@ -336,7 +336,7 @@ static void all(int fd, const intel_ctx_t *ctx,free (threads); } -igt_main +igt_main() {struct intel_execution_engine2 *e;
tests/intel/gem_exec_params.c +1 -1
@@ -449,7 +449,7 @@ uint32_t batch[2] = {MI_BATCH_BUFFER_END};uint32_t handle, devid;int fd; -igt_main +igt_main() { igt_fixture() { fd =drm_open_driver (DRIVER_INTEL );
tests/intel/gem_exec_reloc.c +1 -1
@@ -1625,7 +1625,7 @@ static void invalid_domains(int fd)gem_close (fd, obj[0 ].handle); } -igt_main +igt_main() {const intel_ctx_t *ctx;const struct intel_execution_engine2 *e;
tests/intel/gem_exec_schedule.c +1 -1
@@ -3202,7 +3202,7 @@ static void fairslice(int i915, const intel_ctx_cfg_t *cfg, !gem_engine_can_block_ggtt_binder(i915, e)) \ igt_dynamic_f("%s", e->name) -igt_main +igt_main() {int fd =-1 ;const intel_ctx_t *ctx =NULL ;
tests/intel/gem_exec_store.c +1 -1
@@ -437,7 +437,7 @@ static void print_welcome(int fd) for_each_if(gem_class_can_store_dword(i915, (e)->class)) \ igt_dynamic_f("%s", (e)->name) -igt_main +igt_main() {const struct intel_execution_engine2 *e;const intel_ctx_t *ctx;
tests/intel/gem_exec_suspend.c +1 -1
@@ -351,7 +351,7 @@ static void power_test(int i915, const intel_ctx_t *ctx, d_charge(&after, &before) * 3600 / d_time(&after, &before)); } -igt_main +igt_main() { const struct { const char *suffix;
tests/intel/gem_exec_whisper.c +1 -1
@@ -679,7 +679,7 @@ static void whisper(int fd, const intel_ctx_t *ctx,close (debugfs); } -igt_main +igt_main() { const struct mode { const char *name;
tests/intel/gem_fence_thrash.c +1 -1
@@ -252,7 +252,7 @@ static int run_test(int threads_per_fence, void *f, int tiling,return 0 ; } -igt_main +igt_main() { igt_subtest("bo-write-verify-none")igt_assert (run_test (0 , bo_write_verify,I915_TILING_NONE ,80 ) ==0 );
tests/intel/gem_fence_upload.c +1 -1
@@ -407,7 +407,7 @@ static void wc_contention(void)igt_assert (tiled[1 ] >0.75 * tiled[0 ]); } -igt_main +igt_main() { igt_subtest("performance")performance ();
tests/intel/gem_fenced_exec_thrash.c +1 -1
@@ -191,7 +191,7 @@ static void run_test(int fd, int num_fences, int expected_errno,put_ahnd (ahnd); } -igt_main +igt_main() {uint32_t devid =0 ;unsigned int num_fences =0 ;
tests/intel/gem_flink_basic.c +1 -1
@@ -185,7 +185,7 @@ test_flink_lifetime(int fd)drm_close_driver (fd2); } -igt_main +igt_main() {igt_fd_t (fd);
tests/intel/gem_flink_race.c +1 -1
@@ -213,7 +213,7 @@ static void test_flink_close(void)igt_assert_eq (obj_count,0 ); } -igt_main +igt_main() { igt_subtest("flink_name")test_flink_name (5 );
tests/intel/gem_huc_copy.c +1 -1
@@ -98,7 +98,7 @@ static void test_huc_load(int fd)igt_fail_on_f (status ==0 ,"HuC firmware is not running!\n" ); } -igt_main +igt_main() {int drm_fd =-1 ;uint32_t devid;
tests/intel/gem_linear_blits.c +1 -1
@@ -269,7 +269,7 @@ static void run_test(int fd, int count, bool do_relocs)#define MAX_32b ((1ull << 32) - 4096) -igt_main +igt_main() {const int ncpus =sysconf (_SC_NPROCESSORS_ONLN);uint64_t count =0 ;
tests/intel/gem_lmem_evict.c +1 -1
@@ -93,7 +93,7 @@ static void test_dontneed_evict_race(int fd,gem_close (fd, handle1); } -igt_main +igt_main() {struct drm_i915_query_memory_regions *regions;int i915 =-1 ;
tests/intel/gem_madvise.c +1 -1
@@ -215,7 +215,7 @@ dontneed_before_exec(void)drm_close_driver (fd); } -igt_main +igt_main() {igt_describe ("Check signal for Segmentation Fault and bus error before" " obtaining a purgeable object and calling for sighandler." );
tests/intel/gem_media_fill.c +1 -1
@@ -140,7 +140,7 @@ static void media_fill(data_t *data, igt_fillfunc_t fill,munmap (ptr, buf->surface[0 ].size); } -igt_main +igt_main() {data_t data = {0 , };igt_fillfunc_t fill_fn =NULL ;
tests/intel/gem_mmap.c +1 -1
@@ -203,7 +203,7 @@ static int mmap_ioctl(int i915, struct drm_i915_gem_mmap *arg)return err; } -igt_main +igt_main() {uint8_t expected[OBJECT_SIZE ];uint8_t buf[OBJECT_SIZE ];
tests/intel/gem_mmap_gtt.c +1 -1
@@ -1589,7 +1589,7 @@ static int mmap_ioctl(int i915, struct drm_i915_gem_mmap_gtt *arg)int fd; -igt_main +igt_main() {if (igt_run_in_simulation ())OBJECT_SIZE =1 *1024 *1024 ;
tests/intel/gem_mmap_offset.c +1 -1
@@ -1145,7 +1145,7 @@ static bool has_mmap_offset(int i915)return mmap_gtt_version (i915) >=4 ; } -igt_main +igt_main() {int i915;
tests/intel/gem_mmap_wc.c +1 -1
@@ -519,7 +519,7 @@ static int mmap_ioctl(int i915, struct drm_i915_gem_mmap *arg)int fd; -igt_main +igt_main() {if (igt_run_in_simulation ())OBJECT_SIZE =1 *1024 *1024 ;
tests/intel/gem_partial_pwrite_pread.c +1 -1
@@ -365,7 +365,7 @@ static void do_tests(data_t *data, int cache_level, const char *suffix)test_partial_read_writes (data); } -igt_main +igt_main() {data_t data = {0 , };srandom (0xdeadbeef );
tests/intel/gem_pipe_control_store_loop.c +1 -1
@@ -175,7 +175,7 @@ store_pipe_control_loop(bool preuse_buffer, int timeout)int fd;uint32_t devid; -igt_main +igt_main() { igt_fixture() { fd =drm_open_driver (DRIVER_INTEL );
tests/intel/gem_ppgtt.c +1 -1
@@ -408,7 +408,7 @@ static bool has_contexts(void)return result; } -igt_main +igt_main() {const int ncpus =sysconf (_SC_NPROCESSORS_ONLN);
tests/intel/gem_pread_after_blit.c +1 -1
@@ -228,7 +228,7 @@ static void do_test(struct buf_ops *bops, int cache_level,intel_bb_destroy (ibb); } -igt_main +igt_main() {const uint32_t start[2 ] = {0 ,1024 *1024 /4 }; const struct {
tests/intel/gem_pxp.c +1 -1
@@ -1299,7 +1299,7 @@ static void require_init_powermgt(int i915, struct powermgt_data *pm)init_powermgt_resources (i915, pm); } -igt_main +igt_main() {int i915 =-1 ;bool pxp_supported = false;
tests/intel/gem_read_read_speed.c +1 -1
@@ -242,7 +242,7 @@ static void run(struct buf_ops *bops, int _width, int _height,intel_buf_destroy (bcs); } -igt_main +igt_main() {const int sizes[] = {128 ,256 ,512 ,1024 ,2048 ,4096 ,8192 ,0 };struct buf_ops *bops =NULL ;
tests/intel/gem_readwrite.c +1 -1
@@ -95,7 +95,7 @@ do_write(int fd, int handle, void *buf, int offset, int size)int fd;uint32_t handle; -igt_main +igt_main() {uint8_t expected[OBJECT_SIZE ];uint8_t buf[OBJECT_SIZE ];
tests/intel/gem_reg_read.c +1 -1
@@ -159,7 +159,7 @@ retry: } -igt_main +igt_main() {uint64_t val =0 ;int fd =-1 ;
tests/intel/gem_render_copy_redux.c +1 -1
@@ -217,7 +217,7 @@ static void copy_flink(data_t *data)data_fini (&local); } -igt_main +igt_main() {data_t data = {0 , };
tests/intel/gem_render_linear_blits.c +1 -1
@@ -178,7 +178,7 @@ static void run_test (int fd, int count)buf_ops_destroy (bops); } -igt_main +igt_main() {static int fd =0 ;int count=0 ;
tests/intel/gem_render_tiled_blits.c +1 -1
@@ -229,7 +229,7 @@ static void run_test (int fd, int count) } -igt_main +igt_main() {int fd =0 ;int count =0 ;
tests/intel/gem_request_retire.c +1 -1
@@ -116,7 +116,7 @@ test_retire_vma_not_inactive(int fd)put_ahnd (ahnd); } -igt_main +igt_main() {igt_fd_t (fd);
tests/intel/gem_reset_stats.c +1 -1
@@ -1080,7 +1080,7 @@ static void test_shared_reset_domain(const intel_ctx_cfg_t *base_cfg,#define RUN_TEST (...) do { sync_gpu(); __VA_ARGS__; sync_gpu(); } while (0)#define RUN_CTX_TEST (...) do { check_context(e); RUN_TEST(__VA_ARGS__); } while (0) -igt_main +igt_main() {const struct intel_execution_ring *e;
tests/intel/gem_ringfill.c +1 -1
@@ -391,7 +391,7 @@ static bool has_lut_handle(int i915)return result; } -igt_main +igt_main() { const struct { const char *suffix;
tests/intel/gem_set_tiling_vs_blt.c +1 -1
@@ -234,7 +234,7 @@ static void do_test(struct buf_ops *bops, uint32_t tiling, unsigned stride,igt_info ("done\n" ); } -igt_main +igt_main() {int fd, i;uint32_t tiling, tiling_after;
tests/intel/gem_shrink.c +1 -1
@@ -513,7 +513,7 @@ static void reclaim(unsigned engine, int timeout)drm_close_driver (fd); } -igt_main +igt_main() { const struct test { const char *name;
tests/intel/gem_softpin.c +1 -1
@@ -1464,7 +1464,7 @@ static void safe_alignment(int i915) igt_subtest_with_dynamic(T) for_each_ctx_engine(i915, ctx, e) \ igt_dynamic_f("%s", e->name) -igt_main +igt_main() {const struct intel_execution_engine2 *e;int fd =-1 ;
tests/intel/gem_spin_batch.c +1 -1
@@ -241,7 +241,7 @@ static bool has_userptr(int fd)return err ==EFAULT ; } -igt_main +igt_main() {const struct intel_execution_engine2 *e2;const struct intel_execution_ring *e;
tests/intel/gem_streaming_writes.c +1 -1
@@ -419,7 +419,7 @@ static void test_batch(int fd, int mode, int reverse)gem_close (fd, dst); } -igt_main +igt_main() {int fd, sync;
tests/intel/gem_sync.c +1 -1
@@ -1365,7 +1365,7 @@ preempt(int fd, const intel_ctx_t *ctx, unsigned ring,intel_ctx_destroy (fd, tmp_ctx[0 ]); } -igt_main +igt_main() {const int ncpus =sysconf (_SC_NPROCESSORS_ONLN); const struct {
tests/intel/gem_tiled_blits.c +1 -1
@@ -185,7 +185,7 @@ static void run_test(int fd, int count)#define MAX_32b ((1ull << 32) - 4096) -igt_main +igt_main() {const int ncpus =sysconf (_SC_NPROCESSORS_ONLN);uint64_t count =0 ;
tests/intel/gem_tiled_fence_blits.c +1 -1
@@ -292,7 +292,7 @@ static void run_test(int fd, int count, uint64_t end)#define MAX_32b ((1ull << 32) - 4096) -igt_main +igt_main() {/* * For machines with many cpu cores buffer verification can take
tests/intel/gem_tiled_partial_pwrite_pread.c +1 -1
@@ -286,7 +286,7 @@ static bool known_swizzling(uint32_t handle)return arg.phys_swizzle_mode == arg.swizzle_mode; } -igt_main +igt_main() {srandom (0xdeadbeef );
tests/intel/gem_tiled_swapping.c +1 -1
@@ -176,7 +176,7 @@ static void check_memory_layout(int fd)igt_debug ("normal memory configuration detected, continuing\n" ); } -igt_main +igt_main() {unsigned long n, count;struct thread *threads;
tests/intel/gem_vm_create.c +1 -1
@@ -380,7 +380,7 @@ static void isolation(int i915)gem_vm_destroy (i915, vm[0 ]); } -igt_main +igt_main() {int i915 =-1 ;
tests/intel/gem_wait.c +1 -1
@@ -229,7 +229,7 @@ static void test_all_engines(const char *name, int i915, const intel_ctx_t *ctx, } } -igt_main +igt_main() {const intel_ctx_t *ctx;int fd =-1 ;
tests/intel/gem_watchdog.c +1 -1
@@ -553,7 +553,7 @@ far_fence(int i915, int timeout, const intel_ctx_t *ctx,close (fence); } -igt_main +igt_main() {const struct intel_execution_engine2 *e;const intel_ctx_t *ctx;
tests/intel/gem_workarounds.c +1 -1
@@ -276,7 +276,7 @@ static void check_workarounds(int fd, enum operation op, unsigned int flags)drm_close_driver (fd); } -igt_main +igt_main() {struct intel_mmio_data mmio_data; const struct {
tests/intel/gen7_exec_parse.c +1 -1
@@ -482,7 +482,7 @@ static void hsw_load_register_reg(void)drm_close_driver (fd); } -igt_main +igt_main() {uint32_t handle;int fd;
tests/intel/gen9_exec_parse.c +1 -1
@@ -1206,7 +1206,7 @@ static void test_shadow_peek(int fd)gem_close (fd, exec[i].handle); } -igt_main +igt_main() {uint32_t handle;int i915;
tests/intel/i915_drm_fdinfo.c +1 -1
@@ -930,7 +930,7 @@ test_memory(int i915, struct gem_memory_region *mr, unsigned int flags) igt_subtest_with_dynamic(T) for_each_ctx_engine(i915, ctx, e) \ igt_dynamic_f("%s", e->name) -igt_main +igt_main() {unsigned int num_engines =0 , num_classes =0 ;const struct intel_execution_engine2 *e;
tests/intel/i915_fb_tiling.c +1 -1
@@ -37,7 +37,7 @@IGT_TEST_DESCRIPTION ("Object tiling must be fixed after framebuffer creation." ); -igt_main +igt_main() {int drm_fd;struct igt_fb fb;
tests/intel/i915_getparams_basic.c +1 -1
@@ -162,7 +162,7 @@ exit_handler(int sig)deinit (); } -igt_main +igt_main() { igt_fixture() {igt_install_exit_handler (exit_handler);
tests/intel/i915_hangman.c +1 -1
@@ -567,7 +567,7 @@ static void do_tests(const char *name, const char *prefix, } } -igt_main +igt_main() {const intel_ctx_t *ctx;igt_hang_t hang = {};
tests/intel/i915_module_load.c +1 -1
@@ -361,7 +361,7 @@ static uint32_t driver_load_with_lmem_bar_size(uint32_t lmem_bar_size, bool chereturn lmem_bar_size; } -igt_main +igt_main() {igt_describe ("Check if i915 and friends are not yet loaded, then load them." ); igt_subtest("load") {
tests/intel/i915_pm_freq_api.c +1 -1
@@ -159,7 +159,7 @@ static void restore_sysfs_freq(int sig)drm_close_driver (i915); } -igt_main +igt_main() { igt_fixture() {int num_gts, dirfd, gt;
tests/intel/i915_pm_freq_mult.c +1 -1
@@ -164,7 +164,7 @@ static void media_freq(int gt, int dir)cleanup (dir); } -igt_main +igt_main() {int dir, gt;
tests/intel/i915_pm_rc6_residency.c +1 -1
@@ -601,7 +601,7 @@ static unsigned int rc6_enabled_mask(int i915, int dirfd)return get_rc6_enabled_mask (dirfd); } -igt_main +igt_main() {int i915 =-1 ;unsigned int dirfd, gt;
tests/intel/i915_pm_rps.c +1 -1
@@ -1201,7 +1201,7 @@ static void read_sysfs_freq(char *sysfs_path) } } -igt_main +igt_main() {int tmp, gt;
tests/intel/i915_pm_sseu.c +1 -1
@@ -387,7 +387,7 @@ exit_handler(int sig)gem_deinit (); } -igt_main +igt_main() { igt_fixture() {igt_install_exit_handler (exit_handler);
tests/intel/i915_power.c +1 -1
@@ -75,7 +75,7 @@ static void sanity(int i915)igt_assert (idle >=0 && busy >0 && busy > idle); } -igt_main +igt_main() {int i915;
tests/intel/i915_query.c +1 -1
@@ -1436,7 +1436,7 @@ static void query_parse_and_validate_hwconfig_table(int i915)free (data); } -igt_main +igt_main() {int fd =-1 ;int devid;
tests/intel/i915_selftest.c +1 -1
@@ -638,7 +638,7 @@IGT_TEST_DESCRIPTION ("Basic unit tests for i915.ko" ); -igt_main +igt_main() {const char *env =getenv ("SELFTESTS" ) ?:"" ;char opts[1024 ];
tests/intel/i915_suspend.c +1 -1
@@ -298,7 +298,7 @@ test_suspend_without_i915(int state)int fd; -igt_main +igt_main() {igt_describe ("Validate suspend-to-idle without i915 module" );igt_subtest ("basic-s2idle-without-i915" )
tests/intel/intel_hwmon.c +1 -1
@@ -76,7 +76,7 @@ static void hwmon_write(int hwm)closedir (dir); } -igt_main +igt_main() {int fd, hwm;
tests/intel/kms_big_fb.c +1 -1
@@ -967,7 +967,7 @@ static bool test_requirements(data_t *input_data, int l)return true; } -igt_main +igt_main() { igt_fixture() {drmModeResPtr res;
tests/intel/kms_cdclk.c +1 -1
@@ -340,7 +340,7 @@ static void run_cdclk_test(data_t *data, uint32_t flags) } } -igt_main +igt_main() {data_t data = {};
tests/intel/kms_dirtyfb.c +1 -1
@@ -350,7 +350,7 @@ static void run_test(data_t *data)intel_buf_destroy (dst); } -igt_main +igt_main() {data_t data = {};
tests/intel/kms_dp_link_training.c +1 -1
@@ -298,7 +298,7 @@ static bool test_link_rate(data_t *data, bool mst, bool uhbr)IGT_TEST_DESCRIPTION ("Test to validate link training on SST/MST with " "UHBR/NON_UHBR rates" ); -igt_main +igt_main() {data_t data = {};
tests/intel/kms_dp_linktrain_fallback.c +1 -1
@@ -597,7 +597,7 @@ static bool run_dsc_sst_fallaback_test(data_t *data)return ran; } -igt_main +igt_main() {data_t data = {};
tests/intel/kms_draw_crc.c +1 -1
@@ -328,7 +328,7 @@ static const char *modifier_str(int modifier_index) } } -igt_main +igt_main() {enum igt_draw_method method;int format_idx, modifier_idx;
tests/intel/kms_fb_coherency.c +1 -1
@@ -234,7 +234,7 @@ static void select_valid_pipe_output_combo(data_t *data)igt_skip ("no valid crtc/connector combinations found\n" ); } -igt_main +igt_main() {data_t data;
tests/intel/kms_fbc_dirty_rect.c +1 -1
@@ -436,7 +436,7 @@ static void fbc_dirty_rectangle_test(data_t *data, void (*test_func)(data_t *))cleanup (data); } -igt_main +igt_main() {data_t data = {0 };
tests/intel/kms_fbcon_fbt.c +1 -1
@@ -451,7 +451,7 @@ static void teardown_environment(struct drm_info *drm)kmstest_restore_vt_mode (); } -igt_main +igt_main() {struct drm_info drm = { .fd =-1 };
tests/intel/kms_flip_scaled_crc.c +1 -1
@@ -714,7 +714,7 @@ static void run_tests(data_t *data, uint32_t index, enum pipe pipe,test_flip_to_scaled (data, index, pipe, output, modetoset,1 ); } -igt_main +igt_main() {enum pipe pipe;data_t data = {};
tests/intel/kms_flip_tiling.c +1 -1
@@ -209,7 +209,7 @@ static void handle_lost_event(data_t *data) {static data_t data = {};igt_output_t *output; -igt_main +igt_main() { igt_fixture() { data.drm_fd =drm_open_driver_master (DRIVER_INTEL |DRIVER_XE );
tests/intel/kms_joiner.c +1 -1
@@ -545,7 +545,7 @@ static void test_basic_max_non_joiner(data_t *data) } } -igt_main +igt_main() {bool ultra_joiner_supported, is_dgfx;int i, j, display_ver;
tests/intel/kms_legacy_colorkey.c +1 -1
@@ -58,7 +58,7 @@ static void test_plane(uint32_t plane_id, int expected_ret) sizeof(ckey)) == expected_ret); } -igt_main +igt_main() { igt_fixture() { drm_fd =drm_open_driver_master (DRIVER_INTEL );
tests/intel/kms_pipe_b_c_ivb.c +1 -1
@@ -289,7 +289,7 @@ test_fail_enable_pipe_C_while_B_has_3_lanes(data_t *data) }static data_t data; -igt_main +igt_main() {int devid;
tests/intel/kms_pipe_stress.c +1 -1
@@ -856,7 +856,7 @@ struct data data = { }; -igt_main { +igt_main() {uint8_t format_idx =0 , tiling_idx =0 ; igt_fixture() {
tests/intel/kms_pm_backlight.c +1 -1
@@ -202,7 +202,7 @@ static void test_setup(igt_display_t display, igt_output_t *output) } } -igt_main +igt_main() {int fd;int i =0 ;
tests/intel/kms_pm_dc.c +1 -1
@@ -730,7 +730,7 @@ static void kms_poll_state_restore(int sig) } } -igt_main +igt_main() {data_t data = {};
tests/intel/kms_pm_lpsp.c +1 -1
@@ -192,7 +192,7 @@ static void test_lpsp(data_t *data) }IGT_TEST_DESCRIPTION ("These tests validates display Low Power Single Pipe configurations" ); -igt_main +igt_main() {data_t data = {};
tests/intel/kms_psr.c +1 -1
@@ -769,7 +769,7 @@ static void dpms_off_on(data_t *data)data_t data = {}; -igt_main +igt_main() {int z, y;enum operations op;
tests/intel/kms_psr2_sf.c +1 -1
@@ -1172,7 +1172,7 @@ static void run_plane_update_continuous(data_t data, int i, int coexist_features } } -igt_main +igt_main() {bool output_supports_pr_psr2_sel_fetch = false;bool pr_psr2_sel_fetch_supported = false;
tests/intel/kms_psr2_su.c +1 -1
@@ -309,7 +309,7 @@ static int check_psr2_support(data_t *data, enum pipe pipe)return status; } -igt_main +igt_main() {data_t data = {};enum pipe pipe;
tests/intel/kms_psr_stress_test.c +1 -1
@@ -348,7 +348,7 @@ static void run(data_t *data)psr_sink_error_check (data->debugfs_fd, data->initial_state, data->output); } -igt_main +igt_main() {data_t data = {};
tests/intel/perf.c +1 -1
@@ -5857,7 +5857,7 @@ test_group_concurrent_oa_buffer_read(void)igt_waitchildren (); } -igt_main +igt_main() {const intel_ctx_t *ctx;const struct intel_execution_engine2 *e;
tests/intel/perf_pmu.c +1 -1
@@ -2278,7 +2278,7 @@ static void restore_sysfs_freq(int i915)free (stash_boost); } -igt_main +igt_main() {const struct intel_execution_engine2 *e;unsigned int num_engines =0 ;
tests/intel/prime_busy.c +1 -1
@@ -148,7 +148,7 @@ static void test_mode(int fd, const intel_ctx_t *ctx, unsigned int flags)igt_disallow_hang (fd, hang); } -igt_main +igt_main() {const intel_ctx_t *ctx;int fd =-1 ;
tests/intel/prime_mmap.c +1 -1
@@ -537,7 +537,7 @@ static bool check_skip(uint32_t skip, uint32_t region)return false; } -igt_main +igt_main() {struct igt_collection *set, *regions, *dma_buf_set;struct drm_i915_query_memory_regions *query_info;
tests/intel/prime_mmap_coherency.c +1 -1
@@ -307,7 +307,7 @@ static void test_ioctl_errors(void) } } -igt_main +igt_main() {struct igt_collection *set, *dma_buf_set;struct drm_i915_query_memory_regions *query_info;
tests/intel/prime_mmap_kms.c +1 -1
@@ -257,7 +257,7 @@ check_for_dma_buf_mmap(int fd)return ret; } -igt_main +igt_main() {gpu_process_t gpu;
tests/intel/prime_self_import.c +1 -1
@@ -458,7 +458,7 @@ static void test_llseek_bad(void)drm_close_driver (fd); } -igt_main +igt_main() {struct {const char *name;
tests/intel/sysfs_defaults.c +1 -1
@@ -91,7 +91,7 @@ static void test_writable(int i915, int engine)closedir (dir); } -igt_main +igt_main() {int i915 =-1 , engines =-1 ;
tests/intel/sysfs_heartbeat_interval.c +1 -1
@@ -487,7 +487,7 @@ static void test_off(int i915, int engine)put_ahnd (ahnd); } -igt_main +igt_main() { static const struct { const char *name;
tests/intel/sysfs_preempt_timeout.c +1 -1
@@ -332,7 +332,7 @@ static void test_off(int i915, int engine)set_preempt_timeout (engine, saved); } -igt_main +igt_main() { static const struct { const char *name;
tests/intel/sysfs_timeslice_duration.c +1 -1
@@ -556,7 +556,7 @@ static void test_off(int i915, int engine)set_timeslice (engine, saved); } -igt_main +igt_main() { static const struct { const char *name;
tests/intel/xe_compute.c +1 -1
@@ -510,7 +510,7 @@ test_compute_square(int fd) "GPU not supported\n"); } -igt_main +igt_main() {int xe, ccs_mode[4 ];unsigned int ip_ver;
tests/intel/xe_compute_preempt.c +1 -1
@@ -62,7 +62,7 @@ test_compute_preempt(int fd, struct drm_xe_engine_class_instance *hwe, bool thre#define CONTEXT_MB 100 -igt_main +igt_main() {int xe;struct drm_xe_engine_class_instance *hwe;
tests/intel/xe_configfs.c +1 -1
@@ -309,7 +309,7 @@ static int create_device_configfs_group(int configfs_fd)return configfs_device_fd; } -igt_main +igt_main() {int fd, configfs_fd, configfs_device_fd;uint32_t devid;
tests/intel/xe_dma_buf_sync.c +1 -1
@@ -226,7 +226,7 @@ test_export_dma_buf(struct drm_xe_engine_class_instance *hwe0,drm_close_driver (fd[i]); } -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe, *hwe0 =NULL , *hwe1;int fd;
tests/intel/xe_drm_fdinfo.c +1 -1
@@ -728,7 +728,7 @@ utilization_multi(int fd, int gt, int class, unsigned int flags)xe_vm_destroy (fd, vm); } -igt_main +igt_main() { const struct section { const char *name;
tests/intel/xe_eudebug.c +1 -1
@@ -2794,7 +2794,7 @@ static void test_basic_exec_queues_enable(int fd)xe_vm_destroy (fd, vm_non_lr); } -igt_main +igt_main() {bool was_enabled;bool *multigpu_was_enabled;
tests/intel/xe_eudebug_online.c +1 -1
@@ -2587,7 +2587,7 @@ static bool restore_preempt_timeout(int fd, uint16_t engine_class, uint32_t preeigt_dynamic_f ("%s%d" ,xe_engine_class_string (__hwe->engine_class), \ hwe->engine_instance) -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe;bool was_enabled;
tests/intel/xe_eudebug_sriov.c +1 -1
@@ -126,7 +126,7 @@ static void restore_initial_driver_state(int fd, bool eudebug_enabled, bool vf_aigt_abort_on_f (abort,"Failed to restore initial driver state\n" ); } -igt_main +igt_main() {bool eudebug_enabled;bool vf_autoprobe;
tests/intel/xe_evict.c +1 -1
@@ -676,7 +676,7 @@ static unsigned int working_set(uint64_t vram_size, uint64_t system_size,* sections exists which cover multiple compute VM, multiple non-compute VMs, * and mixing of VMs. */ -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe; const struct section {
tests/intel/xe_exec_atomic.c +1 -1
@@ -123,7 +123,7 @@ static bool has_atomics(int fd, uint32_t region)return true; } -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe;int fd;
tests/intel/xe_exec_balancer.c +1 -1
@@ -560,7 +560,7 @@ test_cm(int fd, int gt, int class, int n_exec_queues, int n_execs, } -igt_main +igt_main() { const struct section { const char *name;
tests/intel/xe_exec_basic.c +1 -1
@@ -314,7 +314,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci, } } -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe; const struct section {
tests/intel/xe_exec_capture.c +1 -1
@@ -404,7 +404,7 @@ static void test_card(int fd)regfree (®ex); } -igt_main +igt_main() {int xe;struct drm_xe_engine_class_instance *hwe;
tests/intel/xe_exec_compute_mode.c +1 -1
@@ -401,7 +401,7 @@ static void lr_mode_workload(int fd)put_ahnd (ahnd); } -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe; const struct section {
tests/intel/xe_exec_fault_mode.c +1 -1
@@ -398,7 +398,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance *eci,close (map_fd); } -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe; const struct section {
tests/intel/xe_exec_mix_modes.c +1 -1
@@ -256,7 +256,7 @@ test_exec(int fd, struct drm_xe_engine_class_instance *hwe,run_job (fd, hwe, engine_execution_mode, job_type, true,NULL ); } -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe; const struct section {
tests/intel/xe_exec_queue_property.c +1 -1
@@ -201,7 +201,7 @@ static void invalid_property(int xe) to_user_pointer(&ext), &exec_queue_id), 0); } -igt_main +igt_main() { static const struct { const char *name;
tests/intel/xe_exec_reset.c +1 -1
@@ -770,7 +770,7 @@ static void threads(int fd, int n_exec_queues, int n_execs, unsigned int flags)free (threads_data); } -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe; const struct section {
tests/intel/xe_exec_sip.c +1 -1
@@ -309,7 +309,7 @@ static void test_sip(enum shader_type shader_type, enum sip_type sip_type,igt_dynamic_f ("%s%d" ,xe_engine_class_string (__eci->engine_class), \ __eci->engine_instance) -igt_main +igt_main() {struct drm_xe_engine_class_instance *eci;int fd;
tests/intel/xe_exec_sip_eudebug.c +1 -1
@@ -314,7 +314,7 @@ static void test_sip(enum shader_type shader_type, enum sip_type sip_type,igt_dynamic_f ("%s%d" ,xe_engine_class_string (__eci->engine_class), \ __eci->engine_instance) -igt_main +igt_main() {struct drm_xe_engine_class_instance *eci;bool was_enabled;
tests/intel/xe_exec_store.c +1 -1
@@ -412,7 +412,7 @@ static void long_shader(int fd, struct drm_xe_engine_class_instance *hwe,free (buf); } -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe;int fd;
tests/intel/xe_exec_system_allocator.c +1 -1
@@ -2216,7 +2216,7 @@ struct section {uint8_t (*fn)(int pat); }; -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe;const struct section sections[] = {
tests/intel/xe_exec_threads.c +1 -1
@@ -1109,7 +1109,7 @@ static void threads(int fd, int flags)pthread_barrier_destroy (&barrier); } -igt_main +igt_main() { const struct section { const char *name;
tests/intel/xe_gt_freq.c +1 -1
@@ -393,7 +393,7 @@ static void test_spin(int fd, struct drm_xe_engine_class_instance *eci, bool fixxe_vm_destroy (fd, vm); } -igt_main +igt_main() {int fd;int gt;
tests/intel/xe_huc_copy.c +1 -1
@@ -191,7 +191,7 @@ is_huc_running(int fd)return false; } -igt_main +igt_main() {int xe;
tests/intel/xe_live_ktest.c +1 -1
@@ -53,7 +53,7 @@ static const char *live_tests[] = {"xe_eudebug" , }; -igt_main +igt_main() {int i;
tests/intel/xe_media_fill.c +1 -1
@@ -115,7 +115,7 @@ static void media_fill(struct data_t *data, igt_fillfunc_t fill)munmap (ptr, buf->surface[0 ].size); } -igt_main +igt_main() {struct data_t data = {0 , };igt_fillfunc_t fill_fn =NULL ;
tests/intel/xe_mmap.c +1 -1
@@ -440,7 +440,7 @@ static void prepare_pci_membarrier_test(int fd, int *fw_ptr)igt_assert_lte (0 , *fw_ptr); } -igt_main +igt_main() {int fd;
tests/intel/xe_module_load.c +1 -1
@@ -116,7 +116,7 @@ static const char * const unwanted_drivers[] = {* SUBTEST: many-reload * Description: Reload the Xe driver many times */ -igt_main +igt_main() {igt_describe ("Check if xe and friends are not yet loaded, then load them." ); igt_subtest("load") {
tests/intel/xe_noexec_ping_pong.c +1 -1
@@ -95,7 +95,7 @@ static void test_ping_pong(int fd, struct drm_xe_engine *engine)static int fd;IGT_TEST_DESCRIPTION ("Expose compute VM's unnecessary rebinds" ); -igt_main +igt_main() {igt_fixture () fd = drm_open_driver(DRIVER_XE);
tests/intel/xe_pm.c +1 -1
@@ -871,7 +871,7 @@ static void i2c_test(device_t device, int sysfs_fd, enum igt_acpi_d_state d_statclose (i2c_fd); } -igt_main +igt_main() {device_t device;uint32_t d3cold_allowed;
tests/intel/xe_pm_residency.c +1 -1
@@ -370,7 +370,7 @@ static void cpg_gt_toggle(int fd)powergate_status (fd, gt,"down" ); } -igt_main +igt_main() {uint32_t d3cold_allowed;int fd, gt;
tests/intel/xe_pmu.c +1 -1
@@ -1056,7 +1056,7 @@ static void restore_gt_freq(int fd, uint32_t *stash_min, uint32_t *stash_max)free (stash_max); } -igt_main +igt_main() {int fd, gt, num_engines;struct drm_xe_engine_class_instance *eci;
tests/intel/xe_prime_self_import.c +1 -1
@@ -514,7 +514,7 @@ static void test_llseek_bad(void)drm_close_driver (fd); } -igt_main +igt_main() {struct {const char *name;
tests/intel/xe_pxp.c +1 -1
@@ -1102,7 +1102,7 @@ static void exit_handler(int sig)usleep (50 *1000 );/* give time for the termination to be processed */ } -igt_main +igt_main() {bool pxp_supported = true;drmModeResPtr res;
tests/intel/xe_query.c +1 -1
@@ -1117,7 +1117,7 @@ static void test_query_pxp_status(int fd)free (qpxp); } -igt_main +igt_main() { const struct { const char *name;
tests/intel/xe_spin_batch.c +1 -1
@@ -526,7 +526,7 @@ static void xe_spin_timestamp_check(int fd, struct drm_xe_engine_class_instancerun_spinner (fd, eci); } -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe;int fd;
tests/intel/xe_sriov_flr.c +1 -1
@@ -1023,7 +1023,7 @@ static void clear_tests(int pf_fd, int num_vfs, flr_exec_strategy exec_strategy)verify_flr (pf_fd, num_vfs, checks, num_checks, exec_strategy); } -igt_main +igt_main() {int pf_fd;bool autoprobe;
tests/intel/xe_survivability.c +1 -1
@@ -207,7 +207,7 @@ static void test_spinner_after_recovery(int fd)put_ahnd (ahnd); } -igt_main +igt_main() {int fd, configfs_fd, configfs_device_fd;struct pci_device *pci_xe;
tests/intel/xe_sysfs_defaults.c +1 -1
@@ -58,7 +58,7 @@ static void test_defaults(int xe, int engine, const char **property,closedir (dir); } -igt_main +igt_main() {int xe, sys_fd;int gt;
tests/intel/xe_sysfs_preempt_timeout.c +1 -1
@@ -173,7 +173,7 @@ static void test_timeout(int fd, int engine, const char **property, uint16_t cla }#define MAX_GTS 8 -igt_main +igt_main() { static const struct { const char *name;
tests/intel/xe_sysfs_scheduler.c +1 -1
@@ -219,7 +219,7 @@ static void test_invalid_large_string(int xe, int engine, const char **property, }#define MAX_GTS 8 -igt_main +igt_main() { static const struct { const char *name;
tests/intel/xe_sysfs_timeslice_duration.c +1 -1
@@ -149,7 +149,7 @@ static void test_timeout(int fd, int engine, const char **property, uint16_t cla }#define MAX_GTS 8 -igt_main +igt_main() { static const struct { const char *name;
tests/intel/xe_tlb.c +1 -1
@@ -128,7 +128,7 @@ static void tlb_invalidation(int fd, struct drm_xe_engine_class_instance *eci)xe_vm_destroy (fd, vm); } -igt_main +igt_main() {int fd;struct drm_xe_engine *engine;
tests/intel/xe_vm.c +1 -1
@@ -2450,7 +2450,7 @@ static void test_oom(int fd) } } -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe, *hwe_non_copy =NULL ;uint64_t bind_size;
tests/intel/xe_waitfence.c +1 -1
@@ -275,7 +275,7 @@ exec_queue_reset_wait(int fd) } } -igt_main +igt_main() {int fd;
tests/intel/xe_wedged.c +1 -1
@@ -208,7 +208,7 @@ simple_hang(int fd, struct drm_xe_sync *sync)* SUBTEST: basic-wedged-read * Description: Read wedged_mode debugfs */ -igt_main +igt_main() {struct drm_xe_engine_class_instance *hwe;int fd;
tests/kms_3d.c +1 -1
@@ -40,7 +40,7 @@IGT_TEST_DESCRIPTION ("Tests 3D mode setting." ); -igt_main +igt_main() {int drm_fd;drmModeRes *res;
tests/kms_addfb_basic.c +1 -1
@@ -982,7 +982,7 @@ static bool has_addfb2_iface(int fd)int fd; -igt_main +igt_main() { igt_fixture() { fd =drm_open_driver_master (DRIVER_ANY );
tests/kms_async_flips.c +1 -1
@@ -1065,7 +1065,7 @@ static void run_test_with_modifiers(data_t *data, void (*test)(data_t *))static data_t data; -igt_main +igt_main() {int i;
tests/kms_atomic_interruptible.c +1 -1
@@ -321,7 +321,7 @@ static bool pipe_output_combo_valid(igt_display_t *display,return ret; } -igt_main +igt_main() {igt_display_t display;igt_output_t *output;
tests/kms_bw.c +1 -1
@@ -259,7 +259,7 @@ static void run_test_linear_tiling(data_t *data, int pipe, const drmModeModeInfotest_fini (data); } -igt_main +igt_main() {data_t data;int i =0 , j =0 ;
tests/kms_color.c +1 -1
@@ -1171,7 +1171,7 @@ run_tests_for_pipe(data_t *data) } } -igt_main +igt_main() {data_t data = {};
tests/kms_content_protection.c +1 -1
@@ -980,7 +980,7 @@ static const struct { }, }; -igt_main +igt_main() { igt_fixture() { data.drm_fd =drm_open_driver_master (DRIVER_ANY );
tests/kms_cursor_legacy.c +1 -1
@@ -1824,7 +1824,7 @@ static void modeset_atomic_cursor_hotspot(igt_display_t *display)igt_remove_fb (display->drm_fd, &cursor_fb); } -igt_main +igt_main() {const int ncpus =sysconf (_SC_NPROCESSORS_ONLN);igt_display_t display = { .drm_fd =-1 };
tests/kms_debugfs.c +1 -1
@@ -94,7 +94,7 @@ static void igt_display_all_off(igt_display_t *display)IGT_TEST_DESCRIPTION ("Read entries from debugfs with display on/off." ); -igt_main +igt_main() {int debugfs =-1 ;igt_display_t display;
tests/kms_display_modes.c +1 -1
@@ -227,7 +227,7 @@ static void run_extendedmode_test(data_t *data) { } } -igt_main +igt_main() {int dp_mst_outputs =0 , count =0 ;igt_output_t *output;
tests/kms_dither.c +1 -1
@@ -236,7 +236,7 @@ run_dither_test(data_t *data, int fb_bpc, int fb_format, int output_bpc) } } -igt_main +igt_main() {struct {int fb_bpc;
tests/kms_feature_discovery.c +1 -1
@@ -71,7 +71,7 @@ static igt_display_t display;IGT_TEST_DESCRIPTION ("A metatest that checks for \"features\" presence. " "The subtests here should only skip or pass, " "anything else means we have a serious problem." ); -igt_main { +igt_main() {igt_fd_t (debugfs_fd);igt_fd_t (fd);
tests/kms_flip_event_leak.c +1 -1
@@ -103,7 +103,7 @@ static void test(data_t *data, enum pipe pipe, igt_output_t *output)igt_remove_fb (data->drm_fd, &fb[0 ]); } -igt_main +igt_main() {data_t data = {};igt_output_t *output;
tests/kms_getfb.c +1 -1
@@ -425,7 +425,7 @@ static void test_handle_protection(void) { } } -igt_main +igt_main() {int fd;igt_display_t display;
tests/kms_hdmi_inject.c +1 -1
@@ -211,7 +211,7 @@ hdmi_inject_audio(int drm_fd, drmModeConnector *connector)kmstest_force_edid (drm_fd, connector,NULL ); } -igt_main +igt_main() {int drm_fd;drmModeRes *res;
tests/kms_hdr.c +1 -1
@@ -799,7 +799,7 @@ static void test_hdr(data_t *data, uint32_t flags) } } -igt_main +igt_main() {data_t data = {};
tests/kms_invalid_mode.c +1 -1
@@ -334,7 +334,7 @@ static const struct {static data_t data; -igt_main +igt_main() {enum pipe pipe;
tests/kms_lease.c +1 -1
@@ -1239,7 +1239,7 @@ static void lease_uevent(data_t *data)igt_cleanup_uevents (uevent_monitor); } -igt_main +igt_main() {data_t data;igt_output_t *output;
tests/kms_multipipe_modeset.c +1 -1
@@ -142,7 +142,7 @@ static void test_multipipe(data_t *data, int num_pipes)run_test (data, valid_outputs); } -igt_main +igt_main() {data_t data;drmModeResPtr res;
tests/kms_panel_fitting.c +1 -1
@@ -281,7 +281,7 @@ static void test_panel_fitting(data_t *data, enum test_type type) } } -igt_main +igt_main() {data_t data = {};
tests/kms_plane_cursor.c +1 -1
@@ -284,7 +284,7 @@ static void test_cursor(data_t *data, int size, unsigned int flags)test_cursor_spots (data, size, flags); } -igt_main +igt_main() {static const int cursor_sizes[] = {64 ,128 ,256 };data_t data = { .max_curw =64 , .max_curh =64 };
tests/kms_plane_lowres.c +1 -1
@@ -338,7 +338,7 @@ static const struct { }, }; -igt_main +igt_main() {data_t data = {};
tests/kms_prime.c +1 -1
@@ -551,7 +551,7 @@ static void kms_poll_disable(void)close (sysfs_fd); } -igt_main +igt_main() {int first_fd =-1 ;int second_fd_vgem =-1 ;
tests/kms_prop_blob.c +1 -1
@@ -345,7 +345,7 @@ static void prop_tests(int fd)destroy_prop (fd, blob_id); } -igt_main +igt_main() {int fd;
tests/kms_properties.c +1 -1
@@ -820,7 +820,7 @@ static void invalid_properties(igt_display_t *display, bool atomic)test_object_invalid_properties (display, output->id,DRM_MODE_OBJECT_CONNECTOR , atomic); } -igt_main +igt_main() {igt_display_t display;int i;
tests/kms_rmfb.c +1 -1
@@ -190,7 +190,7 @@ run_rmfb_test(struct rmfb_data *data, bool reopen) } } -igt_main +igt_main() { const struct { bool reopen;
tests/kms_scaling_modes.c +1 -1
@@ -130,7 +130,7 @@ static void test_scaling_mode(data_t *data, uint32_t flags) } } -igt_main +igt_main() {data_t data = {};
tests/kms_selftest.c +1 -1
@@ -49,7 +49,7 @@IGT_TEST_DESCRIPTION ("Basic sanity check of KMS selftests." ); -igt_main +igt_main() {static const char *kunit_subtests[] = {"drm_cmdline_parser_test" ,
tests/kms_sequence.c +1 -1
@@ -268,7 +268,7 @@ static void sequence_queue(data_t *data, int fd, int nchildren) frame_time * 1000.0, 1.0/frame_time); } -igt_main +igt_main() {int fd;igt_output_t *output;
tests/kms_tiled_display.c +1 -1
@@ -566,7 +566,7 @@ static void basic_test(data_t *data, drmEventContext *drm_event, struct pollfd * } } -igt_main +igt_main() {data_t data = {0 };struct pollfd pfd = {0 };
tests/kms_tv_load_detect.c +1 -1
@@ -39,7 +39,7 @@IGT_TEST_DESCRIPTION ("Check tv load detection works correctly." ); -igt_main +igt_main() {/* force the VGA output and test that it worked */ int drm_fd =0 ;
tests/kms_universal_plane.c +1 -1
@@ -891,7 +891,7 @@ run_tests(data_t *data) } } -igt_main +igt_main() {data_t data;
tests/meta_test.c +1 -1
@@ -117,7 +117,7 @@ static void test_panic(void)system ("echo c > /proc/sysrq-trigger" ); } -igt_main +igt_main() { igt_fixture() {
tests/msm/msm_mapping.c +1 -1
@@ -262,7 +262,7 @@ do_mapping_test(struct msm_pipe *pipe, const char *buffername, bool write)* Tests for drm/msm hangcheck, recovery, and fault handling */ -igt_main +igt_main() {struct msm_device *dev =NULL ;struct msm_pipe *pipe =NULL ;
tests/msm/msm_recovery.c +1 -1
@@ -215,7 +215,7 @@ do_fault_test(struct msm_pipe *pipe, bool stress)* Tests for drm/msm hangcheck, recovery, and fault handling */ -igt_main +igt_main() {static struct msm_pipe *pipe =NULL ;
tests/msm/msm_shrink.c +1 -1
@@ -243,7 +243,7 @@ static void run_test(int nchildren, uint64_t alloc_size_mb, unsigned num_bos,static const unsigned num_bos[] = {8 ,32 }; -igt_main +igt_main() {struct msm_device *dev =NULL ;uint64_t alloc_size_mb =0 ;
tests/msm/msm_submit.c +1 -1
@@ -24,7 +24,7 @@#include "igt.h" #include "igt_msm.h" -igt_main +igt_main() {struct msm_device *dev =NULL ;struct msm_pipe *pipe =NULL ;
tests/msm/msm_submitoverhead.c +1 -1
@@ -14,7 +14,7 @@#define MAX_BOS 1000 -igt_main +igt_main() {struct msm_device *dev =NULL ;struct msm_pipe *pipe =NULL ;
tests/nouveau_crc.c +1 -1
@@ -318,7 +318,7 @@ static void test_source_outp_inactive(data_t *data)data_t data = {0 };#define pipe_test (name) igt_subtest_f("pipe-%s-" name, kmstest_pipe_name(pipe)) -igt_main +igt_main() {int pipe;
tests/panfrost/panfrost_gem_new.c +1 -1
@@ -35,7 +35,7 @@#include <sys/ioctl.h> #include "panfrost_drm.h" -igt_main +igt_main() {int fd;
tests/panfrost/panfrost_get_param.c +1 -1
@@ -36,7 +36,7 @@#include <poll.h> #include "panfrost_drm.h" -igt_main +igt_main() {int fd;
tests/panfrost/panfrost_prime.c +1 -1
@@ -55,7 +55,7 @@ static bool igt_has_prime(int fd, uint64_t flags)return (value & flags) == flags; } -igt_main +igt_main() {int fd, kms_fd;
tests/panfrost/panfrost_submit.c +1 -1
@@ -62,7 +62,7 @@ static void check_done(struct mali_job_descriptor_header *header)igt_assert (header->exception_status ==1 && header->fault_pointer ==0 ); } -igt_main +igt_main() {int fd;
tests/panthor/panthor_gem.c +1 -1
@@ -7,7 +7,7 @@#include "igt_core.h" #include "igt_panthor.h" -igt_main { +igt_main() {int fd; igt_fixture() {
tests/panthor/panthor_group.c +1 -1
@@ -40,7 +40,7 @@ issue_store_multiple(uint8_t *cs, uint64_t kernel_va, uint32_t constant)return sizeof (instrs); } -igt_main { +igt_main() {int fd; igt_fixture() {
tests/panthor/panthor_query.c +1 -1
@@ -7,7 +7,7 @@#include "panthor_drm.h" #include <stdint.h> -igt_main { +igt_main() {int fd; igt_fixture() {
tests/panthor/panthor_vm.c +1 -1
@@ -6,7 +6,7 @@#include "igt_panthor.h" #include "panthor_drm.h" -igt_main { +igt_main() {int fd; igt_fixture() {
tests/prime_nv_api.c +1 -1
@@ -346,7 +346,7 @@ static void test_nv_self_import_to_different_fd(void)nouveau_bo_ref (NULL , &nvbo2); } -igt_main +igt_main() { igt_fixture() {find_and_open_devices ();
tests/prime_nv_pcopy.c +1 -1
@@ -860,7 +860,7 @@ static void test_semaphore(void)gem_close (intel_fd, intel_handle); } -igt_main +igt_main() { igt_fixture() {find_and_open_devices ();
tests/prime_nv_test.c +1 -1
@@ -352,7 +352,7 @@ static void test_i915_blt_fill_nv_read(void)/* test 9 nouveau copy engine?? */ -igt_main +igt_main() { igt_fixture() {igt_assert (find_and_open_devices () ==0 );
tests/prime_vgem.c +1 -1
@@ -1146,7 +1146,7 @@ static void test_each_engine(const char *name, int vgem, int i915,intel_ctx_destroy (i915, ctx); } -igt_main +igt_main() {int i915 =-1 ;int vgem =-1 ;
tests/sriov_basic.c +1 -1
@@ -118,7 +118,7 @@ static void bind_unbind_vf(int pf_fd, unsigned int vf_num)igt_sriov_disable_vfs (pf_fd); } -igt_main +igt_main() {int pf_fd;bool autoprobe;
tests/sw_sync.c +1 -1
@@ -878,7 +878,7 @@ static void test_sync_random_merge(void)close (timeline_arr[i]); } -igt_main +igt_main() { igt_fixture() {igt_require_sw_sync ();
tests/syncobj_basic.c +1 -1
@@ -219,7 +219,7 @@ static bool has_syncobj(int fd)return value ? true : false; } -igt_main +igt_main() {int fd =-1 ;
tests/syncobj_eventfd.c +1 -1
@@ -277,7 +277,7 @@ test_wait_signaled(int fd, bool use_timeline)syncobj_destroy (fd, syncobj); } -igt_main +igt_main() {int fd =-1 , i;
tests/syncobj_timeline.c +1 -1
@@ -1695,7 +1695,7 @@ has_syncobj_timeline_wait(int fd)return ret ==-1 && errno ==ENOENT ; } -igt_main +igt_main() {int fd =-1 ;
tests/syncobj_wait.c +1 -1
@@ -905,7 +905,7 @@ has_syncobj_wait(int fd)return ret ==-1 && errno ==ENOENT ; } -igt_main +igt_main() {int fd =-1 ;
tests/template.c +1 -1
@@ -58,7 +58,7 @@ static void test_B(int fd)int drm_fd; -igt_main +igt_main() { igt_fixture() { drm_fd =drm_open_driver (DRIVER_ANY );
tests/tools_test.c +1 -1
@@ -94,7 +94,7 @@ static bool chdir_to_tools_dir(void)return chdir (TOOLS ) ==0 ||chdir ("../../bin" ) ==0 ; } -igt_main +igt_main() { igt_fixture() {char *path;
tests/v3d/v3d_create_bo.c +1 -1
@@ -8,7 +8,7 @@IGT_TEST_DESCRIPTION ("Tests for the V3D's Create BO IOCTL" ); -igt_main +igt_main() {int fd;
tests/v3d/v3d_get_bo_offset.c +1 -1
@@ -26,7 +26,7 @@IGT_TEST_DESCRIPTION ("Tests for the V3D's get BO offset IOCTL" ); -igt_main +igt_main() {int fd;
tests/v3d/v3d_get_param.c +1 -1
@@ -26,7 +26,7 @@IGT_TEST_DESCRIPTION ("Tests for the V3D's get params IOCTL" ); -igt_main +igt_main() {int fd;
tests/v3d/v3d_job_submission.c +1 -1
@@ -58,7 +58,7 @@ static void *create_csd_jobs(void *args)return NULL ; } -igt_main +igt_main() { igt_fixture() { fd =drm_open_driver (DRIVER_V3D );
tests/v3d/v3d_mmap.c +1 -1
@@ -26,7 +26,7 @@IGT_TEST_DESCRIPTION ("Tests for the V3D's mmap IOCTL" ); -igt_main +igt_main() {int fd;
tests/v3d/v3d_perfmon.c +1 -1
@@ -8,7 +8,7 @@IGT_TEST_DESCRIPTION ("Tests for the V3D's performance monitors" ); -igt_main +igt_main() {int fd;
tests/v3d/v3d_submit_cl.c +1 -1
@@ -27,7 +27,7 @@ short_timeout(void)return gettime_ns () +SHORT_TIME_NSEC ; } -igt_main +igt_main() {int fd;
tests/v3d/v3d_submit_csd.c +1 -1
@@ -29,7 +29,7 @@ short_timeout(void)return gettime_ns () +SHORT_TIME_NSEC ; } -igt_main +igt_main() {int fd;
tests/v3d/v3d_wait_bo.c +1 -1
@@ -24,7 +24,7 @@ static void test_used_bo(int fd, struct v3d_bo *bo, uint64_t timeout)igt_assert (ret ==0 || (ret ==-1 && errno ==ETIME )); } -igt_main +igt_main() {int fd;struct v3d_bo *bo;
tests/vc4/vc4_create_bo.c +1 -1
@@ -24,7 +24,7 @@#include "igt.h" #include "igt_vc4.h" -igt_main +igt_main() {int fd;
tests/vc4/vc4_dmabuf_poll.c +1 -1
@@ -55,7 +55,7 @@ poll_write_bo_test(int fd, int poll_flag)gem_close (fd, handle); } -igt_main +igt_main() {int fd;
tests/vc4/vc4_label_bo.c +1 -1
@@ -39,7 +39,7 @@ set_label(int fd, int handle, const char *name, int err)do_ioctl (fd,DRM_IOCTL_VC4_LABEL_BO , &label); } -igt_main +igt_main() {int fd;
tests/vc4/vc4_lookup_fail.c +1 -1
@@ -25,7 +25,7 @@#include "igt_vc4.h" #include "vc4_packet.h" -igt_main +igt_main() {int fd;
tests/vc4/vc4_mmap.c +1 -1
@@ -8,7 +8,7 @@IGT_TEST_DESCRIPTION ("Tests for the VC4's mmap IOCTL" ); -igt_main +igt_main() {int fd;
tests/vc4/vc4_perfmon.c +1 -1
@@ -8,7 +8,7 @@IGT_TEST_DESCRIPTION ("Tests for the VC4's performance monitors" ); -igt_main +igt_main() {int fd;
tests/vc4/vc4_purgeable_bo.c +1 -1
@@ -94,7 +94,7 @@ static void igt_vc4_purgeable_subtest_prepare(int fd, struct igt_list_head *listigt_assert (!igt_list_empty (list)); } -igt_main +igt_main() {struct igt_vc4_bo *bo;struct igt_list_head list;
tests/vc4/vc4_tiling.c +1 -1
@@ -24,7 +24,7 @@#include "igt.h" #include "igt_vc4.h" -igt_main +igt_main() {int fd;
tests/vc4/vc4_wait_bo.c +1 -1
@@ -57,7 +57,7 @@ test_used_bo(int fd, uint64_t timeout)gem_close (fd, handle); } -igt_main +igt_main() {int fd;int bo_handle;
tests/vc4/vc4_wait_seqno.c +1 -1
@@ -24,7 +24,7 @@#include "igt.h" #include "igt_vc4.h" -igt_main +igt_main() {int fd;
tests/vgem_basic.c +1 -1
@@ -489,7 +489,7 @@ static bool has_prime_export(int fd)return value &DRM_PRIME_CAP_EXPORT ; } -igt_main +igt_main() {int fd =-1 ;
tests/vgem_slow.c +1 -1
@@ -85,7 +85,7 @@ static void test_nohang(int fd)gem_close (fd, bo.handle); } -igt_main +igt_main() {int fd =-1 ;
tests/vkms/vkms_configfs.c +1 -1
@@ -1895,7 +1895,7 @@ static void test_enabled_connector_hot_plug(void)igt_vkms_device_destroy (dev); } -igt_main +igt_main() {struct {const char *name;
tests/vmwgfx/vmw_mob_stress.c +1 -1
@@ -45,7 +45,7 @@ static void test_triangle_render(struct vmw_svga_device *device, int32 cid)vmw_destroy_default_objects (device, &objects); } -igt_main +igt_main() {struct vmw_svga_device device;int32 cid;
tests/vmwgfx/vmw_prime.c +1 -1
@@ -503,7 +503,7 @@ static void test_vgem(struct gpu_process_t *gpu, int vgem_fd)gem_close (gpu->mdevice.drm_fd, vmw_buffer_handle); } -igt_main +igt_main() {struct gpu_process_t gpu = {0 };int second_fd_vgem =-1 ;
tests/vmwgfx/vmw_ref_count.c +1 -1
@@ -86,7 +86,7 @@ static bool ref_surface_and_check_contents(int32 fd, uint32 surface_handle)return data_valid; } -igt_main +igt_main() {int32 fd1, fd2;const uint32 size =sizeof (data);
tests/vmwgfx/vmw_surface_copy.c +1 -1
@@ -306,7 +306,7 @@ static void test_invalid_copies_3d(int fd, int32 cid)vmw_ioctl_surface_unref (fd, s2); } -igt_main +igt_main() {int fd;int32 cid;
tests/vmwgfx/vmw_tri.c +1 -1
@@ -180,7 +180,7 @@ static void draw_triangle_on_coherent_rt(struct vmw_svga_device *device,vmw_destroy_default_objects (device, &objects); } -igt_main +igt_main() {struct vmw_svga_device device;int32 cid;
Signature · 1 line
2.49.1
PATCH 4/7 igt: Make igt_simple_main look more like a function
In reply to Ville SyrjalaFrom: Ville Syrjälä <[email protected]>
Turn igt_simple_main into igt_simple_main(). This is a step towads allowing coccinelle to parse it.
Conversion done via:
$ find -type f -name \*.[ch] -exec sed -i 's/\([^_]\?\)igt_simple_main\([^_(]\|$\)/\1igt_simple_main()\2/g' {} +--- benchmarks/kms_fb_stress.c | 2 +- lib/igt_core.c | 16 ++++++++-------- lib/igt_core.h | 6 +++--- lib/igt_kmod.c | 2 +- lib/tests/igt_can_fail_simple.c | 2 +- lib/tests/igt_edid.c | 2 +- lib/tests/igt_facts.c | 2 +- lib/tests/igt_simple_test_subtests.c | 2 +- lib/tests/igt_stats.c | 2 +- lib/tests/igt_timeout.c | 2 +- runner/testdata/abort-simple.c | 2 +- runner/testdata/no-subtests.c | 2 +- tests/core_setmaster_vs_auth.c | 2 +- tests/intel/gem_exec_lut_handle.c | 2 +- tests/intel/gem_fd_exhaustion.c | 2 +- tests/intel/gem_gtt_cpu_tlb.c | 2 +- tests/intel/gem_gtt_hog.c | 2 +- tests/intel/gem_lut_handle.c | 2 +- tests/intel/gem_media_vme.c | 2 +- tests/intel/gem_pwrite_snooped.c | 2 +- tests/intel/gem_set_tiling_vs_gtt.c | 2 +- tests/intel/gem_set_tiling_vs_pwrite.c | 2 +- tests/intel/gem_tiled_pread_basic.c | 2 +- tests/intel/gem_tiled_pread_pwrite.c | 2 +- tests/intel/gem_tiled_wb.c | 2 +- tests/intel/gem_tiled_wc.c | 2 +- tests/intel/gem_tiling_max_stride.c | 2 +- tests/intel/gem_unfence_active_buffers.c | 2 +- tests/intel/gem_unref_active_buffers.c | 2 +- tests/intel/gen3_mixed_blits.c | 2 +- tests/intel/gen3_render_linear_blits.c | 2 +- tests/intel/gen3_render_mixed_blits.c | 2 +- tests/intel/gen3_render_tiledx_blits.c | 2 +- tests/intel/gen3_render_tiledy_blits.c | 2 +- tests/intel/i915_pciid.c | 2 +- tests/intel/kms_fence_pin_leak.c | 2 +- tests/intel/kms_pwrite_crc.c | 2 +- tests/kms_dp_aux_dev.c | 2 +- tests/kms_sysfs_edid_timing.c | 2 +- tests/prime_udl.c | 2 +- 40 files changed, 49 insertions(+), 49 deletions(-)
benchmarks/kms_fb_stress.c +1 -1
@@ -139,7 +139,7 @@ static struct kms_t default_kms = { }; -igt_simple_main +igt_simple_main() {struct data_t data = {0 };enum pipe pipe =PIPE_NONE ;
lib/igt_core.c +8 -8
@@ -772,7 +772,7 @@ bool __igt_fixture(void)internal_assert (!in_subtest,"nesting igt_fixture() in igt_subtest is invalid\n" );internal_assert (test_with_subtests, -"igt_fixture() in igt_simple_main is invalid\n" ); +"igt_fixture() in igt_simple_main() is invalid\n" );if (igt_only_list_subtests ())return false;
@@ -1627,7 +1627,7 @@ bool igt_only_list_subtests(void)void __igt_subtest_group_save (int *save,int *desc) {internal_assert (test_with_subtests, -"igt_subtest_group() is not allowed in igt_simple_main\n" ); +"igt_subtest_group() is not allowed in igt_simple_main()\n" );if (__current_description[0 ] !='\0' ) {struct description_node *new =calloc (1 ,sizeof (*new));
@@ -1805,7 +1805,7 @@ void igt_skip(const char *f, ...) skip_subtests_henceforth =SKIP ;internal_assert (in_fixture,"skipping is allowed only in fixtures, subtests" -" or igt_simple_main\n" ); +" or igt_simple_main()\n" );__igt_fixture_end (); }else { igt_exitcode =IGT_EXIT_SKIP ;
@@ -1938,7 +1938,7 @@ void igt_fail(int exitcode)exit_subtest ("FAIL" ); }else {internal_assert (igt_can_fail (),"failing test is only allowed" -" in fixtures, subtests and igt_simple_main\n" ); +" in fixtures, subtests and igt_simple_main()\n" );if (in_fixture) { skip_subtests_henceforth =FAIL ;
@@ -1975,7 +1975,7 @@ void igt_fatal_error(void)* igt_can_fail: * * Returns true if called from either an #igt_fixture(), #igt_subtest or a -* testcase without subtests, i.e. #igt_simple_main. Returns false otherwise. In +* testcase without subtests, i.e. #igt_simple_main(). Returns false otherwise. In * other words, it checks whether it's legal to call igt_fail(), igt_skip_on() * and all the convenience macros build around those. *
@@ -2362,7 +2362,7 @@ void __igt_abort(const char *domain, const char *file, const int line,* * It is an error to normally exit a test calling igt_exit() - without it the * result reporting will be wrong. To avoid such issues it is highly recommended -* to use #igt_main() or #igt_simple_main instead of a hand-rolled main() function. +* to use #igt_main() or #igt_simple_main() instead of a hand-rolled main() function. */ void igt_exit (void ) {
@@ -2598,7 +2598,7 @@ static pthread_mutex_t print_mutex = PTHREAD_MUTEX_INITIALIZER;bool __igt_fork (void ) {internal_assert (!test_with_subtests || in_subtest, -"forking is only allowed in subtests or igt_simple_main\n" ); +"forking is only allowed in subtests or igt_simple_main()\n" );internal_assert (!test_child,"forking is not allowed from already forked children\n" );
@@ -2654,7 +2654,7 @@ static void dyn_children_exit_handler(int sig)bool __igt_multi_fork (void ) {internal_assert (!test_with_subtests || in_subtest, -"multi-forking is only allowed in subtests or igt_simple_main\n" ); +"multi-forking is only allowed in subtests or igt_simple_main()\n" );internal_assert (!test_child,"multi-forking is not allowed from already forked children\n" ); internal_assert(!test_multi_fork_child,
lib/igt_core.h +3 -3
@@ -461,7 +461,7 @@ void igt_simple_init_parse_opts(int *argc, char **argv,* This initializes a simple test without any support for subtests. * * If there's not a reason to the contrary it's less error prone to just use an -* #igt_simple_main block instead of stitching the test's main() function together +* #igt_simple_main() block instead of stitching the test's main() function together * manually. */ #define igt_simple_init (argc, argv) \
@@ -494,12 +494,12 @@ void igt_simple_init_parse_opts(int *argc, char **argv,/** -* igt_simple_main: +* igt_simple_main(): * * This is a magic control flow block used instead of a main() function for * simple tests. Open-coding the main() function is not recommended. */ -#define igt_simple_main igt_simple_main_args(NULL, NULL, NULL, NULL, NULL) +#define igt_simple_main () igt_simple_main_args(NULL, NULL, NULL, NULL, NULL)/** * igt_constructor:
lib/igt_kmod.c +1 -1
@@ -1211,7 +1211,7 @@ void igt_kunit(const char *module_name, const char *suite, const char *opts)/* * We need to use igt_subtest here, as otherwise it may crash with: -* "skipping is allowed only in fixtures, subtests or igt_simple_main" +* "skipping is allowed only in fixtures, subtests or igt_simple_main()" * if used on igt_main(). This is also needed in order to provide * proper namespace for dynamic subtests, with is required for CI * and for documentation.
lib/tests/igt_can_fail_simple.c +1 -1
@@ -26,7 +26,7 @@#include "igt_tests_common.h" -igt_simple_main +igt_simple_main() {internal_assert (igt_can_fail ()); }
lib/tests/igt_edid.c +1 -1
@@ -66,7 +66,7 @@ static bool edid_block_checksum(const unsigned char *raw_edid)typedef const struct edid *(*get_edid_func )(void ); -igt_simple_main +igt_simple_main() { const struct { const char *desc;
lib/tests/igt_facts.c +1 -1
@@ -10,7 +10,7 @@/* Tests are not defined here so we can keep most of the functions static */ -igt_simple_main +igt_simple_main() {igt_info ("Running igt_facts_test\n" );
lib/tests/igt_simple_test_subtests.c +1 -1
@@ -23,7 +23,7 @@#include "igt_core.h" -igt_simple_main +igt_simple_main() { igt_subtest("subtest") {igt_info ("Invalid subtest.\n" );
lib/tests/igt_stats.c +1 -1
@@ -228,7 +228,7 @@ static void test_reallocation(void)igt_stats_fini (&stats); } -igt_simple_main +igt_simple_main() {test_init_zero ();test_init ();
lib/tests/igt_timeout.c +1 -1
@@ -1,7 +1,7 @@#include "igt_core.h" #include <unistd.h> -igt_simple_main +igt_simple_main() {igt_set_timeout (1 ,"Testcase" );sleep (5 );
runner/testdata/abort-simple.c +1 -1
@@ -23,7 +23,7 @@#include "igt.h" -igt_simple_main +igt_simple_main() {igt_abort_on_f (true,"I'm out!\n" ); }
runner/testdata/no-subtests.c +1 -1
@@ -1,6 +1,6 @@#include "igt.h" -igt_simple_main +igt_simple_main() { }
tests/core_setmaster_vs_auth.c +1 -1
@@ -57,7 +57,7 @@IGT_TEST_DESCRIPTION ("Check that drop/setMaster correctly transfer master " "state" ); -igt_simple_main +igt_simple_main() {int master1, master2, client;drm_magic_t magic;
tests/intel/gem_exec_lut_handle.c +1 -1
@@ -88,7 +88,7 @@ static int has_exec_lut(int fd) }#define ELAPSED (a,b) (1e6*((b)->tv_sec - (a)->tv_sec) + ((b)->tv_usec - (a)->tv_usec)) -igt_simple_main +igt_simple_main() {uint32_t batch[2 ] = {MI_BATCH_BUFFER_END };uint32_t cycle[16 ];
tests/intel/gem_fd_exhaustion.c +1 -1
@@ -44,7 +44,7 @@* SUBTEST: */ -igt_simple_main +igt_simple_main() {int fd;
tests/intel/gem_gtt_cpu_tlb.c +1 -1
@@ -82,7 +82,7 @@ create_bo(int fd)return handle; } -igt_simple_main +igt_simple_main() {int fd;int i;
tests/intel/gem_gtt_hog.c +1 -1
@@ -163,7 +163,7 @@ static void run(data_t *data, int child)igt_assert_eq_u32 (x, canary); } -igt_simple_main +igt_simple_main() {struct timeval start, end;pid_t children[64 ];
tests/intel/gem_lut_handle.c +1 -1
@@ -173,7 +173,7 @@ static int many_exec(int fd, uint32_t batch, int num_exec, int num_reloc, unsign#define fail (x) igt_assert((x) == -ENOENT)#define pass (x) igt_assert((x) == 0) -igt_simple_main +igt_simple_main() {uint32_t batch[2 ] = {MI_BATCH_BUFFER_END };uint32_t handle;
tests/intel/gem_media_vme.c +1 -1
@@ -102,7 +102,7 @@ static void shut_non_vme_subslices(int drm_fd, uint32_t ctx)gem_context_set_param (drm_fd, &arg); } -igt_simple_main +igt_simple_main() {struct buf_ops *bops;struct intel_buf src, dst;
tests/intel/gem_pwrite_snooped.c +1 -1
@@ -139,7 +139,7 @@ static void test(int w, int h)intel_buf_destroy (dst); } -igt_simple_main +igt_simple_main() { fd =drm_open_driver (DRIVER_INTEL );igt_require_gem (fd);
tests/intel/gem_set_tiling_vs_gtt.c +1 -1
@@ -59,7 +59,7 @@ IGT_TEST_DESCRIPTION("Check set_tiling vs gtt mmap coherency.");* Testcase: Check set_tiling vs gtt mmap coherency */ -igt_simple_main +igt_simple_main() {int fd;uint32_t *ptr;
tests/intel/gem_set_tiling_vs_pwrite.c +1 -1
@@ -59,7 +59,7 @@ IGT_TEST_DESCRIPTION("Check set_tiling vs pwrite coherency.");* Testcase: Check set_tiling vs pwrite coherency */ -igt_simple_main +igt_simple_main() {uint32_t data[OBJECT_SIZE /4 ];uint32_t *ptr;
tests/intel/gem_tiled_pread_basic.c +1 -1
@@ -127,7 +127,7 @@ calculate_expected(int offset, struct offset *dbg)return (dbg->base_y + dbg->tile_y) *WIDTH + dbg->base_x + dbg->tile_x; } -igt_simple_main +igt_simple_main() {int fd;int i, iter =100 ;
tests/intel/gem_tiled_pread_pwrite.c +1 -1
@@ -117,7 +117,7 @@ static void copy_wc_page(void *dst, const void *src)igt_memcpy_from_wc (dst, src,PAGE_SIZE ); } -igt_simple_main +igt_simple_main() {uint32_t tiling, swizzle;int count;
tests/intel/gem_tiled_wb.c +1 -1
@@ -146,7 +146,7 @@ get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle) *swizzle = arg.swizzle_mode; } -igt_simple_main +igt_simple_main() {int fd;int i, iter =100 ;
tests/intel/gem_tiled_wc.c +1 -1
@@ -148,7 +148,7 @@ calculate_expected(int offset)return (base_y + tile_y) *WIDTH + base_x + tile_x; } -igt_simple_main +igt_simple_main() {uint32_t tiling, swizzle;uint32_t handle;
tests/intel/gem_tiling_max_stride.c +1 -1
@@ -68,7 +68,7 @@ static void test_invalid_tiling(int fd, uint32_t handle, int stride)* Testcase: Check that max fence stride works */ -igt_simple_main +igt_simple_main() {int fd;uint32_t *ptr;
tests/intel/gem_unfence_active_buffers.c +1 -1
@@ -76,7 +76,7 @@ static uint32_t create_tiled(int i915)return handle; } -igt_simple_main +igt_simple_main() {int i915, num_fences;igt_spin_t *spin;
tests/intel/gem_unref_active_buffers.c +1 -1
@@ -74,7 +74,7 @@ static void alarm_handler(int sig) { } -igt_simple_main +igt_simple_main() {struct sigaction old_sa, sa = { .sa_handler = alarm_handler };unsigned int last[2 ]= {-1 ,-1 }, count;
tests/intel/gen3_mixed_blits.c +1 -1
@@ -455,7 +455,7 @@ check_bo(int fd, uint32_t handle, uint32_t val) } -igt_simple_main +igt_simple_main() {uint32_t *handle, *tiling, *start_val;uint32_t start =0 ;
tests/intel/gen3_render_linear_blits.c +1 -1
@@ -327,7 +327,7 @@ check_bo(int fd, uint32_t handle, uint32_t val) } } -igt_simple_main +igt_simple_main() {uint32_t *handle, *start_val;uint32_t start =0 ;
tests/intel/gen3_render_mixed_blits.c +1 -1
@@ -348,7 +348,7 @@ check_bo(int fd, uint32_t handle, uint32_t val)munmap (v,WIDTH *HEIGHT *4 ); } -igt_simple_main +igt_simple_main() {uint32_t *handle, *tiling, *start_val;uint32_t start =0 ;
tests/intel/gen3_render_tiledx_blits.c +1 -1
@@ -335,7 +335,7 @@ check_bo(int fd, uint32_t handle, uint32_t val)munmap (v,WIDTH *HEIGHT *4 ); } -igt_simple_main +igt_simple_main() {uint32_t *handle, *start_val;uint32_t start =0 ;
tests/intel/gen3_render_tiledy_blits.c +1 -1
@@ -335,7 +335,7 @@ check_bo(int fd, uint32_t handle, uint32_t val)munmap (v,WIDTH *HEIGHT *4 ); } -igt_simple_main +igt_simple_main() {uint32_t *handle, *start_val;uint32_t start =0 ;
tests/intel/i915_pciid.c +1 -1
@@ -71,7 +71,7 @@ static bool has_known_intel_chipset(int fd)return true; } -igt_simple_main +igt_simple_main() {int intel =drm_open_driver (DRIVER_INTEL );
tests/intel/kms_fence_pin_leak.c +1 -1
@@ -227,7 +227,7 @@ static void run_test(data_t *data)igt_skip ("no valid crtc/connector combinations found\n" ); } -igt_simple_main +igt_simple_main() {data_t data = {};
tests/intel/kms_pwrite_crc.c +1 -1
@@ -190,7 +190,7 @@ static void run_test(data_t *data)static data_t data; -igt_simple_main +igt_simple_main() { data.drm_fd =drm_open_driver_master (DRIVER_INTEL );kmstest_set_vt_graphics_mode ();
tests/kms_dp_aux_dev.c +1 -1
@@ -144,7 +144,7 @@ static bool test(int drm_fd, uint32_t connector_id)return false; } -igt_simple_main +igt_simple_main() {int valid_connectors =0 ;drmModeRes *res;
tests/kms_sysfs_edid_timing.c +1 -1
@@ -57,7 +57,7 @@ IGT_TEST_DESCRIPTION("This test checks the time it takes to reprobe each ""make sure that the mean time for all connectors is " "not too long."); -igt_simple_main +igt_simple_main() {DIR *dirp;struct dirent *de;
tests/prime_udl.c +1 -1
@@ -121,7 +121,7 @@ static void test2(void)gem_close (intel_fd, intel_handle); } -igt_simple_main +igt_simple_main() {igt_assert (find_and_open_devices () >=0 );
Signature · 1 line
2.49.1