Merge lp://qastaging/~nick-dedekind/unity-mir/trusted-sessions into lp://qastaging/unity-mir

Proposed by Nick Dedekind
Status: Superseded
Proposed branch: lp://qastaging/~nick-dedekind/unity-mir/trusted-sessions
Merge into: lp://qastaging/unity-mir
Diff against target: 1676 lines (+810/-118)
24 files modified
debian/changelog (+0/-18)
debian/control (+2/-2)
src/modules/Unity/Application/application.cpp (+123/-7)
src/modules/Unity/Application/application.h (+29/-5)
src/modules/Unity/Application/application_manager.cpp (+185/-58)
src/modules/Unity/Application/application_manager.h (+21/-12)
src/modules/Unity/Application/applicationscreenshotprovider.cpp (+2/-1)
src/modules/Unity/Application/dbuswindowstack.cpp (+1/-1)
src/modules/Unity/Application/inputarea.cpp (+5/-4)
src/modules/Unity/Application/mirsurfacemanager.cpp (+3/-3)
src/modules/Unity/Application/proc_info.cpp (+13/-0)
src/modules/Unity/Application/proc_info.h (+3/-0)
src/unity-mir/CMakeLists.txt (+2/-0)
src/unity-mir/focussetter.cpp (+3/-2)
src/unity-mir/promptsessionlistener.cpp (+62/-0)
src/unity-mir/promptsessionlistener.h (+47/-0)
src/unity-mir/shellserverconfiguration.cpp (+20/-1)
src/unity-mir/shellserverconfiguration.h (+4/-0)
tests/CMakeLists.txt (+1/-0)
tests/application_manager_test.cpp (+187/-0)
tests/mock_proc_info.h (+8/-3)
tests/mock_prompt_session.h (+31/-0)
tests/mock_prompt_session_manager.h (+57/-0)
tests/mock_session.h (+1/-1)
To merge this branch: bzr merge lp://qastaging/~nick-dedekind/unity-mir/trusted-sessions
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Gerry Boland (community) Needs Information
Review via email: mp+224397@code.qastaging.launchpad.net

This proposal supersedes a proposal from 2014-06-17.

This proposal has been superseded by a proposal from 2014-07-10.

Commit message

Shell implementation of Mir trust sessions.

Description of the change

Shell implementation of Mir trust sessions.
Requires lp:~nick-dedekind/mir/trusted_sessions to land

A mir trust session consists of any number of mir sessions arranged into a parent hierarchy. The last child of the hierarchy is the session which is considered to be the top focused session at all times if the unity-mir Application is in focus.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Is this actually ready for review? If not, please mark as Work in Progress

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:205
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~nick-dedekind/unity-mir/trusted-sessions/+merge/223432/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-mir-devel-ci/16/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-mir-devel-utopic-amd64-ci/16/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-mir-devel-utopic-armhf-ci/16/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-mir-devel-utopic-i386-ci/16/console

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity-mir-devel-ci/16/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal

FAILED: Continuous integration, rev:206
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~nick-dedekind/unity-mir/trusted-sessions/+merge/223432/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-mir-devel-ci/17/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-mir-devel-utopic-amd64-ci/17/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-mir-devel-utopic-armhf-ci/17/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-mir-devel-utopic-i386-ci/17/console

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity-mir-devel-ci/17/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Commit message please. Checklist too.

review: Needs Fixing
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

- std::shared_ptr<::mir::scene::Session> m_session;
+ mutable mir::scene::Session* m_lastTopSession;

So now Application doesn't have a shared_ptr to a Mir Session object. Reason unity-mir held onto that was so that the Session object was only deleted when both Mir and unity-mir had released it, as it may take time for the Application to be removed from the app list, and QML could be asking for properties of that Session after Mir was done with it.

review: Needs Fixing
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

=== modified file 'debian/control'
not necessary change for this MR, please revert

Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal
Download full text (3.2 KiB)

Taking the smaller bits first

=== added file 'src/modules/Unity/Application/promptsession.h'
+ // Qt
+#include <QSharedPointer>
not needed in header

namespace mir
+{
+namespace scene
+{
+class Session;
+class PromptSession;
+class PromptSessionManager;
please indent like in ApplicationManager

In PromptSession constructor, line 45, please line up the arguments (space missing)

+ virtual ~PromptSession();
Why virtual? Could use "= default" to have default deconstructor generated, saving you these few lines:
 +Session::~Session()
+{
+}

+ std::shared_ptr<mir::scene::Session> topProvider() const;
I find the name confusing. What is a "provider"? It returns a Session. "top" also isn't useful, unless you happen to know the internals of unity-mir::PromptSession is a stack.

+ std::shared_ptr<mir::scene::PromptSession> mirPromptSession() const;
shows that we can now easily confuse mir's PromptSession with unity-mir's PromptSession. Perhaps a slightly different class name? PromptSessionWrapper?

+Q_DECLARE_METATYPE(unitymir::PromptSession*)
Why do you need to register it as a type with MOC?

=== added file 'src/modules/Unity/Application/promptsession.cpp'
+#include <QDebug>
not used

+PromptSession::PromptSession(const std::shared_ptr<mir::scene::PromptSession>& promptSession, const std::shared_ptr<mir::scene::PromptSessionManager>& promptSessionManager)
please wrap. I'm not strict, but 120 chars is reasonable.

+ m_promptSessionManager->for_each_provider_in(m_promptSession,
+ [&child](std::shared_ptr<mir::scene::Session> const& provider) {
+ child = provider;
+ });
Really? Is there no way to identify the "top" one other than iterating the whole list/stack?!

+ auto helper = m_promptSessionManager->helper_for(m_promptSession);
I only like using auto if the type is really obvious. In this case it's not, I'd prefer you either declare the type, or use name "helperSession"

+ [&](std::shared_ptr<mir::scene::Session> const& provider) {
You only need to capture "found" here, not all locals.

+ }
please add comment to the namespace closing brace, it's a style I'm trying to maintain in this project.

=== added file 'src/modules/Unity/Application/session.h'
What's the point of this entire class? Do you need to share a mir Session with multiple Applications??

=== added file 'src/unity-mir/promptsessionlistener.cpp'
+ * Copyright (C) 2013 Canonical, Ltd.
2014

+ DLOG("PromptSessionListener::prompt_provider_added (this=%p, prompt_session=%p, prompt_provider=%p)", this, &prompt_session, (void*)prompt_provider.get());
+ DLOG("PromptSessionListener::prompt_provider_removed (this=%p, prompt_session=%p, prompt_provider=%p)", this, &prompt_session, (void*)prompt_provider.get());
please wrap

Same for the header file, prompt_provider_{added,removed} should be wrapped

=== modified file 'src/unity-mir/qmirserver.cpp'
Unnecessary change, please revert

=== modified file 'src/unity-mir/sessionauthorizer.cpp'
Unnecessary change, please revert

=== modified file 'src/modules/Unity/Application/proc_info.h'
+ virtual quint64 ppid(quint64 pid);
what does that mean? Parent process id? Does process-cpp not have a method to get that?

=== modified file 'src/mo...

Read more...

review: Needs Fixing
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

=== modified file 'src/modules/Unity/Application/mirsurface.h'
- explicit MirSurface(std::shared_ptr<mir::scene::Surface> surface, Application* application, QQuickItem *parent = 0);
1069 + explicit MirSurface(std::shared_ptr<mir::scene::Surface> surface, QSharedPointer<Session> const& session, QQuickItem *parent = 0);

I object strongly, why create distinction between an Application and a Session? Why does a shell need to know about Sessions?

In my vocabulary, Applications have Surfaces, and that's all a shell needs to know to operate. Those Surfaces can have relationships and properties, which shell can use to treat them differently.

Why do you need this?

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Nick Dedekind (nick-dedekind) wrote : Posted in a previous version of this proposal
Download full text (3.6 KiB)

> Taking the smaller bits first
>
>
>
> === added file 'src/modules/Unity/Application/promptsession.h'
> + // Qt
> +#include <QSharedPointer>
> not needed in header
>
> namespace mir
> +{
> +namespace scene
> +{
> +class Session;
> +class PromptSession;
> +class PromptSessionManager;
> please indent like in ApplicationManager
>
> In PromptSession constructor, line 45, please line up the arguments (space
> missing)
>
> + virtual ~PromptSession();
> Why virtual? Could use "= default" to have default deconstructor generated,
> saving you these few lines:
> +Session::~Session()
> +{
> +}
>
> + std::shared_ptr<mir::scene::Session> topProvider() const;
> I find the name confusing. What is a "provider"? It returns a Session. "top"
> also isn't useful, unless you happen to know the internals of unity-
> mir::PromptSession is a stack.
>
> + std::shared_ptr<mir::scene::PromptSession> mirPromptSession() const;
> shows that we can now easily confuse mir's PromptSession with unity-mir's
> PromptSession. Perhaps a slightly different class name? PromptSessionWrapper?
>
> +Q_DECLARE_METATYPE(unitymir::PromptSession*)
> Why do you need to register it as a type with MOC?
>
>
> === added file 'src/modules/Unity/Application/promptsession.cpp'
> +#include <QDebug>
> not used
>
> +PromptSession::PromptSession(const
> std::shared_ptr<mir::scene::PromptSession>& promptSession, const
> std::shared_ptr<mir::scene::PromptSessionManager>& promptSessionManager)
> please wrap. I'm not strict, but 120 chars is reasonable.

removed unitymir::PromptSession

>
> + m_promptSessionManager->for_each_provider_in(m_promptSession,
> + [&child](std::shared_ptr<mir::scene::Session> const& provider) {
> + child = provider;
> + });
> Really? Is there no way to identify the "top" one other than iterating the
> whole list/stack?!

nope. but there won't be many (like only one/two...)

>
> + auto helper = m_promptSessionManager->helper_for(m_promptSession);
> I only like using auto if the type is really obvious. In this case it's not,
> I'd prefer you either declare the type, or use name "helperSession"
>
> + [&](std::shared_ptr<mir::scene::Session> const& provider) {
> You only need to capture "found" here, not all locals.
>
> + }
> please add comment to the namespace closing brace, it's a style I'm trying to
> maintain in this project.
>
>
>
>
> === added file 'src/modules/Unity/Application/session.h'
> What's the point of this entire class? Do you need to share a mir Session with
> multiple Applications??
>

removed unitymir::Session

>
> === added file 'src/unity-mir/promptsessionlistener.cpp'
> + * Copyright (C) 2013 Canonical, Ltd.
> 2014
>
> + DLOG("PromptSessionListener::prompt_provider_added (this=%p,
> prompt_session=%p, prompt_provider=%p)", this, &prompt_session,
> (void*)prompt_provider.get());
> + DLOG("PromptSessionListener::prompt_provider_removed (this=%p,
> prompt_session=%p, prompt_provider=%p)", this, &prompt_session,
> (void*)prompt_provider.get());
> please wrap
>
> Same for the header file, prompt_provider_{added,removed} should be wrapped
>

done

>
>
> === modified file 'src/unity-mir/qmirserver.cpp'
> Unnecessary change, please reve...

Read more...

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Thanks for the design changes, I'm much happier with it now. I've mostly small annoying things to request. Taking everything except AppManager and the tests (will check them last):

=== modified file 'src/modules/Unity/Application/application.h'
+ std::shared_ptr<mir::scene::PromptSessionManager> const promptSessionManager,
Could pass by reference to save a copy?

Also, you've seen that the current variable declaration syntax mess that is the "const Type& name" and "Type const& name" confusion. I need to tidy it up, but I'm slowly standardizing everything to "const Type &name" - would you hate me if I asked you to do the same, just in the bits you added? It's ok to say no :)

+ std::shared_ptr<mir::scene::Session> effectiveSession() const;
I think "foregroundSession" is a clearer name than effectiveSession.

session() is also not a great name now, but changing it everywhere would be lots more work, so we can leave it for now.

std::shared_ptr<mir::scene::PromptSession> Application::promptSession() const;
There could be multiple such prompt sessions, but this returns only the most recently created one. Maybe better name is "foremostPromptSession" or "activePromptSession"?

+ mutable mir::scene::Session* m_lastTopSession;
"Top" -> "Foreground" please.

Note that ApplicationManager is a friend of Application, so all your additional public methods can be made private, as they're not useful to shell/QML.

+ void pushPromptSession(const std::shared_ptr<mir::scene::PromptSession>& session);
+ void removePromptSession(const std::shared_ptr<mir::scene::PromptSession>& session);
Could you rename the first to "append" - if I see "push" I expect a "pop", else "add/append" and "remove" pair nicely

=== modified file 'src/modules/Unity/Application/application.cpp'
+ mir::scene::PromptSession
please add "namespace ms = mir::scene" to the top of the file and write "ms::PromptSession" everywhere, helps to hide some of Mir's namespace verbosity.

+ std::shared_ptr<mir::scene::PromptSession> prompt_session
camelCase please.

+ std::shared_ptr<mir::scene::Session> child;
'child' could be declared outside the while loop, save create/destroy on each iteration.

+ if (m_pid == pid) {
2 spaces after m_pid. Braces not really needed either for this 1-liner (which is your usual style).

+void Application::pushPromptSession(const std::shared_ptr<mir::scene::PromptSession>& prompt_session)
camelCase please

+void Application::removePromptSession
A warning if no matching prompt session was found would not hurt, and might save future debugging pain.

=== modified file 'src/modules/Unity/Application/mirsurface.h'
Whitespace change, not needed in this MR.

Ok, last need to read AppMan, the tests, and do functional testing.

review: Needs Fixing
Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

=== added file 'src/unity-mir/promptsessionlistener.cpp'
+#include <QThread>
needed?

Revision history for this message
Nick Dedekind (nick-dedekind) wrote : Posted in a previous version of this proposal

+void Application::removePromptSession
A warning if no matching prompt session was found would not hurt, and might save future debugging pain

It calls this on applications which may not necessarily have the prompt session (loops through all apps). More efficient than checking, then removing.

Revision history for this message
Nick Dedekind (nick-dedekind) wrote : Posted in a previous version of this proposal

Fixed others.

Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

ApplicationManager:

=== modified file 'src/modules/Unity/Application/application_manager.h'
+ std::shared_ptr<mir::shell::FocusController> const& focusController,
+ const std::shared_ptr<mir::scene::PromptSessionManager>& promptSessionManager,
Consistency please

+ Application* findApplicationWithPid(const qint64 pid, bool checkSessions)
+ Application* findApplicationWithSession(const std::shared_ptr<mir::scene::Session> &session, bool checkSessions);
+ Application* findApplicationWithSession(const mir::scene::Session *session, bool checkSessions);
"checkSessions" - better name would be more like "includeChildSessions" or something like that, WDYT?

+ void onApplicationEffectiveSessionChanged();
s/Effective/Foreground/

+ if (info->contains("trust-session-demo-trusted-helper") ||
+ info->contains("unity8") ||
+ (ppid != 0 && m_procInfo->commandLine(ppid)->contains("trust-session-demo-trusted-helper"))) {
That's pretty messy. Why considering an app with "unity8" in the process name as a trusted helper? So you're allowing any process directly spawned by the trusted helper. I guess that's all we can do, until our internal discussions conclude.

+ info->asStringList()[0].toLatin1().data());
qPrintable(info->asStringList().first()) an alternative, up to you

+ if (m_fencePIDs.contains(pid)) {
It looks like you've changed m_fencePIDs contains the PIDs of all whitelisted and trusted helpers while they are running. That's ok, but "fence" is not a good name now - perhaps "ignored" or "hidden" ?

+ if (!session) { return NULL; }
2 lines, no braces please. "nullptr" too.

Ok, just tests to go

Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Tests
=== modified file 'tests/application_manager_test.cpp'

+ Application* startApplication(quint64 procId, QString const& appId)
Not a bad idea.

+ auto session1 = std::make_shared<MockSession>(appId.toStdString(), procId);
+ auto promptSession = std::make_shared<MockPromptSession>();

I don't see these being used anywhere though.

TEST_F(ApplicationManagerTests,onceAppAddedToApplicationLists_mirSurfaceCreatedEventHandled)
+ std::shared_ptr<mir::scene::Session> session = std::make_shared<MockSession>("", procId);
+++
why did you move these lines before the focusSpy?

+ std::shared_ptr<mir::scene::Surface> providerSurface((mir::scene::Surface*)__LINE__, [](mir::scene::Surface*) {}); // use mock!
What does that do? Is that comment a TODO?

+ {
+ return 0;
strange indent

Revision history for this message
Gerry Boland (gerboland) wrote : Posted in a previous version of this proposal

Ah, can you re-propose against lp:unity-mir please?

lp:unity-mir/devel really only for Mir devel compatibility changes

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Approve (continuous-integration)
Revision history for this message
Nick Dedekind (nick-dedekind) wrote : Posted in a previous version of this proposal

> Tests
> === modified file 'tests/application_manager_test.cpp'
>
> + Application* startApplication(quint64 procId, QString const& appId)
> Not a bad idea.
>
> + auto session1 = std::make_shared<MockSession>(appId.toStdString(), procId);
> + auto promptSession = std::make_shared<MockPromptSession>();
>
> I don't see these being used anywhere though.
>

Moved AppMan.onSessionstart(session1) to startApplication.
Removed other.

>
>
> TEST_F(ApplicationManagerTests,onceAppAddedToApplicationLists_mirSurfaceCreate
> dEventHandled)
> + std::shared_ptr<mir::scene::Session> session =
> std::make_shared<MockSession>("", procId);
> +++
> why did you move these lines before the focusSpy?
>

This was because of the foregroundSessionChanged signal causing a screenshot dataChanged. However, there was a bit of code duplication in the AppMan which I removed. So I've changed it back.

>
> + std::shared_ptr<mir::scene::Surface>
> providerSurface((mir::scene::Surface*)__LINE__, [](mir::scene::Surface*) {});
> // use mock!
> What does that do? Is that comment a TODO?

Made comment a TODO
mmmm. that's a shared_ptr with a custom deleter (an empty deleter in this case. Ever seen mir::test::fake_shared?).
It's using the line number as a pointer address so that calling Session::default_surface does not return nullptr, which is a condition for a Application::foregroundSession sourced by a PromptSession.
Not ideal, but that's why the TODO is there.

>
> + {
> + return 0;
> strange indent

Done

228. By Nick Dedekind

removed whitespace

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:228
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~nick-dedekind/unity-mir/trusted-sessions/+merge/224397/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-mir-devel-ci/31/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-mir-devel-utopic-amd64-ci/31/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-mir-devel-utopic-armhf-ci/31/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-mir-devel-utopic-i386-ci/31/console

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity-mir-devel-ci/31/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:227
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~nick-dedekind/unity-mir/trusted-sessions/+merge/224397/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-mir-ci/383/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-mir-utopic-amd64-ci/47
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-mir-utopic-armhf-ci/47
        deb: http://jenkins.qa.ubuntu.com/job/unity-mir-utopic-armhf-ci/47/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-mir-utopic-i386-ci/47

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity-mir-ci/383/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:228
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~nick-dedekind/unity-mir/trusted-sessions/+merge/224397/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity-mir-ci/386/
Executed test runs:
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-mir-utopic-amd64-ci/50/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-mir-utopic-armhf-ci/50/console
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity-mir-utopic-i386-ci/50/console

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity-mir-ci/386/rebuild

review: Needs Fixing (continuous-integration)
229. By Nick Dedekind

merged with trunk

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
230. By Nick Dedekind

fixed build

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

This needed?
+ info->contains("unity8") ||

Functional testing with your demo trust sessions app. For anyone else playing along at home, I did:
  bzr branch lp:~nick-dedekind/+junk/trusted_sessions_app
  sudo apt-get build-dep unity-mir
  mkdir BUILD && cd BUILD
  cmake .. -DCMAKE_INSTALL_PREFIX=/usr
  make -j4
On the phone I launched calculator & clock. Calculator in the foreground, I ran:
  ./trust-session-demo-trusted-helper -p `pgrep -f calculator`

Which worked fine.

Problem cases:
1. if calculator in the background (clock in foreground) and its trust helper opened, the trust helper appears on top of the clock app.
2. continuing problem 1, if you do a right-edge swipe to reveal spread, the preview for calculator is empty (just see a weird shadow). Tapping it brings back the trust helper screen though
3. if you open calculator's trust helper, then left-edge swipe, the trust helper closes. Intended?
4. strange things happen if I try to open 2 trust prompt sessions, one for 2 different apps. I guess that's kinda unlikely.
5. For 1 app, I opened 2 trust helpers running simultaneously. When I returned to Dash, then went back to the app, one trust helper had quit, but the other had not. Another odd situation I'm creating?
6. Clock in foreground, opened trust helper for it. Then in shell, caused app to die unexpectedly with "kill -9 `pgrep -f clock`" - shell crashed

review: Needs Information
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

> This needed?
> + info->contains("unity8") ||

Yes for now. When we create new sockets for the providers, the mir authorizes with the server pid, which is unity8 (since there is nothing connected to the socket yet).
It's possible that this is not right in mir and the session needs auth only when the connection is made by a client...
This will go away when we start using the trust socket (which skips the auth), as children inherit their parent's permission.

>
> Functional testing with your demo trust sessions app. For anyone else playing
> along at home, I did:
> bzr branch lp:~nick-dedekind/+junk/trusted_sessions_app
> sudo apt-get build-dep unity-mir
> mkdir BUILD && cd BUILD
> cmake .. -DCMAKE_INSTALL_PREFIX=/usr
> make -j4
> On the phone I launched calculator & clock. Calculator in the foreground, I
> ran:
> ./trust-session-demo-trusted-helper -p `pgrep -f calculator`
>
> Which worked fine.
>
>
>
> Problem cases:
> 1. if calculator in the background (clock in foreground) and its trust helper
> opened, the trust helper appears on top of the clock app.

Will take a look.
Technically I think this is a mir issue. It shouldn't be focusing to newly created sessions; that should be focus policy controlled by shell... Bad Mir!
Will need to jiggery poke it.

> 2. continuing problem 1, if you do a right-edge swipe to reveal spread, the
> preview for calculator is empty (just see a weird shadow). Tapping it brings
> back the trust helper screen though

Hm. When we add a provider to a prompt session, I take a new application snapshot. This however does not guarantee that anything has yet been drawn on the surface of the prompt provider surface... Not sure how to fix this.

> 3. if you open calculator's trust helper, then left-edge swipe, the trust
> helper closes. Intended?

yes. at the moment, trust helpers do not survive context switches.

> 4. strange things happen if I try to open 2 trust prompt sessions, one for 2
> different apps. I guess that's kinda unlikely.

Mmm.. multiple prompt sessions are not yet supported.

> 5. For 1 app, I opened 2 trust helpers running simultaneously. When I returned
> to Dash, then went back to the app, one trust helper had quit, but the other
> had not. Another odd situation I'm creating?

As above

> 6. Clock in foreground, opened trust helper for it. Then in shell, caused app
> to die unexpectedly with "kill -9 `pgrep -f clock`" - shell crashed

I've taken a quick look and it seems to be crashing when taking a screenshot of a session which is being closed. Haven't dug into to it, but it doesn't seem related to trust sessions, only a result of their usage.

231. By Nick Dedekind

fixed dlog

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
232. By Nick Dedekind

merged with lp:~nick-dedekind/unity-mir/thready-screenshotting

233. By Nick Dedekind

remerged with thready branch

234. By Nick Dedekind

remove authorise dodgeys for prompt sessions

235. By Nick Dedekind

reverted changes to debian/control & debian/changelog

236. By Nick Dedekind

bumped to 0.5

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches