[FFmpeg-devel] [PATCH] Improved selftest coverage for libavutil/fifo.c
Michael Niedermayer
michael at niedermayer.cc
Thu Oct 13 23:14:08 EEST 2016
On Wed, Oct 12, 2016 at 11:30:19PM -0700, Thomas Turner wrote:
> Tested functions: av_fifo_generic_peek(), av_fifo_grow()
> ---
> libavutil/tests/fifo.c | 32 +++++++++++++++++++++++++++++++-
> tests/ref/fate/fifo | 43 +++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 74 insertions(+), 1 deletion(-)
>
> diff --git a/libavutil/tests/fifo.c b/libavutil/tests/fifo.c
> index e4d7edf..4d598d3 100644
> --- a/libavutil/tests/fifo.c
> +++ b/libavutil/tests/fifo.c
> @@ -24,7 +24,7 @@ int main(void)
> {
> /* create a FIFO buffer */
> AVFifoBuffer *fifo = av_fifo_alloc(13 * sizeof(int));
> - int i, j, n;
> + int i, j, n, *p;
>
> /* fill data */
> for (i = 0; av_fifo_space(fifo) >= sizeof(int); i++)
> @@ -46,6 +46,19 @@ int main(void)
> }
> printf("\n");
>
> + /* generic peek at FIFO */
> +
> + n = av_fifo_size(fifo);
> + p = malloc(n);
missing malloc() failure test
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Those who are best at talking, realize last or never when they are wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161013/8eaecba8/attachment.sig>
More information about the ffmpeg-devel
mailing list