[libvirt] [PATCH v3 3/3] virtestmock: Track action

Michal Privoznik mprivozn at redhat.com
Wed Aug 15 08:28:13 UTC 2018


On 08/14/2018 11:54 PM, John Ferlan wrote:
> 
> 
> On 07/27/2018 11:24 AM, Michal Privoznik wrote:
>> As advertised in the previous commit, we need the list of
>> accessed files to also contain action that caused the $path to
>> appear on the list. Not only this enables us to fine tune our
>> white list rules it also helps us to see why $path is reported.
>> For instance:
>>
>>   /run/user/1000/libvirt/libvirt-sock: connect: qemuxml2argvtest: QEMU XML-2-ARGV net-vhostuser-multiq
>>
>> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>> ---
>>  tests/virtestmock.c | 39 ++++++++++++++++++++++-----------------
>>  1 file changed, 22 insertions(+), 17 deletions(-)
>>
> 
> As noted in patch1 review, not sure how to trigger the above message any
> more with the fake nwfilter driver connection set. The code appears to
> be fine to me though, so you have my
> 
> Reviewed-by: John Ferlan <jferlan at redhat.com>
> 
> and as noted in patch1 response, I'll leave it up to you in order to
> determine the need.


The point of 2/3 and 3/3 is not to demonstrate the problem that 1/3 is
fixing but to detect it should it happen in the future. But you can see
these patches in action if you temporarily revert 1/3 and run 'make
check-access':

libvirt.git/tests $ make check-access | grep connect | grep /run/user
/run/user/1000/libvirt: connect: qemuxml2argvtest: QEMU XML-2-ARGV
net-vhostuser-multiq


Thanks for the review!

Michal




More information about the libvir-list mailing list