Skip to content

Commit

Permalink
No longer expect segfaults in match files
Browse files Browse the repository at this point in the history
A number of match files check for `Segmentation Fault`, which happens
when the test runner crashes. This change removes that check and
replaces it with checks for the tests that actually cause the segfault.
As the test runner no longer segfaults, more tests are executed and so
more non-segfaulting fails needed to be added to the match files.

In addition, a number of match files had the check for `Segmentation
Fault` removed if they didn't actually segfault.

Note that this will have no effect for the `ctest_parser.py` script, as
it ignores the match file logic.
  • Loading branch information
RossBrunton committed Oct 21, 2024
1 parent c742ca4 commit 7084df6
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 18 deletions.
6 changes: 1 addition & 5 deletions test/conformance/cts_exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,12 @@ def _run_cmd(cmd, comment, filter):
# Parse fails list
_print_format("Loading fails from {}", args.failslist)
fail_patterns = []
expected_fail = False
with open(args.failslist) as f:
for l in f:
optional = "{{OPT}}" in l
l = l.replace("{{OPT}}", "")
l = l.replace("{{.*}}", "*")

if l.startswith("{{Segmentation fault"):
expected_fail = True
continue
if l.startswith("#"):
continue
if l.startswith("{{NONDETERMINISTIC}}"):
Expand Down Expand Up @@ -160,7 +156,7 @@ def _run_cmd(cmd, comment, filter):
gtest_filter = "-" + (":".join(map(lambda x: x["pattern"], fail_patterns)))
if _check_filter(base_invocation, gtest_filter):
result = _run_cmd(base_invocation, "known good tests", gtest_filter)
if result != 0 and not expected_fail:
if result != 0:
_print_error("Tests we expected to pass have failed")
final_result = result
else:
Expand Down
49 changes: 47 additions & 2 deletions test/conformance/enqueue/enqueue_adapter_level_zero.match
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{NONDETERMINISTIC}}
# Note: This file is only for use with cts_exe.py
{{OPT}}urEnqueueEventsWaitTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urEnqueueKernelLaunchTest.InvalidKernelArgs/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urEnqueueKernelLaunchKernelWgSizeTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
Expand All @@ -22,4 +22,49 @@
{{OPT}}urEnqueueMemImageReadTest.InvalidOrigin1D/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urEnqueueMemImageReadTest.InvalidOrigin2D/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urEnqueueMemImageReadTest.InvalidOrigin3D/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{Segmentation fault|Aborted}}
urEnqueueEventsWaitWithBarrierOrderingTest.SuccessEventDependencies/*
urEnqueueEventsWaitWithBarrierOrderingTest.SuccessEventDependenciesBarrierOnly/*
urEnqueueEventsWaitWithBarrierOrderingTest.SuccessEventDependenciesLaunchOnly/*
urEnqueueEventsWaitWithBarrierOrderingTest.SuccessNonEventDependencies/*
urEnqueueEventsWaitWithBarrierTest.Success/*
urEnqueueMemBufferCopyRectTestWithParam.Success/*
urEnqueueMemBufferCopyTestWithParam.Success/*
urEnqueueMemBufferFillTest.Success/*
urEnqueueMemBufferFillTest.SuccessOffset/*
urEnqueueMemBufferFillTest.SuccessPartialFill/*
urEnqueueMemBufferMapTestWithParam.SuccesPinnedWrite/*
urEnqueueMemBufferMapTestWithParam.SuccessMultiMaps/*
urEnqueueMemBufferMapTestWithParam.SuccessOffset/*
urEnqueueMemBufferMapTestWithParam.SuccessPartialMap/*
urEnqueueMemBufferMapTestWithWriteFlagParam.SuccessWrite/*
urEnqueueMemBufferReadRectTestWithParam.Success/*
urEnqueueMemBufferWriteRectTestWithParam.Success/*
urEnqueueMemImageCopyTest.Success/*
urEnqueueMemImageCopyTest.SuccessPartialCopy/*
urEnqueueMemImageCopyTest.SuccessPartialCopyWithDstOffset/*
urEnqueueMemImageCopyTest.SuccessPartialCopyWithSrcOffset/*
urEnqueueMemImageReadTest.InvalidRegion1D/*
urEnqueueMemImageReadTest.InvalidRegion2D/*
urEnqueueMemImageReadTest.InvalidRegion3D/*
urEnqueueMemImageWriteTest.InvalidOrigin1D/*
urEnqueueMemImageWriteTest.InvalidOrigin2D/*
urEnqueueMemImageWriteTest.InvalidOrigin3D/*
urEnqueueMemImageWriteTest.InvalidRegion1D/*
urEnqueueMemImageWriteTest.InvalidRegion2D/*
urEnqueueMemImageWriteTest.InvalidRegion3D/*
urEnqueueReadHostPipeTest.InvalidEventWaitList/*
urEnqueueReadHostPipeTest.InvalidNullHandleProgram/*
urEnqueueReadHostPipeTest.InvalidNullHandleQueue/*
urEnqueueReadHostPipeTest.InvalidNullPointerBuffer/*
urEnqueueReadHostPipeTest.InvalidNullPointerPipeSymbol/*
urEnqueueUSMAdviseTest.InvalidSizeTooLarge/*
urEnqueueUSMFill2DNegativeTest.OutOfBounds/*
urEnqueueUSMMemcpyTest.Blocking/*
urEnqueueUSMMemcpyTest.BlockingWithEvent/*
urEnqueueUSMMemcpyTest.WaitForDependencies/*
urEnqueueUSMPrefetchTest.InvalidSizeTooLarge/*
urEnqueueWriteHostPipeTest.InvalidEventWaitList/*
urEnqueueWriteHostPipeTest.InvalidNullHandleProgram/*
urEnqueueWriteHostPipeTest.InvalidNullHandleQueue/*
urEnqueueWriteHostPipeTest.InvalidNullPointerBuffer/*
urEnqueueWriteHostPipeTest.InvalidNullPointerPipeSymbol/*
8 changes: 6 additions & 2 deletions test/conformance/enqueue/enqueue_adapter_native_cpu.match
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{NONDETERMINISTIC}}
# Note: This file is only for use with cts_exe.py
{{OPT}}urEnqueueDeviceGetGlobalVariableReadTest.Success/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}
{{OPT}}urEnqueueDeviceGetGlobalVariableReadTest.InvalidNullHandleQueue/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}
{{OPT}}urEnqueueDeviceGetGlobalVariableReadTest.InvalidNullHandleProgram/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}
Expand Down Expand Up @@ -376,4 +376,8 @@ urEnqueueEventsWaitWithBarrierOrderingTest.SuccessNonEventDependencies/SYCL_NATI
{{OPT}}urEnqueueWriteHostPipeTest.InvalidNullPointerPipeSymbol/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}
{{OPT}}urEnqueueWriteHostPipeTest.InvalidNullPointerBuffer/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}
{{OPT}}urEnqueueWriteHostPipeTest.InvalidEventWaitList/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}
{{OPT}}{{Segmentation fault|Aborted}}
urEnqueueKernelLaunchIncrementMultiDeviceMultiThreadTest.Success/*
urEnqueueKernelLaunchIncrementMultiDeviceTest.Success/*
urEnqueueKernelLaunchIncrementTest.Success/*
# This one is flakey
{{OPT}}urEnqueueMemBufferReadTestWithParam.NonBlocking/*
8 changes: 6 additions & 2 deletions test/conformance/event/event_adapter_level_zero.match
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{{NONDETERMINISTIC}}
# Note: This file is only for use with cts_exe.py
{{OPT}}urEventGetInfoTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_EVENT_INFO_COMMAND_TYPE
{{OPT}}urEventGetProfilingInfoTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_PROFILING_INFO_COMMAND_QUEUED
{{OPT}}urEventGetProfilingInfoTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_PROFILING_INFO_COMMAND_SUBMIT
{{OPT}}urEventGetProfilingInfoTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_PROFILING_INFO_COMMAND_COMPLETE
{{OPT}}urEventGetProfilingInfoWithTimingComparisonTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}{{Segmentation fault|Aborted}}
urEventCreateWithNativeHandleTest.Success/*
urEventSetCallbackTest.AllStates/*
urEventSetCallbackTest.EventAlreadyCompleted/*
urEventSetCallbackTest.Success/*
urEventSetCallbackTest.ValidateParameters/*
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ QueueUSMTestWithParam.QueueUSMTest/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__IN
QueueUSMTestWithParam.QueueUSMTest/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__OUT_OF_ORDER_QUEUE
QueueBufferTestWithParam.QueueBufferTest/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__IN_ORDER_QUEUE
QueueBufferTestWithParam.QueueBufferTest/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}__OUT_OF_ORDER_QUEUE
{{OPT}}{{Segmentation fault|Aborted}}
23 changes: 20 additions & 3 deletions test/conformance/memory/memory_adapter_level_zero.match
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{{NONDETERMINISTIC}}
# Note: This file is only for use with cts_exe.py
urMemBufferPartitionTest.InvalidValueCreateType/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
urMemBufferPartitionTest.InvalidValueBufferCreateInfoOutOfBounds/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urMemGetInfoImageTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_MEM_INFO_SIZE
{{OPT}}{{Segmentation fault|Aborted}}
{{OPT}}urMemImageCreateTestWithImageFormatParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_IMAGE_CHANNEL_ORDER_RGBA__UR_IMAGE_CHANNEL_TYPE_SNORM_INT8
{{OPT}}urMemImageCreateTestWithImageFormatParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_IMAGE_CHANNEL_ORDER_RGBA__UR_IMAGE_CHANNEL_TYPE_SNORM_INT16
{{OPT}}urMemImageCreateTestWithImageFormatParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_IMAGE_CHANNEL_ORDER_RGBA__UR_IMAGE_CHANNEL_TYPE_UNORM_INT8
Expand All @@ -14,4 +13,22 @@ urMemBufferPartitionTest.InvalidValueBufferCreateInfoOutOfBounds/Intel_R__oneAPI
{{OPT}}urMemImageCreateTestWithImageFormatParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_IMAGE_CHANNEL_ORDER_RGBA__UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT16
{{OPT}}urMemImageCreateTestWithImageFormatParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_IMAGE_CHANNEL_ORDER_RGBA__UR_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32
{{OPT}}urMemImageCreateTestWithImageFormatParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_IMAGE_CHANNEL_ORDER_RGBA__UR_IMAGE_CHANNEL_TYPE_HALF_FLOAT
{{OPT}}urMemImageCreateTestWithImageFormatParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_IMAGE_CHANNEL_ORDER_RGBA__UR_IMAGE_CHANNEL_TYPE_FLOAT
{{OPT}}urMemImageCreateTestWithImageFormatParam.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}___UR_IMAGE_CHANNEL_ORDER_RGBA__UR_IMAGE_CHANNEL_TYPE_FLOAT
# These tests fail in the "Multi device testing" job, but pass in the hardware specific test
{{OPT}}urMemImageCreateTest.InvalidImageDescStype/*
{{OPT}}urMemImageCreateTest.InvalidSize/*
{{OPT}}urMemImageCreateWithHostPtrFlagsTest.Success/*
{{OPT}}urMemImageGetInfoTest.InvalidSizeSmall/*__UR_IMAGE_INFO_DEPTH
{{OPT}}urMemImageGetInfoTest.InvalidSizeSmall/*__UR_IMAGE_INFO_ELEMENT_SIZE
{{OPT}}urMemImageGetInfoTest.InvalidSizeSmall/*__UR_IMAGE_INFO_FORMAT
{{OPT}}urMemImageGetInfoTest.InvalidSizeSmall/*__UR_IMAGE_INFO_HEIGHT
{{OPT}}urMemImageGetInfoTest.InvalidSizeSmall/*__UR_IMAGE_INFO_ROW_PITCH
{{OPT}}urMemImageGetInfoTest.InvalidSizeSmall/*__UR_IMAGE_INFO_SLICE_PITCH
{{OPT}}urMemImageGetInfoTest.InvalidSizeSmall/*__UR_IMAGE_INFO_WIDTH
{{OPT}}urMemImageGetInfoTest.Success/*__UR_IMAGE_INFO_DEPTH
{{OPT}}urMemImageGetInfoTest.Success/*__UR_IMAGE_INFO_ELEMENT_SIZE
{{OPT}}urMemImageGetInfoTest.Success/*__UR_IMAGE_INFO_FORMAT
{{OPT}}urMemImageGetInfoTest.Success/*__UR_IMAGE_INFO_HEIGHT
{{OPT}}urMemImageGetInfoTest.Success/*__UR_IMAGE_INFO_ROW_PITCH
{{OPT}}urMemImageGetInfoTest.Success/*__UR_IMAGE_INFO_SLICE_PITCH
{{OPT}}urMemImageGetInfoTest.Success/*__UR_IMAGE_INFO_WIDTH
1 change: 0 additions & 1 deletion test/conformance/program/program_adapter_native_cpu.match
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,3 @@
{{OPT}}urProgramSetSpecializationConstantsTest.InvalidValuePtr/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}
{{OPT}}urProgramSetMultipleSpecializationConstantsTest.MultipleCalls/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}
{{OPT}}urProgramSetMultipleSpecializationConstantsTest.SingleCall/SYCL_NATIVE_CPU___SYCL_Native_CPU__{{.*}}
{{OPT}}{{Segmentation fault|Aborted}}
1 change: 0 additions & 1 deletion test/conformance/sampler/sampler_adapter_level_zero.match
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
{{OPT}}urSamplerGetInfoTest.InvalidSizePropSizeSmall/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urSamplerReleaseTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urSamplerRetainTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}{{Segmentation fault|Aborted}}
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@
{{OPT}}urSamplerGetInfoTest.InvalidSizePropSizeSmall/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urSamplerReleaseTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}urSamplerRetainTest.Success/Intel_R__oneAPI_Unified_Runtime_over_Level_Zero___{{.*}}_
{{OPT}}{{Segmentation fault|Aborted}}

0 comments on commit 7084df6

Please sign in to comment.