dart-sdk/tests/ffi
Daco Harkes f524ec74ce [vm/ffi] FfiNative process lookup
This CL makes `FfiNative`s use `DynamicLibrary.process()` lookup if
resolving with the resolver set by `Dart_SetFfiNativeResolver` fails.

Also moves the implementation over from ffi.cc to
ffi_dynamic_library.cc so the implementation can be shared with
`DynamicLibrary.process()`.

Moves the implementation behind non-simulator and non-precompiler.
However, the implementation is tested in vm/cc tests which are in
precompiler mode. So enables the implementation if TESTED is defined.

This CL massages the build files so that TESTED is properly
defined when compiling the runtime for the vm/cc tests, and links
the ole32 symbols on windows for vm/cc tests.

(And some unrelated small cleanup changes here and there.)

TEST=tests/ffi/native_assets/process_test.dart

Change-Id: I25395d381db1d9b4b7a5759171a798a1140a6140
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-debug-x64c-try,vm-kernel-win-debug-x64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-precomp-win-debug-x64c-try,dart-sdk-win-try,vm-kernel-win-release-x64-try,vm-kernel-win-release-ia32-try,vm-kernel-precomp-win-product-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264982
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-10-25 10:57:07 +00:00
..
generator [ffi/tests] Split large auto-generated tests into multiple tests 2022-10-20 22:08:53 +00:00
native_assets [vm/ffi] FfiNative process lookup 2022-10-25 10:57:07 +00:00
abi_specific_int_incomplete_aot_test.dart
abi_specific_int_incomplete_jit_test.dart
abi_specific_int_test.dart
abi_test.dart
aliasing_test.dart
all_positive.dart
allocator_test.dart
analysis_options.yaml
bool_test.dart
c_types_test.dart [vm/ffi] Add Char C type 2022-03-28 09:46:56 +00:00
callback_tests_utils.dart
calloc_test.dart
coordinate.dart
coordinate_nnbd_workaround.dart
data_not_asan_test.dart [deps] Roll package:ffi to 2.0.1 2022-06-19 18:29:11 +00:00
data_test.dart
dylib_isolates_test.dart
dylib_utils.dart
expando_test.dart
extension_methods_test.dart
external_typed_data_test.dart
ffi.status [ffi/tests] Split large auto-generated tests into multiple tests 2022-10-20 22:08:53 +00:00
ffi_native_test.dart [cfe/ffi] Transform FfiNatives in a single pass 2022-07-08 12:36:09 +00:00
ffi_test_helpers.dart
function_callbacks_many_test.dart
function_callbacks_structs_by_value_generated_test.dart [tests] Avoid small --optimization-counter-threshold in tests 2022-10-10 21:04:18 +00:00
function_callbacks_structs_by_value_test.dart [tests] Avoid small --optimization-counter-threshold in tests 2022-10-10 21:04:18 +00:00
function_callbacks_test.dart [vm] Support serialization of FFI callbacks in IL serialization 2022-08-26 17:37:21 +00:00
function_callbacks_very_many_test.dart [tests] Avoid small --optimization-counter-threshold in tests 2022-10-10 21:04:18 +00:00
function_structs_by_value_generated_args_leaf_test.dart [ffi/tests] Split large auto-generated tests into multiple tests 2022-10-20 22:08:53 +00:00
function_structs_by_value_generated_args_test.dart [ffi/tests] Split large auto-generated tests into multiple tests 2022-10-20 22:08:53 +00:00
function_structs_by_value_generated_compounds.dart
function_structs_by_value_generated_ret_arg_leaf_test.dart [ffi/tests] Split large auto-generated tests into multiple tests 2022-10-20 22:08:53 +00:00
function_structs_by_value_generated_ret_arg_test.dart [ffi/tests] Split large auto-generated tests into multiple tests 2022-10-20 22:08:53 +00:00
function_structs_by_value_generated_ret_leaf_test.dart [ffi/tests] Split large auto-generated tests into multiple tests 2022-10-20 22:08:53 +00:00
function_structs_by_value_generated_ret_test.dart [ffi/tests] Split large auto-generated tests into multiple tests 2022-10-20 22:08:53 +00:00
function_structs_test.dart Fixed various typos in a lot of files 2022-07-25 12:21:59 +00:00
function_test.dart
function_very_many_test.dart
hardfp_test.dart
has_symbol_test.dart [vm/ffi] Support DynamicLibrary.process() on Windows 2022-09-27 08:42:03 +00:00
inline_array_multi_dimensional_test.dart
inline_array_test.dart
native_effect_test.dart
negative_function_test.dart
regress_37254_test.dart
regress_39044_test.dart
regress_39063_test.dart
regress_39885_test.dart
regress_40537_test.dart Fixed various typos in a lot of files 2022-07-25 12:21:59 +00:00
regress_43016_test.dart [tests] Avoid small --optimization-counter-threshold in tests 2022-10-10 21:04:18 +00:00
regress_43693_test.dart
regress_44985_test.dart
regress_44986_test.dart
regress_45189_test.dart
regress_45198_test.dart
regress_45507_test.dart
regress_45988_test.dart
regress_46004_test.dart
regress_46085_test.dart
regress_46127_test.dart
regress_47594_test.dart
regress_47673_2_test.dart
regress_47673_test.dart
regress_49402_test.dart [vm/ffi] Fix constant Finalizables 2022-07-07 08:39:21 +00:00
regress_49684_test.dart [analyzer/ffi] Fix FfiNative Pointer params 2022-09-27 15:58:16 +00:00
regress_flutter79441_test.dart
regress_flutter97301_test.dart
regress_jump_to_frame_test.dart
sizeof_test.dart
snapshot_test.dart
stacktrace_regress_37910_test.dart
structs_nested_test.dart
structs_nnbd_workaround_test.dart
structs_packed_test.dart
structs_test.dart
unaligned_test.dart
variance_function_test.dart [tests] Avoid small --optimization-counter-threshold in tests 2022-10-10 21:04:18 +00:00
very_large_struct.dart
vmspecific_dynamic_library_test.dart [vm/ffi] Support DynamicLibrary.process() on Windows 2022-09-27 08:42:03 +00:00
vmspecific_enable_ffi_test.dart
vmspecific_ffi_native_test.dart [vm/ffi] NativeFieldWrapper FfiNative check receivers for nullptr 2022-08-11 17:39:57 +00:00
vmspecific_function_callbacks_exit_test.dart
vmspecific_function_callbacks_negative_test.dart
vmspecific_function_callbacks_test.dart
vmspecific_function_gc_test.dart
vmspecific_function_test.dart
vmspecific_handle_dynamically_linked_test.dart
vmspecific_handle_test.dart Reland "[vm/ffi] Throw on returning Error in Handle" 2022-10-03 12:25:08 +00:00
vmspecific_highmem_32bit_test.dart
vmspecific_leaf_call_test.dart
vmspecific_native_finalizer_2_test.dart
vmspecific_native_finalizer_isolate_groups_test.dart
vmspecific_native_finalizer_isolates_test.dart [vm] Fill in ArgumentValue.invalidObject when objects are rejected in isolate messages. 2022-10-24 17:49:29 +00:00
vmspecific_native_finalizer_test.dart
vmspecific_object_gc_test.dart
vmspecific_regress_37100_test.dart
vmspecific_regress_37511_callbacks_test.dart
vmspecific_regress_37511_test.dart
vmspecific_regress_37780_test.dart
vmspecific_regress_38993_test.dart
vmspecific_send_port_id_test.dart
vmspecific_static_checks_ffinative_test.dart Reland "[cfe/ffi] Improve FFI call mismatched types compile errors" 2022-08-01 16:09:03 +00:00
vmspecific_static_checks_test.dart Reland "[cfe/ffi] Improve FFI call mismatched types compile errors" 2022-08-01 16:09:03 +00:00
vmspecific_variance_function_checks_test.dart Fix typos 2022-09-16 19:35:00 +00:00