Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed PFD testGetFd_canRead test failed on macOS. #7202

Merged
merged 1 commit into from Apr 3, 2022

Conversation

ZSmallX
Copy link
Contributor

@ZSmallX ZSmallX commented Apr 3, 2022

Overview

Fixed PFD testGetFd_canRead test failed on macOS.
Avoid depending on Linux file system details, and make full use of Java cross platform feature.

Proposed Changes

Used new FileInputStream(FileDescriptor) instead of new FileInputStream(String).

Note that it can still run failed on Windows.

Closes #7130

@ZSmallX
Copy link
Contributor Author

ZSmallX commented Apr 3, 2022

There is no tests run on macOS on GitHub Action, maybe it should be added later.

Tests passed on my macOS with Intel.

@utzcoz @hoisie Could you please review on this?

@ZSmallX ZSmallX force-pushed the pfd_tests_on_multiple_platforms branch from 86f74e5 to 54564d5 Compare April 3, 2022 04:23
@utzcoz
Copy link
Member

utzcoz commented Apr 3, 2022

I have tested it on my macOS with M1, and the test passed.

Used `new FileInputStream(FileDescriptor)` instead of `new FileInputStream(String)`.

Avoid depending on Linux file system details, and make full use of Java cross platform feature.

Notes: it can still run failed on Windows.

Signed-off-by: ZSmallX <diosmallx@gmail.com>
@ZSmallX ZSmallX force-pushed the pfd_tests_on_multiple_platforms branch from 54564d5 to cd6430f Compare April 3, 2022 05:00
Copy link
Member

@utzcoz utzcoz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks.

@hoisie hoisie merged commit d3582b8 into robolectric:master Apr 3, 2022
@hoisie
Copy link
Contributor

hoisie commented Apr 3, 2022

Thanks @ZSmallX !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ShadowParcelFileDescriptorTest failed on macOS
3 participants