-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Preliminary Haiku port #3796
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
Preliminary Haiku port #3796
Conversation
Neat! Yeah, our tests look quite dumb. I suppose that you're looking at Line 94 in 77394a2
Line 97 in 77394a2
Passing
I passed This brings up the question of why we're bothering to test this and I think that the short answer is that we shouldn't be, nobody cares. If you pushed up a PR that removed those two stupid tests about address families that don't matter to anybody anywhere then I think that would be the easiest way to go forward. |
Yeah, those ones. Now another test that fails is stat() on directories: |
Agreed. A PR that fixed this up would be 👌 |
Indeed, Hurd uses other st_mode bits too: |
It seems like libgit2 is doing some black magic on the st_mode fields when passing it around though, using custom value S_IFGITLINK... |
Ok, next tests... |
|
Yeah ok it handles them as virtual files, but it's confusing. One more example of Linux coders thinking they are alone in the universe and they are always right... Besides BSD uses the value for whiteout entries: http://man7.org/linux/man-pages/man2/fstat.2.html Anyway, shouldn't do any harm as long as it doesn't collide with an even weirder OS where it'd be used for IFREG or IFDIR :-D |
Ok, here is the full test log now:
|
Just opened PR #3798. |
That doesn't matter, these values are never written to disk, they're only used internally in the index. As @carlosmn mentioned, those look like Unix modes (and are stored in a stat structure, usually) but they are not, they are hardcoded values, so there's nothing to collide. |
@ethomson yeah I got that, still quite ugly though 😁 |
I'm going to go ahead and merge this - if you have further incremental improvements for haiku, we'd be happy to see new PRs. Thanks! |
Thanks! |
Btw, I just checked again, and 5 is actually AF_INET6 on Haiku, so one of the expected fails doesn't happen even when passing non-null pointer. The hardcoded numbers are not even correct on Linux, where 5 is AF_APPLETALK. |
I don't know what you're talking about. Can you link to the code snippet that you're referring to? |
I see. You're welcome to submit a PR that changes that to a different bogus number. |
I'd rather remove them anyway. |
This makes libgit2 compile on Haiku.
Currently make test fails due to calling inet_pton() with dst=NULL, which assert()s our implementation. I'm not sure whether I should fix our code or the test though...