On 22/04/14 12:19AM, Eric Biggers wrote: > From: Eric Biggers <ebiggers@xxxxxxxxxx> > > Make the encryption tests create and use a named keyring "xfstests" in > the session keyring that the tests happen to be running under, rather > than replace the session keyring using 'keyctl new_session'. > Unfortunately, the latter doesn't work when the session keyring is owned > by a non-root user, which (depending on the Linux distro) can happen if > xfstests is run in a sudo "session" rather than in a real root session. > > This isn't a great solution, as the lifetime of the keyring will no > longer be tied to the tests as it should be, but it should work. The > alternative would be the weird hack of making the 'check' script > re-execute itself using something like 'keyctl session - $0 $@'. > > Reported-by: Ritesh Harjani <ritesh.list@xxxxxxxxx> > Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx> > --- Thanks Eric for the quick resolution. This fixes the mentioned issue for me. I was able to run "-g encrypt" xfstests on my qemu session. Once all the test completed, I confirmed the keyring named xfstests was created. <results> SECTION -- ext4_4k ========================= Ran: ext4/024 generic/395 generic/396 generic/397 generic/398 generic/399 generic/419 generic/421 generic/429 generic/435 generic/440 generic/548 generic/549 generic/550 generic/576 generic/580 generic/581 generic/582 generic/583 generic/584 generic/592 generic/593 generic/595 generic/602 generic/613 generic/621 Not run: generic/549 generic/550 generic/576 generic/583 generic/584 Passed all 26 tests <keyring details> qemu-> sudo keyctl show Session Keyring 253043311 --alswrv 1000 1000 keyring: _ses 390003206 ---lswrv 1000 65534 \_ keyring: _uid.1000 235062718 --alswrv 0 0 \_ keyring: xfstests 241276015 --als--v 0 0 \_ fscrypt-provisioning: 0000111122223333 373669133 --als--v 0 0 \_ fscrypt-provisioning: 69b2f6edeee720cce0577937eb8a6751 -ritesh