Skip to content

Commit

Permalink
keyctl05: Add modprobe dns_resolver
Browse files Browse the repository at this point in the history
This avoids TCONF when module not loaded:
keyctl05.c:99: TCONF: kernel doesn't support key type 'dns_resolver'

There is no way to trigger module loading automatically.

Link: https://lore.kernel.org/ltp/[email protected]/
Reviewed-by: Cyril Hrubis <[email protected]>
Signed-off-by: Petr Vorel <[email protected]>
  • Loading branch information
pevik committed Jan 18, 2024
1 parent db0082b commit f4e1322
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion testcases/kernel/syscalls/keyctl/keyctl05.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
#include "tst_test.h"
#include "lapi/keyctl.h"

#define MODULE "dns_resolver"

/*
* A valid payload for the "asymmetric" key type. This is an x509 certificate
* in DER format, generated using:
Expand Down Expand Up @@ -193,6 +195,9 @@ static void test_update_setperm_race(void)

static void setup(void)
{
/* There is no way to trigger automatic dns_resolver module loading. */
tst_cmd((const char*[]){"modprobe", MODULE, NULL}, NULL, NULL, 0);

fips_enabled = tst_fips_enabled();
}

Expand All @@ -213,7 +218,7 @@ static void do_test(unsigned int i)
x509_cert, sizeof(x509_cert));
break;
case 1:
test_update_nonupdatable("dns_resolver", dns_res_payload,
test_update_nonupdatable(MODULE, dns_res_payload,
sizeof(dns_res_payload));
break;
case 2:
Expand Down

0 comments on commit f4e1322

Please sign in to comment.