PowerShell-Native icon indicating copy to clipboard operation
PowerShell-Native copied to clipboard

Fix FreeBSD build failures. Update tests for FreeBSD

Open Thefrank opened this issue 2 years ago • 5 comments

Fix FreeBSD build failures. Update tests for FreeBSD

Changes

  • src/libpsl-native/CMakeLists.txt -> add CMake case for FreeBSD
  • src/libpsl-native/src/getcurrentthreadid.cpp -> add FreeBSD case
  • src/libpsl-native/src/getppid.cpp -> rework function, add case for FreeBSD
  • src/libpsl-native/src/getuserfrompid.cpp -> fix FreeBSD build failure from missing header
  • src/libpsl-native/test/ -> add FreeBSD to Apple cases. Apple and FreeBSD use the same parameters for stat

There are still two test failures related to GetDeviceID. FreeBSD returns a nonsensically high number for /usr/bin/stat -f %d /

Ubuntu 20.04:

frank@buildbot:~$ /usr/bin/stat -c %d /
64768

FreeBSD 13.1:

root@freebsd:~ # /usr/bin/stat -f %d /
2870232080986416670

Reasoning

Current FreeBSD builds fail. This PR resolves it and adds supporting tests

Thefrank avatar Mar 02 '23 22:03 Thefrank

@microsoft-github-policy-service agree

Thefrank avatar Mar 03 '23 02:03 Thefrank

Not sure who I should get code review from / who has write access so I am guessing based on recent PR merges

PTAL @adityapatwardhan

Thefrank avatar Aug 05 '23 19:08 Thefrank

If there is nothing else, then this is ready to merge

Thefrank avatar Aug 20 '23 19:08 Thefrank

@SteveL-MSFT this is the last one I think that's needed for https://github.com/dotnet/runtime/issues/14537 upstream

shanselman avatar Oct 11 '23 22:10 shanselman

What else is needed to get this merged?

Any feedback would be great!

Thefrank avatar Jul 02 '24 14:07 Thefrank

/azp run

adityapatwardhan avatar Sep 04 '24 21:09 adityapatwardhan

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Sep 04 '24 21:09 azure-pipelines[bot]

@Thefrank thank you for your contribution!

adityapatwardhan avatar Sep 04 '24 21:09 adityapatwardhan