~ubuntu-branches/ubuntu/vivid/mir/vivid

« back to all changes in this revision

Viewing changes to tests/acceptance-tests/test_client_library_old.cpp

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Alberto Aguirre, Ubuntu daily release
  • Date: 2014-11-20 16:41:15 UTC
  • mfrom: (1.1.78)
  • Revision ID: package-import@ubuntu.com-20141120164115-icb4r8ekhfuj1abj
Tags: 0.9.0+15.04.20141120.1-0ubuntu1
[ Alberto Aguirre ]
* New upstream release 0.9.0 (https://launchpad.net/mir/+milestone/0.9.0)
  - Enhancements:
    . New simpler API to configure and run a mir server.
    . The event loop is now based on GLib's main loop library instead of
      Boost.Asio.
    . For Android platforms, the server now sends buffer fence fds to its
      clients instead of potentially stalling the compositor thread waiting
      for them to be signalled.
    . New client debug interface to translate from surface to screen
      coordinates.
  - ABI summary: Servers need rebuilding, but clients do not;
    . Mirclient ABI unchanged at 8
    . Mircommon ABI bumped to 3
    . Mirplatform ABI bumped to 4
    . Mirserver ABI bumped to 27
  - Bug fixes:
    . Add a debug interface to translate from surface to screen coordinates
      (LP: #1346633)
    . Ensure a buffer requested by a surface is not delivered 
      after the surface is deleted (LP: #1376324)
    . Overlays are not displayed onscreen in some positions (LP: #1378326)
    . Server aborts when an exception is thrown from the main thread
      (LP: #1378740)
    . Fix race causing lost alarm notifications (LP: #1381925)
    . Avoid lifecycle notifications racing with connection release
      (LP: #1386646)
    . Improve error checking and reporting for the client library
     (LP: #1390388)
    . Mir demo-shell now detects power button using proper Linux scan codes
     (LP: #1303817)
    . A prompt session with an invalid application pid should be an error
      (LP: #1377968)
    . When XDG_RUNTIME_DIR is defined but pointing to a non-existing 
      directory use "/tmp" (LP: #1304873)
    . [regression] demo-shell bypass is not used on fullscreen surfaces if 
      there are windowed surfaces behind (LP: #1378706)
    . Mir upgrade through dist-upgrade installs incorrect platform
      (LP: #1378995)
    . Fix Mir progressbar example using internal glibc defines(LP: #239272)
    . Stop the default_lifecycle_event_handler raising SIGHUP while 
      disconnecting (LP: #1386185)
    . [regression] Mir fails to build with MIR_ENABLE_TESTS=OFF (LP: #1388539)
    . [regression] mir_demo_server_basic does not start (LP: #1391923)

[ Ubuntu daily release ]
* New rebuild forced

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright © 2012 Canonical Ltd.
 
2
 * Copyright © 2012-2014 Canonical Ltd.
3
3
 *
4
4
 * This program is free software: you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License version 3 as
16
16
 * Authored by: Thomas Guest <thomas.guest@canonical.com>
17
17
 */
18
18
 
19
 
#include "mir_test_framework/display_server_test_fixture.h"
 
19
#include "mir_test_framework/interprocess_client_server_test.h"
20
20
 
21
21
#include "mir_toolkit/mir_client_library.h"
22
22
 
28
28
 
29
29
namespace
30
30
{
31
 
char const* const mir_test_socket = mtf::test_socket_file().c_str();
32
31
bool signalled;
33
32
}
34
33
 
37
36
    signalled = true;
38
37
}
39
38
 
40
 
using ClientLibraryThread = DefaultDisplayServerTestFixture;
41
 
 
42
 
TEST_F(ClientLibraryThread, HandlesNoSignals)
 
39
struct ClientLibraryThread : mtf::InterprocessClientServerTest
43
40
{
44
 
    struct ClientConfig : TestingClientConfiguration
 
41
    void SetUp() override
45
42
    {
46
 
        void exec()
 
43
        mtf::InterprocessClientServerTest::SetUp();
 
44
        run_in_server([]{});
 
45
    }
 
46
};
 
47
 
 
48
TEST_F(ClientLibraryThread, handles_no_signals)
 
49
{
 
50
    run_in_client([&]
47
51
        {
48
52
            signalled = false;
49
53
 
81
85
            mir_connection_release(conn);
82
86
 
83
87
            EXPECT_FALSE(signalled);
84
 
        }
85
 
    } client_config;
86
 
 
87
 
    launch_client_process(client_config);
 
88
        });
88
89
}
89
90
 
90
 
TEST_F(ClientLibraryThread, DoesNotInterfereWithClientSignalHandling)
 
91
TEST_F(ClientLibraryThread, does_not_interfere_with_client_signal_handling)
91
92
{
92
 
    struct ClientConfig : TestingClientConfiguration
93
 
    {
94
 
        void exec()
 
93
    run_in_client([&]
95
94
        {
96
95
            signalled = false;
97
96
 
114
113
            mir_connection_release(conn);
115
114
 
116
115
            EXPECT_TRUE(signalled);
117
 
        }
118
 
    } client_config;
119
 
 
120
 
    launch_client_process(client_config);
 
116
        });
121
117
}