[PATCH] D91606: [sanitizers][test] Test sanitizer_common and ubsan_minimal on Solaris

Rainer Orth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 17 02:58:18 PST 2020


ro created this revision.
ro added a reviewer: vitalybuka.
ro added a project: Sanitizers.
Herald added subscribers: Sanitizers, fedor.sergeev, krytarowski, mgorny, jyknight.
ro requested review of this revision.

During the initial Solaris sanitizer port, I missed to enable the `sanitizer_common` and `ubsan_minimal` testsuites.  This patch fixes this, correcting a few unportabilities:

- `Posix/getpass.cpp` failed to link since Solaris lacks `libutil`.  Omitting the library lets the test `PASS`, but I thought adding `%libutil` along the lines of `%librt` to be overkill.
- One subtest of `Posix/getpw_getgr.cpp` is disabled because Solaris `getpwent_r` has a different signature than expected.
- `/dev/null` is a symlink on Solaris.
- XPG7 specifies that `uname` returns a non-negative value on success.

Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91606

Files:
  compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h
  compiler-rt/test/sanitizer_common/CMakeLists.txt
  compiler-rt/test/sanitizer_common/TestCases/Posix/fgetln.cpp
  compiler-rt/test/sanitizer_common/TestCases/Posix/getpass.cpp
  compiler-rt/test/sanitizer_common/TestCases/Posix/getpw_getgr.cpp
  compiler-rt/test/sanitizer_common/TestCases/Posix/lstat.cpp
  compiler-rt/test/sanitizer_common/TestCases/Posix/uname.c
  compiler-rt/test/sanitizer_common/lit.common.cfg.py
  compiler-rt/test/ubsan_minimal/lit.common.cfg.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91606.305712.patch
Type: text/x-patch
Size: 4926 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201117/b8ab3be0/attachment.bin>


More information about the llvm-commits mailing list