qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, "Daniel P. Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH] test: Fix test-crypto-secret when compiling without keyring support
Date: Fri, 03 Mar 2023 20:03:27 +0100	[thread overview]
Message-ID: <87wn3xhd34.fsf@secure.mitica> (raw)
In-Reply-To: <029b545a-e814-5917-0a3f-edc578844dbe@redhat.com> (Thomas Huth's message of "Fri, 3 Mar 2023 13:47:40 +0100")

Thomas Huth <thuth@redhat.com> wrote:
> On 01/03/2023 12.00, Juan Quintela wrote:
>> Linux keyring support is protected by CONFIG_KEYUTILS.
>> Use CONFIG_SECRET_KEYRING.
>> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> ---
>> Previous version of this patch changed the meson build rules.
>> Daniel told me that the proper fix was to change the #ifdef test.
>> ---
>>   tests/unit/test-crypto-secret.c | 10 +++++-----
>>   1 file changed, 5 insertions(+), 5 deletions(-)
>
> This seems to cause failures in the CI:
>
> https://gitlab.com/thuth/qemu/-/jobs/3870672310#L1443
> https://gitlab.com/thuth/qemu/-/jobs/3870672331#L2353

What is your configuration?
Here (Fedora 37) it works perfectly with --enable/disable-keyring.
But I have installed keyutils-libs-devel, and it appears that there is
no way to disable keyutils support through the command line.

/me removes package and retries.


> ../tests/unit/test-crypto-secret.c:29:10: fatal error: keyutils.h: No such file or directory
>    29 | #include <keyutils.h>
>       |          ^~~~~~~~~~~~
> compilation terminated.
>
> And when building locally, I got:
>
> FAILED: tests/unit/test-crypto-secret
> tests/unit/test-crypto-secret.p/test-crypto-secret.c.o: In function `test_secret_keyring_expired_key':
> ../../devel/qemu/tests/unit/test-crypto-secret.c:194: undefined reference to `add_key'
> ../../devel/qemu/tests/unit/test-crypto-secret.c:197: undefined reference to `keyctl_set_timeout'
> ../../devel/qemu/tests/unit/test-crypto-secret.c:212: undefined reference to `keyctl_unlink'
> tests/unit/test-crypto-secret.p/test-crypto-secret.c.o: In function `test_secret_keyring_revoked_key':
> ../../devel/qemu/tests/unit/test-crypto-secret.c:169: undefined reference to `add_key'
> ../../devel/qemu/tests/unit/test-crypto-secret.c:172: undefined reference to `keyctl_revoke'
> ../../devel/qemu/tests/unit/test-crypto-secret.c:186: undefined reference to `keyctl_unlink'
> tests/unit/test-crypto-secret.p/test-crypto-secret.c.o: In function `test_secret_keyring_good':
> ../../devel/qemu/tests/unit/test-crypto-secret.c:141: undefined reference to `add_key'
> ../../devel/qemu/tests/unit/test-crypto-secret.c:155: undefined reference to `keyctl_unlink'
> collect2: error: ld returned 1 exit status
>
>  Thomas



      parent reply	other threads:[~2023-03-03 19:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-01 11:00 [PATCH] test: Fix test-crypto-secret when compiling without keyring support Juan Quintela
2023-03-01 11:07 ` Daniel P. Berrangé
2023-03-03 12:47 ` Thomas Huth
2023-03-03 13:00   ` Daniel P. Berrangé
2023-03-03 19:40     ` Juan Quintela
2023-03-03 19:03   ` Juan Quintela [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wn3xhd34.fsf@secure.mitica \
    --to=quintela@redhat.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).