Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From eee73da15f0feb5a66791a72c35b44d5cc813c64 Mon Sep 17 00:00:00 2001
- From: Sergio Ahumada <sergio.ahumada@nokia.com>
- Date: Tue, 6 Dec 2011 11:55:30 +0100
- Subject: [PATCH] tests: make tests compile or disable those which don't
- compile [3]
- Change-Id: I15af13c3a5aa9fadd52026e0e7f92133d2726f32
- ---
- tests/auto/corelib.pro | 1 +
- tests/benchmarks/corelib/tools/qstring/main.cpp | 11 ++++++++---
- 2 files changed, 9 insertions(+), 3 deletions(-)
- diff --git a/tests/auto/corelib.pro b/tests/auto/corelib.pro
- index c79a9ea..cb1f2ef 100644
- --- a/tests/auto/corelib.pro
- +++ b/tests/auto/corelib.pro
- @@ -107,6 +107,7 @@ SUBDIRS=\
- !contains(QT_CONFIG, private_tests): SUBDIRS -= \
- qfileinfo \
- + qfilesystementry \
- symbian:SUBDIRS -= \
- qtconcurrentfilter \
- diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp
- index daefe12..943302c 100644
- --- a/tests/benchmarks/corelib/tools/qstring/main.cpp
- +++ b/tests/benchmarks/corelib/tools/qstring/main.cpp
- @@ -58,6 +58,11 @@
- #include <unistd.h>
- #endif
- +// MAP_ANON is deprecated on Linux, and MAP_ANONYMOUS is not present on Mac
- +#ifndef MAP_ANONYMOUS
- +# define MAP_ANONYMOUS MAP_ANON
- +#endif
- +
- #include <private/qsimd_p.h>
- #include "data.h"
- @@ -789,7 +794,7 @@ static void __attribute__((noinline)) equals2_selftest()
- void *page1, *page3;
- ushort *page2;
- page1 = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- - page2 = (ushort *)mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_POPULATE, -1, 0);
- + page2 = (ushort *)mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- page3 = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- Q_ASSERT(quintptr(page2) == quintptr(page1) + pagesize || quintptr(page2) == quintptr(page1) - pagesize);
- @@ -938,7 +943,7 @@ static inline int ucstrncmp_short_tail(const ushort *p1, const ushort *p2, int l
- return 0;
- }
- -static inline int bsf_nonzero(register long val)
- +static inline int bsf_nonzero(register int val)
- {
- int result;
- # ifdef Q_CC_GNU
- @@ -1346,7 +1351,7 @@ void tst_QString::ucstrncmp() const
- void *page1, *page3;
- ushort *page2;
- page1 = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- - page2 = (ushort *)mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_POPULATE, -1, 0);
- + page2 = (ushort *)mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- page3 = mmap(0, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
- Q_ASSERT(quintptr(page2) == quintptr(page1) + pagesize || quintptr(page2) == quintptr(page1) - pagesize);
- --
- 1.7.4.4
Add Comment
Please, Sign In to add comment