On 05/18/2016 02:55 AM, Peter Krempa wrote: > On Tue, May 17, 2016 at 12:36:06 -0400, John Ferlan wrote: >> v3: >> >> http://www.redhat.com/archives/libvir-list/2016-May/msg00444.html >> >> Changes since v3 (by patch)... >> >> 1. Separate out the mock for virRandomBytes. I realize this is not the >> desired state, but figured to at least be prepared for what would be >> coming as a followup to: >> >> http://www.redhat.com/archives/libvir-list/2016-May/msg00735.html > > Looking at it back I think that patch is okay by itself. Adding the mock > for virRandomBytes to deal with UUID generation is going to be worth a > separate patch with separate justification to take care of different > parts of the test suite. > OK - I can make it official; however, I was trying to figure out a way to be able to add a test to ensure that the "mocked" function was called from the tests... That whole environment is BFM (as I'm sure Michal can now attest). I do have something that can compile, but it gets a nefarious warning about the resulting image/library not being portable at build time. I can show you the code. The purpose for the code was in the followup patch where vircrypto.c is modified was to be able to have vircrypto.c call the mocked virRandomBytes. Right now I just have code that will fill in the masterkey and iv with a known value. It "proves" that the encryption code "works". John -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list