Add a unit test for receiving 'finish' message after channel close
After the input channel is closed, the messages that were previously written to the fd should still be readable. However, in some cases, if the fd is closed with data in the fd's buffer, the data may be discarded. This is confirmed by the attached unit test. Add an explanation of this to the InputChannel implementation, so that this behaviour is documented. Bug: 376713684 Test: TEST=libinput_tests; m $TEST && adb sync data && adb shell -t /data/nativetest64/$TEST/$TEST --gtest_filter="*ReceiveAfterClose*" --gtest_repeat=100000 --gtest_break_on_failure Test: TEST=libinput_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_filter="*ReceiveAfterClose*" --gtest_repeat=100000 --gtest_break_on_failure Flag: TEST_ONLY Change-Id: I67a6a6432c4756283c8f2cca3c01210a3bcdb42e
Loading
Please register or sign in to comment