.gitignore | 2 autogen.sh | 3 + configure.ac | 2 debian/changelog | 4 - debian/patches/0001-fix-example-failures.patch | 42 -------------------- debian/patches/0002-fix-valgrind-test-failure.patch | 20 --------- debian/patches/0003-symbol-lookup.patch | 38 ------------------ debian/patches/series | 5 -- examples/Makefile.am | 5 +- examples/xorg-gtest-example.cpp | 3 + src/process.cpp | 5 +- src/xserver.cpp | 20 ++++++--- test/Makefile.am | 4 - test/device-test.cpp | 2 test/process-test.cpp | 9 ++++ 15 files changed, 44 insertions(+), 120 deletions(-)
New commits: commit e4581ba5557c52dec58d36660a090b6451465358 Author: Maarten Lankhorst <[email protected]> Date: Tue Feb 26 13:49:41 2013 +0100 remove all upstreamed patches diff --git a/debian/patches/0001-fix-example-failures.patch b/debian/patches/0001-fix-example-failures.patch deleted file mode 100644 index 4ea2e48..0000000 --- a/debian/patches/0001-fix-example-failures.patch +++ /dev/null @@ -1,42 +0,0 @@ -Description: Fix 'make check' failures on some hardware due to timing issues. -Author: Stephen M. Webb <[email protected]> ---- a/examples/Makefile.am -+++ b/examples/Makefile.am -@@ -59,7 +59,10 @@ - TESTS = $(noinst_PROGRAMS) - endif - xorg_gtest_example_SOURCES = xorg-gtest-example.cpp --xorg_gtest_example_CPPFLAGS = -I$(top_srcdir)/include $(AM_CPPFLAGS) -+xorg_gtest_example_CPPFLAGS = \ -+ -I$(top_srcdir)/include \ -+ $(AM_CPPFLAGS) \ -+ -DDUMMY_CONF_PATH="\"$(abs_top_srcdir)/data/xorg/gtest/dummy.conf\"" - xorg_gtest_example_LDADD = \ - libgtest.a \ - libxorg-gtest.a \ ---- a/examples/xorg-gtest-example.cpp -+++ b/examples/xorg-gtest-example.cpp -@@ -24,6 +24,7 @@ - TEST(XServer, StartServer) { - XServer server; - server.SetOption("-logfile", LOGFILE_DIR "/xserver-startserver.log"); -+ server.SetOption("-config", DUMMY_CONF_PATH); - server.Start(); - - ASSERT_EQ(server.GetState(), Process::RUNNING); -@@ -40,6 +41,7 @@ - TEST(XServer, DisplayConnection) { - XServer server; - server.SetOption("-logfile", LOGFILE_DIR "/xserver-display-connection.log"); -+ server.SetOption("-config", DUMMY_CONF_PATH); - server.Start(); - - Display *dpy = XOpenDisplay(server.GetDisplayString().c_str()); -@@ -69,6 +71,7 @@ - log << ".log"; - - server.SetOption("-logfile", log.str()); -+ server.SetOption("-config", DUMMY_CONF_PATH); - server.Start(); - - /* set up Display() */ diff --git a/debian/patches/0002-fix-valgrind-test-failure.patch b/debian/patches/0002-fix-valgrind-test-failure.patch deleted file mode 100644 index 4c9d9db..0000000 --- a/debian/patches/0002-fix-valgrind-test-failure.patch +++ /dev/null @@ -1,20 +0,0 @@ -Description: Accommodate the situation in which valgrind is a wrapper script. -Author: Stephen M. Webb <[email protected]> ---- a/test/process-test.cpp -+++ b/test/process-test.cpp -@@ -355,6 +355,15 @@ - } while(strstr(buff, program_invocation_short_name)); - - const char * arg = buff + strlen(buff) + 1; -+ -+ /* accommodate the case that valgrind has a shell script wrapper */ -+ if (0 == strcmp(buff, "/bin/sh")) { -+ if (0 == strcmp(arg, "-e")) { -+ arg += strlen(arg) + 1; -+ } -+ arg += strlen(arg) + 1; -+ } -+ - std::vector<std::string>::const_iterator it = valgrind_args.begin(); - - it++; /* first one is "valgrind" */ diff --git a/debian/patches/0003-symbol-lookup.patch b/debian/patches/0003-symbol-lookup.patch deleted file mode 100644 index a8ea134..0000000 --- a/debian/patches/0003-symbol-lookup.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/src/xserver.cpp b/src/xserver.cpp -index def6a89..a36ca7e 100644 ---- a/src/xserver.cpp -+++ b/src/xserver.cpp -@@ -436,19 +436,27 @@ static int _x_io_error_handler(Display *dpy) - - void xorg::testing::XServer::RegisterXIOErrorHandler() - { -- XIOErrorHandler old_handler; -- old_handler = XSetIOErrorHandler(_x_io_error_handler); -+ XIOErrorHandler old_handler, def_handler; - -- if (old_handler != _XDefaultIOError) -+ old_handler = XSetIOErrorHandler(NULL); -+ def_handler = XSetIOErrorHandler(_x_io_error_handler); -+ -+ if (old_handler != def_handler && -+ old_handler != _XDefaultIOError && -+ old_handler != _x_io_error_handler) - XSetIOErrorHandler(old_handler); - } - - void xorg::testing::XServer::RegisterXErrorHandler() - { -- XErrorHandler old_handler; -- old_handler = XSetErrorHandler(_x_error_handler); -+ XErrorHandler old_handler, def_handler; -+ -+ old_handler = XSetErrorHandler(NULL); -+ def_handler = XSetErrorHandler(_x_error_handler); - -- if (old_handler != _XDefaultError) -+ if (old_handler != def_handler && -+ old_handler != _XDefaultError && -+ old_handler != _x_error_handler) - XSetErrorHandler(old_handler); - } - diff --git a/debian/patches/series b/debian/patches/series index a2e2c72..fdffa2a 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1 @@ -0001-fix-example-failures.patch -0002-fix-valgrind-test-failure.patch -0003-symbol-lookup.patch - +# placeholder commit 6db1909807a4dc7a7566d847d226195cec5c6717 Author: Maarten Lankhorst <[email protected]> Date: Tue Feb 26 13:46:07 2013 +0100 bump changelog version diff --git a/debian/changelog b/debian/changelog index 7413e3d..0f88370 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -xorg-gtest (0.7.0-1) UNRELEASED; urgency=low +xorg-gtest (0.7.1-1) UNRELEASED; urgency=low [ Daniel d'Andrada ] * Initial release @@ -7,6 +7,6 @@ xorg-gtest (0.7.0-1) UNRELEASED; urgency=low * Update to xorg-gtest-0.2.0 [ Maarten Lankhorst ] - * Update to xorg-gtest-0.7.0 from ubuntu's packaging + * Update to xorg-gtest-0.7.1 from ubuntu's packaging -- Chase Douglas <[email protected]> Mon, 19 Mar 2012 17:29:10 -0700 commit fe6331a4eaf14f884321acffd2ab7dd40868bc16 Author: Peter Hutterer <[email protected]> Date: Mon Feb 25 08:15:08 2013 +1000 xorg-gtest 0.7.1 Signed-off-by: Peter Hutterer <[email protected]> diff --git a/configure.ac b/configure.ac index 6f2a698..4d4604a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([X.org Testing Environment for Google Test], - [0.7.0], + [0.7.1], [], [xorg-gtest]) AC_CONFIG_SRCDIR([Makefile.am]) commit 77d3c8afb6e9224469d7dffcebf1cb23b36ecc0e Author: Maarten Lankhorst <[email protected]> Date: Thu Jan 31 15:55:57 2013 +0100 Fix registering error handlers It looks like xorg-gtest and libX11 have a different idea of where the error handler pointer is supposed to point at. Check for the default handler returned from XSet*ErrorHandler by setting a NULL error handler first. Signed-off-by: Maarten Lankhorst <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/xserver.cpp b/src/xserver.cpp index def6a89..a36ca7e 100644 --- a/src/xserver.cpp +++ b/src/xserver.cpp @@ -436,19 +436,27 @@ static int _x_io_error_handler(Display *dpy) void xorg::testing::XServer::RegisterXIOErrorHandler() { - XIOErrorHandler old_handler; - old_handler = XSetIOErrorHandler(_x_io_error_handler); + XIOErrorHandler old_handler, def_handler; - if (old_handler != _XDefaultIOError) + old_handler = XSetIOErrorHandler(NULL); + def_handler = XSetIOErrorHandler(_x_io_error_handler); + + if (old_handler != def_handler && + old_handler != _XDefaultIOError && + old_handler != _x_io_error_handler) XSetIOErrorHandler(old_handler); } void xorg::testing::XServer::RegisterXErrorHandler() { - XErrorHandler old_handler; - old_handler = XSetErrorHandler(_x_error_handler); + XErrorHandler old_handler, def_handler; + + old_handler = XSetErrorHandler(NULL); + def_handler = XSetErrorHandler(_x_error_handler); - if (old_handler != _XDefaultError) + if (old_handler != def_handler && + old_handler != _XDefaultError && + old_handler != _x_error_handler) XSetErrorHandler(old_handler); } commit e1168f49fb7d559463967a692597214f9ce46e9c Author: Stephen M. Webb <[email protected]> Date: Wed Jan 30 20:39:11 2013 -0500 silenced truncation warnings on i386 targets Code using xorg-gtest and compiling on 32-bit x86 targets using GCC 4.7 or later get a truncation warning setting timeouts for sigtimedwait(). If the code sets -Werror this is fatal. This patch prevents those warnings. Signed-off-by: Stephen M. Webb <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/process.cpp b/src/process.cpp index 9580569..35831d7 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -152,8 +152,9 @@ bool xorg::testing::Process::WaitForExit(unsigned int timeout) { sigaddset(&sig_mask, SIGCHLD); if (sigprocmask(SIG_BLOCK, &sig_mask, &old_mask) == 0) { - struct timespec sig_timeout = {timeout / 1000, - (timeout % 1000) * 1000000L}; + long tv_secs = timeout / 1000; + long tv_usecs = (timeout % 1000) * 1000000L; + struct timespec sig_timeout = { tv_secs, tv_usecs }; if (sigtimedwait(&sig_mask, NULL, &sig_timeout) != SIGCHLD && errno != EAGAIN) usleep(timeout * 1000); commit 2bc9c835b31b27d3c6f8d3b501591e100a6a91ac Author: Stephen M. Webb <[email protected]> Date: Wed Jan 30 20:39:10 2013 -0500 accommodate valgrind being a wrapper script Some systems provide valgrind as a shell script wrapper that calls through to the real valgrind binary. The xorg-gtest test suite fails on those platforms because it causes the process args to mismatch. Signed-off-by: Stephen M. Webb <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/test/process-test.cpp b/test/process-test.cpp index 3446fe1..0c788fa 100644 --- a/test/process-test.cpp +++ b/test/process-test.cpp @@ -355,6 +355,15 @@ TEST_P(ProcessValgrindArgsWrapper, ValgrindWrapperWithArgs) } while(strstr(buff, program_invocation_short_name)); const char * arg = buff + strlen(buff) + 1; + + /* accommodate the case that valgrind has a shell script wrapper */ + if (0 == strcmp(buff, "/bin/sh")) { + if (0 == strcmp(arg, "-e")) { + arg += strlen(arg) + 1; + } + arg += strlen(arg) + 1; + } + std::vector<std::string>::const_iterator it = valgrind_args.begin(); it++; /* first one is "valgrind" */ commit 649f4f66efd5d8454478c4d45473cff0f75667e2 Author: Stephen M. Webb <[email protected]> Date: Wed Jan 30 20:39:09 2013 -0500 fix 'make check' failure in a headless environment The example tests suite failed to build in a headless environment because that test suite relied on a default x.org installation. This patch does not assume the build system has such a server and uses the dummy driver explicitly. Signed-off-by: Stephen M. Webb <[email protected]> Signed-off-by: Peter Hutterer <[email protected]> diff --git a/examples/Makefile.am b/examples/Makefile.am index b3ab863..2e86073 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -59,7 +59,10 @@ if ENABLE_XORG_GTEST_TESTS TESTS = $(noinst_PROGRAMS) endif xorg_gtest_example_SOURCES = xorg-gtest-example.cpp -xorg_gtest_example_CPPFLAGS = -I$(top_srcdir)/include $(AM_CPPFLAGS) +xorg_gtest_example_CPPFLAGS = \ + -I$(top_srcdir)/include \ + $(AM_CPPFLAGS) \ + -DDUMMY_CONF_PATH="\"$(abs_top_srcdir)/data/xorg/gtest/dummy.conf\"" xorg_gtest_example_LDADD = \ libgtest.a \ libxorg-gtest.a \ diff --git a/examples/xorg-gtest-example.cpp b/examples/xorg-gtest-example.cpp index 00481fc..fa09e7f 100644 --- a/examples/xorg-gtest-example.cpp +++ b/examples/xorg-gtest-example.cpp @@ -24,6 +24,7 @@ using namespace xorg::testing; TEST(XServer, StartServer) { XServer server; server.SetOption("-logfile", LOGFILE_DIR "/xserver-startserver.log"); + server.SetOption("-config", DUMMY_CONF_PATH); server.Start(); ASSERT_EQ(server.GetState(), Process::RUNNING); @@ -40,6 +41,7 @@ TEST(XServer, StartServer) { TEST(XServer, DisplayConnection) { XServer server; server.SetOption("-logfile", LOGFILE_DIR "/xserver-display-connection.log"); + server.SetOption("-config", DUMMY_CONF_PATH); server.Start(); Display *dpy = XOpenDisplay(server.GetDisplayString().c_str()); @@ -69,6 +71,7 @@ public: log << ".log"; server.SetOption("-logfile", log.str()); + server.SetOption("-config", DUMMY_CONF_PATH); server.Start(); /* set up Display() */ commit 676b62af8cc28755e4b17b5b0d2d78f0704ebcfd Author: Peter Hutterer <[email protected]> Date: Fri Jan 11 11:40:23 2013 +1000 test: fix device-test to include our include dir before system dirs Signed-off-by: Peter Hutterer <[email protected]> diff --git a/test/Makefile.am b/test/Makefile.am index a8ec35a..13485ab 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -63,7 +63,7 @@ xserver_test_helper_SOURCES = xserver-test-helper.cpp xserver_test_helper_CPPFLAGS = $(AM_CPPFLAGS) device_test_SOURCES = device-test.cpp -device_test_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/include +device_test_CPPFLAGS = -I$(top_srcdir)/include $(AM_CPPFLAGS) device_test_LDADD = $(tests_libraries) check_LIBRARIES = libgtest.a libxorg-gtest.a @@ -76,9 +76,9 @@ libgtest_a_CXXFLAGS = $(AM_CXXFLAGS) # build xorg-gtest as static lib libxorg_gtest_a_SOURCES = $(top_srcdir)/src/xorg-gtest-all.cpp libxorg_gtest_a_CPPFLAGS = \ - $(AM_CPPFLAGS) \ -I$(top_srcdir)/include \ -I$(top_srcdir) \ + $(AM_CPPFLAGS) \ -DDUMMY_CONF_PATH="\"$(abs_top_srcdir)/data/xorg/gtest/dummy.conf\"" libxorg_gtest_a_CXXFLAGS = $(AM_CXXFLAGS) commit 275ee0295257e57688fe0f4331c064633d2dba89 Author: Peter Hutterer <[email protected]> Date: Tue Jan 15 07:39:15 2013 +1000 test: fix spelling of a test case Signed-off-by: Peter Hutterer <[email protected]> diff --git a/test/device-test.cpp b/test/device-test.cpp index ff5aaec..47ddb26 100644 --- a/test/device-test.cpp +++ b/test/device-test.cpp @@ -5,7 +5,7 @@ using namespace xorg::testing; -TEST(DEVICE, DeviceNode) +TEST(Device, DeviceNode) { XORG_TESTCASE("Device node is /dev/input/eventX"); commit 847d1b006b18f5c5f4d17cb360c7676a8979f1e0 Author: Peter Hutterer <[email protected]> Date: Thu Jan 3 10:23:51 2013 +1000 Add xorg-gtest-example to gitignore Signed-off-by: Peter Hutterer <[email protected]> diff --git a/.gitignore b/.gitignore index 6bceeb1..06a57c4 100644 --- a/.gitignore +++ b/.gitignore @@ -79,3 +79,4 @@ core doc/api doc/Doxyfile examples/xorg-gtest-environment-example +examples/xorg-gtest-example commit 00221200c3208b8582e2947b20ab51690f5934b9 Author: Peter Hutterer <[email protected]> Date: Thu Jan 3 10:22:45 2013 +1000 Run configure during autogen All other xorg projects run configure, let's make this one comply with that. Support NOCONFIGURE. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/autogen.sh b/autogen.sh index a08311b..fd9c59a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -9,3 +9,6 @@ cd $srcdir autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? +if test -z "$NOCONFIGURE"; then + exec $srcdir/configure "$@" +fi -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

