Comment #9 on issue 29933 by
dkr...@chromium.org: Optimize PKCS #11
Here are some details on how to manually test this fix:
1) Login.
2) Create some keys.
> p11_replay --generate
> p11_replay --generate
> p11_replay
3) Check that chapsd does have file handles open on /home/chronos/user.
> sudo lsof | grep "chapsd.*/home/chronos/user"
4) Unload and immediately check that there are no open file handles.
> sudo chaps_client --unload --path=/home/chronos/user/.chaps; !!
5) Check the syslog to verify timing - there will be three messages in the
log:
(1) chapsd: Token at ... has been removed from slot ...
(2) chaps_client: Sent Event:...
(3) chapsd: Unloaded keys...
The important thing is that message (2) occurs after message (1) and not
after (3). A delay (>100ms) should be visible between (2) and (3) but no
significant delay between (1) and (2).