From: Mohit K. Bhakkad Date: Fri, 11 Mar 2016 05:57:20 +0000 (+0000) Subject: [Compiler-rt] Fix ioctl codes for MIPS in sanitizer_ioctl_test X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac4bd45f021cff8310088a1a8418e58ad82fa65f;p=platform%2Fupstream%2Fllvm.git [Compiler-rt] Fix ioctl codes for MIPS in sanitizer_ioctl_test Reviewers: samsonov Subscribers: jaydeep, sagar, llvm-commits Differential Revision: http://reviews.llvm.org/D17985 llvm-svn: 263199 --- diff --git a/compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc b/compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc index 22fa5228..6e2a20b8 100644 --- a/compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc +++ b/compiler-rt/lib/sanitizer_common/tests/sanitizer_ioctl_test.cc @@ -78,7 +78,8 @@ TEST(SanitizerIoctl, Fixup) { // 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); @@ -86,7 +87,8 @@ TEST(SanitizerIoctl, KVM_GET_MP_STATE) { 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);