Skip to content

Commit 5148da0

Browse files
committed
drm/xe: Allow fault injection in exec queue IOCTLs
Use fault injection infrastructure to allow specific functions to be configured over debugfs for failing during the execution of xe_exec_queue_create_ioctl(). xe_exec_queue_destroy_ioctl() and xe_exec_queue_get_property_ioctl() are not considered as there is no unwinding code to test with fault injection. This allows more thorough testing from user space by going through code paths for error handling and unwinding which cannot be reached by simply injecting errors in IOCTL arguments. This can help increase code robustness. The corresponding IGT series is: https://patchwork.freedesktop.org/series/144138/ Reviewed-by: Sai Teja Pottumuttu <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Francois Dugast <[email protected]>
1 parent 22adf7c commit 5148da0

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

drivers/gpu/drm/xe/xe_exec_queue.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ struct xe_exec_queue *xe_exec_queue_create(struct xe_device *xe, struct xe_vm *v
203203
__xe_exec_queue_free(q);
204204
return ERR_PTR(err);
205205
}
206+
ALLOW_ERROR_INJECTION(xe_exec_queue_create, ERRNO);
206207

207208
struct xe_exec_queue *xe_exec_queue_create_class(struct xe_device *xe, struct xe_gt *gt,
208209
struct xe_vm *vm,

drivers/gpu/drm/xe/xe_hw_engine_group.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ int xe_hw_engine_group_add_exec_queue(struct xe_hw_engine_group *group, struct x
178178
up_write(&group->mode_sem);
179179
return err;
180180
}
181+
ALLOW_ERROR_INJECTION(xe_hw_engine_group_add_exec_queue, ERRNO);
181182

182183
/**
183184
* xe_hw_engine_group_del_exec_queue() - Delete an exec queue from a hw engine group

drivers/gpu/drm/xe/xe_vm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ int xe_vm_add_compute_exec_queue(struct xe_vm *vm, struct xe_exec_queue *q)
270270

271271
return err;
272272
}
273+
ALLOW_ERROR_INJECTION(xe_vm_add_compute_exec_queue, ERRNO);
273274

274275
/**
275276
* xe_vm_remove_compute_exec_queue() - Remove compute exec queue from VM

0 commit comments

Comments
 (0)