[all-commits] [llvm/llvm-project] cc6be8: [sanitizer_common][test] Fix SanitizerIoctl/KVM_GE...

Rainer Orth via All-commits all-commits at lists.llvm.org
Sat Aug 10 02:49:06 PDT 2024


  Branch: refs/heads/release/19.x
  Home:   https://github.com/llvm/llvm-project
  Commit: cc6be8216ad24a03911c5eee429901ad61c173f4
      https://github.com/llvm/llvm-project/commit/cc6be8216ad24a03911c5eee429901ad61c173f4
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2024-08-10 (Sat, 10 Aug 2024)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cpp

  Log Message:
  -----------
  [sanitizer_common][test] Fix SanitizerIoctl/KVM_GET_* tests on Linux/… (#100532)

…sparc64

Two ioctl tests `FAIL` on Linux/sparc64 (both 32 and 64-bit):
```
  SanitizerCommon-Unit :: ./Sanitizer-sparc-Test/SanitizerIoctl/KVM_GET_LAPIC
  SanitizerCommon-Unit :: ./Sanitizer-sparc-Test/SanitizerIoctl/KVM_GET_MP_STATE
```
like
```
compiler-rt/lib/sanitizer_common/tests/./Sanitizer-sparc-Test --gtest_filter=SanitizerIoctl.KVM_GET_LAPIC
--
compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cpp:91: Failure
Value of: res
  Actual: false
Expected: true

compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cpp:92: Failure
Expected equality of these values:
  ioctl_desc::WRITE
    Which is: 2
  desc.type
    Which is: 1
```
The problem is that Linux/sparc64, like Linux/mips, uses a different
layout for the `ioctl` `request` arg than most other Linux targets as
can be seen in `sanitizer_platform_limits_posix.h` (`IOC_*`). Therefore,
this patch makes the tests use the correct one.

Tested on `sparc64-unknown-linux-gnu` and `x86_64-pc-linux-gnu`.

(cherry picked from commit 9eefe065bb2752b0db9ed553d2406e9a15ce349e)



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list