Mir

Merge lp:~afrantzis/mir/workaround-1478213-gcc-5-armhf-test-failures into lp:mir

Proposed by Alexandros Frantzis
Status: Merged
Approved by: Daniel van Vugt
Approved revision: no longer in the source branch.
Merged at revision: 2786
Proposed branch: lp:~afrantzis/mir/workaround-1478213-gcc-5-armhf-test-failures
Merge into: lp:mir
Diff against target: 48 lines (+5/-5)
1 file modified
tests/unit-tests/test_glib_main_loop.cpp (+5/-5)
To merge this branch: bzr merge lp:~afrantzis/mir/workaround-1478213-gcc-5-armhf-test-failures
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Cemil Azizoglu (community) Approve
Andreas Pokorny (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Alan Griffiths Approve
Review via email: mp+265970@code.launchpad.net

Commit message

tests: Work around strange failures seen with gcc-5 on armhf

Description of the change

tests: Work around strange failures seen with gcc-5 on armhf

I haven't found the root cause of this problem yet, but using non-empty messages in std::runtime_error or another exception type (e.g. std::exception), avoids the test failure.

See the bug comments for more strange findings.

Same fix for 0.14: https://code.launchpad.net/~afrantzis/mir/workaround-1478213-gcc-5-armhf-test-failures-for-0.14/+merge/265972

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Experience says that if we don't understand why this is happening then the problem will manifest in the worst possible circumstance.

Personally, from the notes so far I'd want to eliminate the possibility that the COW=>SSO changes to the string implementation have confused the runtime library.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

ok

review: Approve
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

Same comment as in the sister branch.

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/unit-tests/test_glib_main_loop.cpp'
2--- tests/unit-tests/test_glib_main_loop.cpp 2015-07-16 08:13:28 +0000
3+++ tests/unit-tests/test_glib_main_loop.cpp 2015-07-27 14:10:24 +0000
4@@ -268,7 +268,7 @@
5 int const signum{SIGUSR1};
6 ml.register_signal_handler(
7 {signum},
8- [&] (int) { throw std::runtime_error(""); });
9+ [&] (int) { throw std::runtime_error("signal handler error"); });
10
11 kill(getpid(), signum);
12
13@@ -512,7 +512,7 @@
14 ml.register_fd_handler(
15 {p.read_fd()},
16 this,
17- [] (int) { throw std::runtime_error(""); });
18+ [] (int) { throw std::runtime_error("fd handler error"); });
19
20 EXPECT_EQ(1, write(p.write_fd(), &data_to_write, 1));
21
22@@ -753,7 +753,7 @@
23 execute_in_forked_process(this,
24 [&]
25 {
26- ml.enqueue(this, [] { throw std::runtime_error(""); });
27+ ml.enqueue(this, [] { throw std::runtime_error("server action error"); });
28
29 EXPECT_THROW({ ml.run(); }, std::runtime_error);
30 },
31@@ -771,7 +771,7 @@
32 execute_in_forked_process(this,
33 [&]
34 {
35- ml.enqueue(this, [] { throw std::runtime_error(""); });
36+ ml.enqueue(this, [] { throw std::runtime_error("server action error"); });
37
38 EXPECT_THROW({
39 ml.run();
40@@ -1061,7 +1061,7 @@
41 execute_in_forked_process(this,
42 [&]
43 {
44- auto alarm = ml.create_alarm([] { throw std::runtime_error(""); });
45+ auto alarm = ml.create_alarm([] { throw std::runtime_error("alarm error"); });
46 alarm->reschedule_in(std::chrono::milliseconds{0});
47
48 EXPECT_THROW({ ml.run(); }, std::runtime_error);

Subscribers

People subscribed via source and target branches