diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-12-13 23:24:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-13 23:24:42 -0500 |
commit | 4014818d530ad3f6f5e4b94b79a9336376feface (patch) | |
tree | cadf4eb8a8c4c0be179b02c92eb811115dd8c268 /src/test | |
parent | 9cf314f34d9ca26bb8867effdf54fc2c78b06f31 (diff) | |
parent | ab79099d1684457d040ee7c28b2012e8c1ea9a4f (diff) |
Merge pull request #4806 from poettering/keyring-init
set up a per-service session kernel keyring, and store the invocation ID in it
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-id128.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test-id128.c b/src/test/test-id128.c index ab5a111ba9..e8c4c3e550 100644 --- a/src/test/test-id128.c +++ b/src/test/test-id128.c @@ -39,6 +39,7 @@ int main(int argc, char *argv[]) { char t[33], q[37]; _cleanup_free_ char *b = NULL; _cleanup_close_ int fd = -1; + int r; assert_se(sd_id128_randomize(&id) == 0); printf("random: %s\n", sd_id128_to_string(id, t)); @@ -159,5 +160,12 @@ int main(int argc, char *argv[]) { assert_se(sd_id128_get_machine_app_specific(SD_ID128_MAKE(51,df,0b,4b,c3,b0,4c,97,80,e2,99,b9,8c,a3,73,b8), &id2) >= 0); assert_se(!sd_id128_equal(id, id2)); + /* Query the invocation ID */ + r = sd_id128_get_invocation(&id); + if (r < 0) + log_warning_errno(r, "Failed to get invocation ID, ignoring: %m"); + else + log_info("Invocation ID: " SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(id)); + return 0; } |