dart-sdk/tests/ffi
Simon Binder 62488db4da [vm/ffi] Add DynamicLibrary.close()
This adds the `close()` method to `DynamicLibrary`, which uses
`dlclose()` on Unix and `FreeLibrary` on Windows to close a dynamic FFI
library.

TEST=tests/ffi/dylib_close_test.dart
Closes https://github.com/dart-lang/sdk/issues/40159

Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-riscv64-try,vm-ffi-qemu-linux-release-arm-try,dart2wasm-linux-d8-try,dart2wasm-linux-chrome-try,vm-reload-rollback-linux-debug-x64-try,vm-reload-linux-debug-x64-try,vm-win-debug-x64c-try,vm-win-debug-x64-try,vm-aot-android-release-arm_x64-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-asan-linux-release-x64-try,vm-aot-msan-linux-release-x64-try,vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-x64-try,vm-aot-mac-release-arm64-try,vm-aot-win-debug-x64c-try,vm-aot-win-release-x64-try
CoreLibraryReviewExempt: `dart:ffi` VM only API.
Change-Id: I73af98677b481902fe548bdcee56964a0195faf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307680
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-06-15 17:19:37 +00:00
..
generator [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
native_assets
abi_specific_int_incomplete_aot_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
abi_specific_int_incomplete_jit_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
abi_specific_int_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
abi_test.dart
aliasing_test.dart
all_positive.dart
allocator_test.dart
analysis_options.yaml [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
bool_test.dart
c_types_test.dart
callback_tests_utils.dart
callback_unwind_error_test.dart [ffi] Add failing callback test with an Error that is not an UnhandledException. 2023-05-01 16:13:51 +00:00
calloc_test.dart
coordinate.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
coordinate_nnbd_workaround.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
data_not_asan_test.dart
data_test.dart
dl_api_exit_enter_isolate_test.dart Reland "[vm] Expose Dart_{CurrentIsolate,ExitIsolate,EnterIsolate}" 2023-04-13 09:20:17 +00:00
dylib_close_test.dart [vm/ffi] Add DynamicLibrary.close() 2023-06-15 17:19:37 +00:00
dylib_isolates_test.dart
dylib_utils.dart [vm/ffi] Fix @Natives with VarArgs 2023-03-01 09:08:31 +00:00
expando_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
extension_methods_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
external_typed_data_finalizer_test.dart [vm/ffi] Pointer.asTypedList finalizer 2023-05-10 11:38:57 +00:00
external_typed_data_test.dart
ffi.status [infra] Run JIT FFI tests on QEMU. 2023-05-26 23:22:32 +00:00
ffi_callback_unique_test.dart Reland "[vm] Migrate FFI callbacks to the new metadata system." 2023-06-06 02:07:58 +00:00
ffi_induce_a_crash_test.dart [vm/win/aot] Provide unwinding information for Windows AOT snapshots. 2023-05-11 03:14:27 +00:00
ffi_native_test.dart [vm] Class modifiers for NativeFieldWrapper subtypes 2023-03-31 13:20:19 +00:00
ffi_test_helpers.dart
finalizer_external_size_accounting_test.dart
function_callbacks_many_test.dart
function_callbacks_structs_by_value_generated_test.dart
function_callbacks_structs_by_value_test.dart
function_callbacks_test.dart
function_callbacks_varargs_generated_test.dart [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
function_callbacks_very_many_test.dart
function_structs_by_value_generated_args_leaf_test.dart
function_structs_by_value_generated_args_native_leaf_test.dart [test/ffi] Beef up @Native testing 2023-02-24 21:16:50 +00:00
function_structs_by_value_generated_args_native_test.dart [test/ffi] Beef up @Native testing 2023-02-24 21:16:50 +00:00
function_structs_by_value_generated_args_test.dart
function_structs_by_value_generated_compounds.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
function_structs_by_value_generated_ret_arg_leaf_test.dart
function_structs_by_value_generated_ret_arg_native_leaf_test.dart [test/ffi] Beef up @Native testing 2023-02-24 21:16:50 +00:00
function_structs_by_value_generated_ret_arg_native_test.dart [test/ffi] Beef up @Native testing 2023-02-24 21:16:50 +00:00
function_structs_by_value_generated_ret_arg_test.dart
function_structs_by_value_generated_ret_leaf_test.dart
function_structs_by_value_generated_ret_native_leaf_test.dart [test/ffi] Beef up @Native testing 2023-02-24 21:16:50 +00:00
function_structs_by_value_generated_ret_native_test.dart [test/ffi] Beef up @Native testing 2023-02-24 21:16:50 +00:00
function_structs_by_value_generated_ret_test.dart
function_structs_test.dart
function_test.dart
function_varargs_generated_leaf_test.dart [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
function_varargs_generated_native_leaf_test.dart [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
function_varargs_generated_native_test.dart [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
function_varargs_generated_test.dart [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
function_varargs_name_test.dart [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
function_varargs_test.dart [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
function_very_many_test.dart
hardfp_test.dart
has_symbol_test.dart
inline_array_multi_dimensional_test.dart
inline_array_test.dart
invoke_callback_after_suspension_test.dart [vm/ffi] Move ffi-callback related state from Thread to ObjectStore, move jit trampolines from Isolate to IsolateGroup 2023-05-17 11:23:28 +00:00
native_effect_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
negative_function_test.dart
regress_37254_test.dart
regress_39044_test.dart
regress_39063_test.dart
regress_39885_test.dart
regress_40537_test.dart
regress_43016_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_43693_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_44985_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_44986_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_45189_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_45198_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_45507_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_45988_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_46004_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_46085_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_46127_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_47594_test.dart [infra] Run JIT FFI tests on QEMU. 2023-05-26 23:22:32 +00:00
regress_47673_2_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_47673_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_49402_test.dart
regress_49684_test.dart
regress_51041_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_51315_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_51321_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
regress_51504_test.dart [tests] Remove obsolete Dart 3.0 experiments from FFI tests 2023-06-15 08:25:18 +00:00
regress_51538_2_test.dart [cfe/ffi] Fix Finalizable in for( in ) loops 2023-03-02 09:05:19 +00:00
regress_51538_3_test.dart [cfe/ffi] Fix Finalizable in for( in ) loops 2023-03-02 09:05:19 +00:00
regress_51538_test.dart [cfe/ffi] Fix Finalizable in for( in ) loops 2023-03-02 09:05:19 +00:00
regress_51913_test.dart [cfe/ffi] Fix missing type argument on @Native 2023-04-05 16:24:30 +00:00
regress_52298_test.dart [analyzer/ffi] Fix spurious FFI errors 2023-05-08 15:16:05 +00:00
regress_b_261224444_test.dart
regress_flutter79441_test.dart
regress_flutter97301_test.dart
regress_jump_to_frame_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
sizeof_test.dart
snapshot_test.dart
stacktrace_regress_37910_test.dart
structs_nested_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
structs_nnbd_workaround_test.dart
structs_packed_test.dart
structs_test.dart
unaligned_test.dart
variance_function_test.dart
very_large_struct.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
vmspecific_dynamic_library_test.dart
vmspecific_enable_ffi_test.dart
vmspecific_ffi_native_test.dart [vm] Class modifiers for NativeFieldWrapper subtypes 2023-03-31 13:20:19 +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
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/isolates] Introduce 'vm:isolate-unsendable' pragma. 2023-03-27 20:54:11 +00:00
vmspecific_native_finalizer_test.dart
vmspecific_object_gc_test.dart
vmspecific_regress_37100_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
vmspecific_regress_37511_callbacks_test.dart
vmspecific_regress_37511_test.dart
vmspecific_regress_37780_test.dart
vmspecific_regress_38993_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
vmspecific_regress_51794_test.dart [vm/ffi] Fix test on Android 2023-04-05 19:51:09 +00:00
vmspecific_send_port_id_test.dart
vmspecific_static_checks_ffinative_test.dart [vm] Class modifiers for NativeFieldWrapper subtypes 2023-03-31 13:20:19 +00:00
vmspecific_static_checks_test.dart Reland "[vm/ffi] Add class modifiers" 2023-03-21 15:25:10 +00:00
vmspecific_static_checks_varargs_test.dart
vmspecific_variance_function_checks_test.dart