dart-sdk/tests/standalone
Vyacheslav Egorov 74285a6e31 [io] Take pending writes into account in _SocketStreamConsumer
On Windows `_NativeSocket.nativeWrite` returning to caller does
not mean that the data was flushed into OS buffer. Overlapped
operation might still be in progress - and it will be cancelled
with data loss if we close the handle.

This means _SocketStreamConsumer should take such pending writes
into account and not issue `done` event until pending write
completes.

This change prevents data loss when communicating with
subprocesses on Windows. Previously even doing
`await process.stdin.flush()` would not guarantee data
delivery.

Fixes https://github.com/dart-lang/sdk/issues/50904

TEST=tests/standalone/io/regress_50904_test.dart

Cq-Include-Trybots: luci.dart.try:vm-win-release-x64-try,vm-win-debug-x64-try,pkg-win-release-try
Change-Id: I13ab2cc3ce45f1ff8cb3183884d26bbb2b72f7ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307043
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2023-06-07 09:49:35 +00:00
..
deferred
http_launch_data
io [io] Take pending writes into account in _SocketStreamConsumer 2023-06-07 09:49:35 +00:00
package
stack_trace
array_bounds_check_generalization_test.dart
assert_assignable_canon_test.dart
byte_array_view_optimized_test.dart
bytedata_test.dart
check_class_cha_test.dart
check_for_aot_snapshot_jit_test.dart
check_null_cha_test.dart
constant_left_shift_test.dart
deferred_transitive_import_error_test.dart
deny_listed_test.dart
deoptimization_test.dart
double_hash_distribution_test.dart
double_smi_comparison_test.dart
double_temp_test.dart
double_to_int_test.dart
dwarf_stack_trace_invisible_functions_test.dart
dwarf_stack_trace_obfuscate_test.dart
dwarf_stack_trace_test.dart
env_test.dart
float_array_static_test.dart
float_array_test.dart
fragmentation_deferred_load_lib1.dart
fragmentation_deferred_load_lib2.dart
fragmentation_deferred_load_lib3.dart
fragmentation_deferred_load_test.dart
fragmentation_test.dart
fragmentation_typed_data_test.dart
gn_py_test.dart
http_launch_test.dart
int_array_deopt.dart
int_array_load_elimination_test.dart
int_array_test.dart
int_list_test.dart
lazy_async_stack_test.dart
left_shift_bit_and_op_test.dart
link_natives_lazily_test.dart
map_insert_remove_oom_test.dart
medium_integer_test.dart
no_allow_absolute_addresses_test.dart
no_lazy_dispatchers_test.dart
no_profiler_test.dart
no_such_method_error_with_invocation_test.dart
no_support_ast_printer_test.dart
no_support_debugger_test.dart
no_support_disassembler_test.dart
no_support_il_printer_test.dart
no_support_service_test.dart
no_support_timeline_test.dart
number_identity_test.dart
oom_error_stacktrace_test.dart
out_of_memory_recovery_synchronous_test.dart
out_of_memory_recovery_test.dart
out_of_memory_slow_growth_test.dart
out_of_memory_test.dart
out_of_memory_unhandled_exception_test.dart
packages_file_test.dart
pair_location_remapping_test.dart
pie_test.dart
pow_test.dart
priority_queue_stress_test.dart
regress31114_test.dart
regress_25335_test.dart
regress_26031_test.dart
regress_28854_1_test.dart
regress_28854_2_test.dart
regress_29350_test.dart
regress_29695_test.dart
regress_41329_absolute_test.dart
regress_41329_relative_test.dart
regress_42092_script.dart
regress_42092_test.dart
slowpath_safepoints_test.dart
standalone.status
standalone_analyzer.status
standalone_kernel.status
standalone_precompiled.status
standalone_vm.status [test] Skip named_pipe_script_test on Mac. 2023-05-26 22:14:57 +00:00
string_overflow_test.dart
typed_array_int64_uint64_test.dart
typed_array_test.dart
typed_data_isolate_test.dart
typed_data_test.dart
typed_data_view_test.dart
unboxed_int_converter_test.dart
verbose_gc_to_bmu_script.dart
verbose_gc_to_bmu_test.dart