HomePhorge
Diffusion majic 16cb4f9f60ad

Fix tests on macOS with Homebrew libmagic

Description

Fix tests on macOS with Homebrew libmagic

  • Remove ei_init() call that fails when sysconf(_SC_OPEN_MAX) returns LONG_MAX (unlimited fd limit on macOS), causing int overflow in Erlang's init_socket_info(). The port only uses ei for encoding/decoding, not node connections.
  • Redirect port stderr to /dev/null unless MAJIC_DEBUG is set, to suppress libmagic warnings in test output.
  • Compile test .mgc with matching file binary from Homebrew file-formula to avoid version mismatch with the linked libmagic.
  • Increase port test receive timeout to accommodate slower port startup.
  • Broaden .gitignore to cover /priv/ and *.mgc.

Details

Provenance
Lain SoykafAuthored on Tue, May 12, 11:52 PM
Parents
R20:3ee9e73ddb43: Use pkg-config to discover libmagic paths
Branches
Unknown
Tags
Unknown

Event Timeline

Lain Soykaf <lain@lain.com> committed R20:16cb4f9f60ad: Fix tests on macOS with Homebrew libmagic (authored by Lain Soykaf <lain@lain.com>).Tue, May 12, 11:52 PM