[FFmpeg-devel] [PATCH] libavutil/encryption_info: Add unit tests.

Michael Niedermayer michael at niedermayer.cc
Tue Jun 26 03:30:21 EEST 2018


On Fri, Jun 01, 2018 at 12:51:48PM -0700, Jacob Trimble wrote:
> Signed-off-by: Jacob Trimble <modmaker at google.com>
> ---
>  libavutil/Makefile                |   1 +
>  libavutil/encryption_info.h       |   2 +-
>  libavutil/tests/.gitignore        |   2 +
>  libavutil/tests/encryption_info.c | 176 ++++++++++++++++++++++++++++++
>  tests/fate/libavutil.mak          |   4 +
>  tests/ref/fate/encryption-info    |   0
>  6 files changed, 184 insertions(+), 1 deletion(-)
>  create mode 100644 libavutil/tests/encryption_info.c
>  create mode 100644 tests/ref/fate/encryption-info
> 
> diff --git a/libavutil/Makefile b/libavutil/Makefile
> index d0632f16a6..9ed24cfc82 100644
> --- a/libavutil/Makefile
> +++ b/libavutil/Makefile
> @@ -200,6 +200,7 @@ TESTPROGS = adler32                                                     \
>              des                                                         \
>              dict                                                        \
>              display                                                     \
> +            encryption_info                                             \
>              error                                                       \
>              eval                                                        \
>              file                                                        \

> diff --git a/libavutil/encryption_info.h b/libavutil/encryption_info.h
> index 9140968fde..8fe7ebfe43 100644
> --- a/libavutil/encryption_info.h
> +++ b/libavutil/encryption_info.h
> @@ -129,7 +129,7 @@ typedef struct AVEncryptionInitInfo {
>   *
>   * @param subsample_count The number of subsamples.
>   * @param key_id_size The number of bytes in the key ID, should be 16.
> - * @param key_id_size The number of bytes in the IV, should be 16.
> + * @param iv_size The number of bytes in the IV, should be 16.
>   *
>   * @return The new AVEncryptionInfo structure, or NULL on error.
>   */

How is this related to adding a test ?



> diff --git a/libavutil/tests/.gitignore b/libavutil/tests/.gitignore
> index 71f75a8ee9..9d90827954 100644
> --- a/libavutil/tests/.gitignore
> +++ b/libavutil/tests/.gitignore
> @@ -17,6 +17,7 @@
>  /dict
>  /display
>  /error
> +/encryption_info
>  /eval
>  /fifo
>  /file

> @@ -24,6 +25,7 @@
>  /hmac
>  /hwdevice
>  /imgutils
> +/integer
>  /lfg
>  /lls
>  /log

this also looks unrelated


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180626/d9d30295/attachment.sig>


More information about the ffmpeg-devel mailing list