diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2015-07-24 16:16:14 +1200 |
---|---|---|
committer | Andrew Shadura <andrew.shadura@collabora.co.uk> | 2016-09-26 22:34:05 +0200 |
commit | 9e0f99b2e5b9c62b4b1178865f3544e45e55ead7 (patch) | |
tree | 0a9c0fe6b0851fede86b577100ee95883650090d | |
parent | a5dffaefe050976c70298ec4a6f9651f3c98419d (diff) |
Imported Debian patch 0.9.16-0ubuntu2
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/patches/fix-test-crash.patch | 200 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 208 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index f674dca..3f5d00a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +zeitgeist (0.9.16-0ubuntu2) wily; urgency=medium + + * debian/patches/fix-test-crash.patch: + - Fix tests crashing with GCC 5.1 (LP: #1475623) + + -- Robert Ancell <robert.ancell@canonical.com> Fri, 24 Jul 2015 16:16:14 +1200 + zeitgeist (0.9.16-0ubuntu1) wily; urgency=medium * New upstream release diff --git a/debian/patches/fix-test-crash.patch b/debian/patches/fix-test-crash.patch new file mode 100644 index 0000000..a8b22ba --- /dev/null +++ b/debian/patches/fix-test-crash.patch @@ -0,0 +1,200 @@ +From 934cead2e3545e823aecac871974b28131d055e6 Mon Sep 17 00:00:00 2001 +From: Robert Ancell <robert.ancell@canonical.com> +Date: Fri, 24 Jul 2015 16:14:11 +1200 +Subject: [PATCH] Fix tests crashing with GCC 5.1 + +The tests were using a c_str() result from a std::string that had gone out of +scope. GCC 5.1 seems to be more agressive in freeing the string data before +the tests checked against it. + +https://bugs.freedesktop.org/show_bug.cgi?id=91443 +--- + extensions/fts++/test/test-stringutils.cpp | 138 +++++++++++++++++++---------- + 1 file changed, 91 insertions(+), 47 deletions(-) + +diff --git a/extensions/fts++/test/test-stringutils.cpp b/extensions/fts++/test/test-stringutils.cpp +index 7bb34fe..98c868e 100644 +--- a/extensions/fts++/test/test-stringutils.cpp ++++ b/extensions/fts++/test/test-stringutils.cpp +@@ -45,42 +45,66 @@ teardown (Fixture *fix, gconstpointer data) + static void + test_truncate (Fixture *fix, gconstpointer data) + { +- g_assert_cmpstr ("", ==, StringUtils::Truncate("").c_str ()); +- +- g_assert_cmpstr ("", ==, StringUtils::Truncate("a", 0).c_str ()); +- g_assert_cmpstr ("a", ==, StringUtils::Truncate("a", 1).c_str ()); +- g_assert_cmpstr ("a", ==, StringUtils::Truncate("a").c_str ()); +- +- g_assert_cmpstr ("", ==, StringUtils::Truncate("aa", 0).c_str ()); +- g_assert_cmpstr ("a", ==, StringUtils::Truncate("aa", 1).c_str ()); +- g_assert_cmpstr ("aa", ==, StringUtils::Truncate("aa", 2).c_str ()); +- g_assert_cmpstr ("aa", ==, StringUtils::Truncate("aa").c_str ()); +- +- +- g_assert_cmpstr ("", ==, StringUtils::Truncate("å", 0).c_str ()); +- g_assert_cmpstr ("", ==, StringUtils::Truncate("å", 1).c_str ()); +- g_assert_cmpstr ("å", ==, StringUtils::Truncate("å").c_str ()); +- +- g_assert_cmpstr ("", ==, StringUtils::Truncate("åå", 0).c_str ()); +- g_assert_cmpstr ("", ==, StringUtils::Truncate("åå", 1).c_str ()); +- g_assert_cmpstr ("å", ==, StringUtils::Truncate("åå", 2).c_str ()); +- g_assert_cmpstr ("å", ==, StringUtils::Truncate("åå", 3).c_str ()); +- g_assert_cmpstr ("åå", ==, StringUtils::Truncate("åå", 4).c_str ()); +- g_assert_cmpstr ("åå", ==, StringUtils::Truncate("åå").c_str ()); ++ std::string truncated; ++ ++ truncated = StringUtils::Truncate(""); ++ g_assert_cmpstr ("", ==, truncated.c_str ()); ++ ++ truncated = StringUtils::Truncate("a", 0); ++ g_assert_cmpstr ("", ==, truncated.c_str ()); ++ truncated = StringUtils::Truncate("a", 1); ++ g_assert_cmpstr ("a", ==, truncated.c_str ()); ++ truncated = StringUtils::Truncate("a"); ++ g_assert_cmpstr ("a", ==, truncated.c_str ()); ++ ++ truncated = StringUtils::Truncate("aa", 0); ++ g_assert_cmpstr ("", ==, truncated.c_str ()); ++ truncated = StringUtils::Truncate("aa", 1); ++ g_assert_cmpstr ("a", ==, truncated.c_str ()); ++ truncated = StringUtils::Truncate("aa", 2); ++ g_assert_cmpstr ("aa", ==, truncated.c_str ()); ++ truncated = StringUtils::Truncate("aa"); ++ g_assert_cmpstr ("aa", ==, truncated.c_str ()); ++ ++ ++ truncated = StringUtils::Truncate("å", 0); ++ g_assert_cmpstr ("", ==, truncated.c_str ()); ++ truncated = StringUtils::Truncate("å", 1); ++ g_assert_cmpstr ("", ==, truncated.c_str ()); ++ truncated = StringUtils::Truncate("å"); ++ g_assert_cmpstr ("å", ==, truncated.c_str ()); ++ ++ truncated = StringUtils::Truncate("åå", 0); ++ g_assert_cmpstr ("", ==, truncated.c_str ()); ++ truncated = StringUtils::Truncate("åå", 1); ++ g_assert_cmpstr ("", ==, truncated.c_str ()); ++ truncated = StringUtils::Truncate("åå", 2); ++ g_assert_cmpstr ("å", ==, truncated.c_str ()); ++ truncated = StringUtils::Truncate("åå", 3); ++ g_assert_cmpstr ("å", ==, truncated.c_str ()); ++ truncated = StringUtils::Truncate("åå", 4); ++ g_assert_cmpstr ("åå", ==, truncated.c_str ()); ++ truncated = StringUtils::Truncate("åå"); ++ g_assert_cmpstr ("åå", ==, truncated.c_str ()); + } + + static void + test_mangle (Fixture *fix, gconstpointer data) + { +- g_assert_cmpstr ("", ==, StringUtils::MangleUri("").c_str ()); ++ std::string mangled; ++ ++ mangled = StringUtils::MangleUri(""); ++ g_assert_cmpstr ("", ==, mangled.c_str ()); + +- g_assert_cmpstr ("file", ==, StringUtils::MangleUri("file").c_str ()); +- g_assert_cmpstr ("file___", ==, StringUtils::MangleUri("file://").c_str ()); +- g_assert_cmpstr ("http___www_zeitgeist_project_com", ==, +- StringUtils::MangleUri("http://www.zeitgeist-project.com").c_str ()); ++ mangled = StringUtils::MangleUri("file"); ++ g_assert_cmpstr ("file", ==, mangled.c_str ()); ++ mangled = StringUtils::MangleUri("file://"); ++ g_assert_cmpstr ("file___", ==, mangled.c_str ()); ++ mangled = StringUtils::MangleUri("http://www.zeitgeist-project.com"); ++ g_assert_cmpstr ("http___www_zeitgeist_project_com", ==, mangled.c_str ()); + +- g_assert_cmpstr ("scheme_no_spaces_in_uris", ==, +- StringUtils::MangleUri("scheme:no spaces in uris").c_str ()); ++ mangled = StringUtils::MangleUri("scheme:no spaces in uris"); ++ g_assert_cmpstr ("scheme_no_spaces_in_uris", ==, mangled.c_str ()); + } + + static void +@@ -189,44 +213,64 @@ test_ascii_fold (Fixture *fix, gconstpointer data) + static void + test_underscores (Fixture *fix, gconstpointer data) + { +- g_assert_cmpstr ("", ==, StringUtils::RemoveUnderscores ("").c_str ()); ++ std::string s; + +- g_assert_cmpstr (" ", ==, StringUtils::RemoveUnderscores ("_").c_str ()); ++ s = StringUtils::RemoveUnderscores (""); ++ g_assert_cmpstr ("", ==, s.c_str ()); + +- g_assert_cmpstr (" ", ==, StringUtils::RemoveUnderscores ("___").c_str ()); ++ s = StringUtils::RemoveUnderscores ("_"); ++ g_assert_cmpstr (" ", ==, s.c_str ()); + +- g_assert_cmpstr ("abcd", ==, StringUtils::RemoveUnderscores ("abcd").c_str ()); ++ s = StringUtils::RemoveUnderscores ("___"); ++ g_assert_cmpstr (" ", ==, s.c_str ()); + +- g_assert_cmpstr (" abcd ", ==, StringUtils::RemoveUnderscores ("_abcd_").c_str ()); ++ s = StringUtils::RemoveUnderscores ("abcd"); ++ g_assert_cmpstr ("abcd", ==, s.c_str ()); + +- g_assert_cmpstr ("a b c d", ==, StringUtils::RemoveUnderscores ("a_b_c_d").c_str ()); ++ s = StringUtils::RemoveUnderscores ("_abcd_"); ++ g_assert_cmpstr (" abcd ", ==, s.c_str ()); ++ ++ s = StringUtils::RemoveUnderscores ("a_b_c_d"); ++ g_assert_cmpstr ("a b c d", ==, s.c_str ()); + } + + static void + test_uncamelcase (Fixture *fix, gconstpointer data) + { +- g_assert_cmpstr ("", ==, StringUtils::UnCamelcase ("").c_str ()); ++ std::string s; ++ ++ s = StringUtils::UnCamelcase (""); ++ g_assert_cmpstr ("", ==, s.c_str ()); + +- g_assert_cmpstr ("abcd", ==, StringUtils::UnCamelcase ("abcd").c_str ()); ++ s = StringUtils::UnCamelcase ("abcd"); ++ g_assert_cmpstr ("abcd", ==, s.c_str ()); + +- g_assert_cmpstr ("Abcd", ==, StringUtils::UnCamelcase ("Abcd").c_str ()); ++ s = StringUtils::UnCamelcase ("Abcd"); ++ g_assert_cmpstr ("Abcd", ==, s.c_str ()); + +- g_assert_cmpstr ("ABCD", ==, StringUtils::UnCamelcase ("ABCD").c_str ()); ++ s = StringUtils::UnCamelcase ("ABCD"); ++ g_assert_cmpstr ("ABCD", ==, s.c_str ()); + +- g_assert_cmpstr ("ABcd", ==, StringUtils::UnCamelcase ("ABcd").c_str ()); ++ s = StringUtils::UnCamelcase ("ABcd"); ++ g_assert_cmpstr ("ABcd", ==, s.c_str ()); + +- g_assert_cmpstr ("Abcd Ef", ==, StringUtils::UnCamelcase ("AbcdEf").c_str ()); ++ s = StringUtils::UnCamelcase ("AbcdEf"); ++ g_assert_cmpstr ("Abcd Ef", ==, s.c_str ()); + +- g_assert_cmpstr ("Text Editor", ==, StringUtils::UnCamelcase ("Text Editor").c_str ()); ++ s = StringUtils::UnCamelcase ("Text Editor"); ++ g_assert_cmpstr ("Text Editor", ==, s.c_str ()); + +- g_assert_cmpstr ("py Karaoke", ==, StringUtils::UnCamelcase ("pyKaraoke").c_str ()); ++ s = StringUtils::UnCamelcase ("pyKaraoke"); ++ g_assert_cmpstr ("py Karaoke", ==, s.c_str ()); + +- g_assert_cmpstr ("Zeitgeist Project", ==, StringUtils::UnCamelcase ("ZeitgeistProject").c_str ()); ++ s = StringUtils::UnCamelcase ("ZeitgeistProject"); ++ g_assert_cmpstr ("Zeitgeist Project", ==, s.c_str ()); + +- g_assert_cmpstr ("Very Nice Camel Case Text", ==, StringUtils::UnCamelcase ("VeryNiceCamelCaseText").c_str ()); ++ s = StringUtils::UnCamelcase ("VeryNiceCamelCaseText"); ++ g_assert_cmpstr ("Very Nice Camel Case Text", ==, s.c_str ()); + +- g_assert_cmpstr ("Ňeedš Ťo Wórk Óń Útf Čhářacters As WelL", ==, +- StringUtils::UnCamelcase ("ŇeedšŤoWórkÓńÚtfČhářactersAsWelL").c_str ()); ++ s = StringUtils::UnCamelcase ("ŇeedšŤoWórkÓńÚtfČhářactersAsWelL"); ++ g_assert_cmpstr ("Ňeedš Ťo Wórk Óń Útf Čhářacters As WelL", ==, s.c_str ()); + } + + static void +-- +2.4.6 + diff --git a/debian/patches/series b/debian/patches/series index f2dc38d..b4b7a4e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ disable-fts-on-touch.patch nodisplay_autostart.patch pre_populator.patch skip-failing-tests.patch +fix-test-crash.patch |