[PATCH] D17985: [Compiler-rt] Fix ioctl codes for MIPS in sanitizer_ioctl_test

Mohit Bhakkad via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 10 22:02:17 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL263199: [Compiler-rt] Fix ioctl codes for MIPS in sanitizer_ioctl_test (authored by mohit.bhakkad).

Changed prior to commit:
  http://reviews.llvm.org/D17985?vs=50236&id=50392#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D17985

Files:
  compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc

Index: compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc
===================================================================
--- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc
+++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc
@@ -78,15 +78,17 @@
 // Test decoding KVM ioctl numbers.
 TEST(SanitizerIoctl, KVM_GET_MP_STATE) {
   ioctl_desc desc;
-  bool res = ioctl_decode(0x8004ae98U, &desc);
+  unsigned int desc_value = SANITIZER_MIPS ? 0x4004ae98U : 0x8004ae98U;
+  bool res = ioctl_decode(desc_value, &desc);
   EXPECT_TRUE(res);
   EXPECT_EQ(ioctl_desc::WRITE, desc.type);
   EXPECT_EQ(4U, desc.size);
 }
 
 TEST(SanitizerIoctl, KVM_GET_LAPIC) {
   ioctl_desc desc;
-  bool res = ioctl_decode(0x8400ae8eU, &desc);
+  unsigned int desc_value = SANITIZER_MIPS ? 0x4400ae8eU : 0x8400ae8eU;
+  bool res = ioctl_decode(desc_value, &desc);
   EXPECT_TRUE(res);
   EXPECT_EQ(ioctl_desc::WRITE, desc.type);
   EXPECT_EQ(1024U, desc.size);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17985.50392.patch
Type: text/x-patch
Size: 1000 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160311/238c3772/attachment.bin>


More information about the llvm-commits mailing list