]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: Add mock for virRandomBytes
authorJohn Ferlan <jferlan@redhat.com>
Thu, 12 May 2016 16:15:44 +0000 (12:15 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 20 May 2016 13:36:28 +0000 (09:36 -0400)
commit6a3f4121a529d518b5aff03542745df48ba7ccef
tree4e83e529f2048b9ca3f2b895b42cfbe325db212b
parent701b0f1867055bce3b29d27d23c6935ce94086af
tests: Add mock for virRandomBytes

Create a mock for virRandomBytes to generate a not so random value.
This should be usable by other tests that need a not so random number
to be generated by including the virrandommock at preload.

The "random number" generated is based upon the size of the expected
stream of bytes being returned where each byte in the result gets
the index of the array - hence a 4 byte array returns 0x00010203.
tests/Makefile.am
tests/virrandommock.c [new file with mode: 0644]
tests/virrandomtest.c [new file with mode: 0644]