Fix eglib on AIX/PASE (mono/mono#17476)
authorCalvin Buckley <calvin@cmpct.info>
Thu, 24 Oct 2019 16:04:20 +0000 (13:04 -0300)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Thu, 24 Oct 2019 16:04:20 +0000 (18:04 +0200)
commitb6892537a4d89615abd39d38aafaea30680e852b
tree1f6f68550ab0553389c44e605da8b329ca38fc7a
parent53929d630f0e6b55be049e914dfb886f1ef3a385
Fix eglib on AIX/PASE (mono/mono#17476)

* fix eglib on AIX/PASE

* Work around access(2) syscall bug on PASE
  On PASE, X_OK will always returns true. This is contrary to
  how AIX behaves (though corresponds to documentation!). This
  is probably because it's an upcall to the ILE version of
  access, and that seemingly always returns true.

* Always export the dummy function in the test suite
  The AIX linker didn't export this properly, without using the
  giant sledgehammer of -bexpall. Write an export file and use
  it. This required some build system changes to expose an
  AIX-only automake conditional.

* Use a file that exists on PASE for tests
  PASE doesn't use Unix-style DNS resolution, so /etc/hosts is
  missing. Use /etc/magic, since that seems to be present.

* Don't use /bin on AIX/PASE for tests
  This is a symlink to /usr/bin, and it seems chdir/getcwd
  follows links. Use /usr instead, that is unlikely to be a
  symlink.

* Make a note what directory we're in if we fail test_cwd

* Change manual executable access check change per Jay

* Change test on POSIXy platforms to always use root directory

Commit migrated from https://github.com/mono/mono/commit/638e2c6a8614d25aad591112d3414e28641b97e0
src/mono/configure.ac
src/mono/mono/eglib/gfile-unix.c
src/mono/mono/eglib/test/Makefile.am
src/mono/mono/eglib/test/file.c
src/mono/mono/eglib/test/path.c
src/mono/mono/eglib/test/test-eglib.exp [new file with mode: 0644]