Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: add session-tool --has-systemd-and-dbus #8586

Merged
merged 1 commit into from Apr 30, 2020

Conversation

zyga
Copy link
Collaborator

@zyga zyga commented Apr 30, 2020

Instead of encoding where a specific test can pass and where it cannot
based on a snapshot of the knowledge, we now can ask session-tool for an
opinion.

The check performed looks for systemd support and dbus socket and
service, as a minimal "this looks like a session" baseline.

Signed-off-by: Zygmunt Krynicki me@zygoon.pl

Copy link
Member

@anonymouse64 anonymouse64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, thanks for the improvements to session-tool!

# and systemd-shim is really responding to "systemd" requests.
test -n "$(command -v busctl)" || ( echo "no busctl"; exit 1 )
if [ "$user" = "root" ]; then
# /lib /usr/lib (if present) dbus-broker.service variant
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spacing seems off on this comment?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file uses tabs. not spaces. I could reformat everything but unless I do so this line will look off in various previews with different tab size.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you do it in a follow-up with just the white space change so that I can turn off white space in the diff and approve an empty PR :-)

Instead of encoding where a specific test can pass and where it cannot
based on a snapshot of the knowledge, we now can ask session-tool for an
opinion.

The check performed looks for systemd support and DBus socket and
service, as a minimal "this looks like a session" baseline.

Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
@zyga zyga force-pushed the feature/session-tool-query branch from 93c699e to faf920e Compare April 30, 2020 14:11
@zyga zyga marked this pull request as ready for review April 30, 2020 14:12
Copy link
Member

@anonymouse64 anonymouse64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

still LGTM

Copy link
Contributor

@stolowski stolowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@mvo5 mvo5 merged commit 3036687 into snapcore:master Apr 30, 2020
@zyga zyga deleted the feature/session-tool-query branch April 30, 2020 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants