Thomas Turner
e303e3d4b9
avutil: Improved test coverage for avstring.c
...
Signed-off-by: Thomas Turner <thomastdt@googlemail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-20 18:21:24 +01:00
Michael Niedermayer
4cf3def805
avutil/tests/imgutils: Remove unused variable
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-13 00:06:53 +01:00
Wan-Teh Chang
3703f13333
avutil/tests: run the cpu_init.c test conditionally on HAVE_THREADS
...
Suggested by Diego Biurrun and James Almer.
Signed-off-by: Wan-Teh Chang <wtc@google.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-10 18:47:10 -03:00
Wan-Teh Chang
8986885801
avutil/cpu_init: remove unnecessary arguments to the main() function
...
Signed-off-by: James Almer <jamrial@gmail.com>
2016-12-10 18:47:00 -03:00
Michael Niedermayer
1b39a30247
fate: add av_image_check_size() test
...
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-12-10 22:24:10 +01:00
Wan-Teh Chang
2170017a1c
avutil: fix data race in av_get_cpu_flags()
...
Make the one-time initialization in av_get_cpu_flags() thread-safe. The
static variables |flags|, |cpuflags_mask|, and |checked| in
libavutil/cpu.c are read and written using normal load and store
operations. These are considered as data races. The fix is to use atomic
load and store operations.
Remove the |checked| variable because the invalid value of -1 for
|flags| can be used to indicate the same condition. Rename |flags| to
|cpu_flags| and move it to file scope.
The fix can be verified by running the libavutil/tests/cpu_init.c test
program under ThreadSanitizer:
./configure --toolchain=clang-tsan
make libavutil/tests/cpu_init
libavutil/tests/cpu_init
There should be no warnings from ThreadSanitizer.
Co-author: Dmitry Vyukov of Google, who suggested the data race fix.
Signed-off-by: Wan-Teh Chang <wtc@google.com>
2016-12-08 15:53:58 -05:00
Wan-Teh Chang
048b46b4e2
avutil/tests: add cpu_init to .gitignore and tests/fate
...
This is a follow-up to commit d84a21207e ,
which added the libavutil/tests/cpu_init.c.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-24 21:10:37 +01:00
Wan-Teh Chang
d84a21207e
avutil/tests: Add cpu_init.c to check whether the one-time initialization in av_get_cpu_flags() has data races.
...
Co-author: Dmitry Vyukov of Google
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-11-23 22:35:25 +01:00
Thomas Turner
09d39177dc
avutil: Improved selftest coverage for libavutil/fifo.c
...
Tested functions: av_fifo_generic_peek(), av_fifo_grow()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-10-14 23:14:33 +02:00
Anton Khirnov
5cc0057f49
lavu: remove the custom atomic API
...
It has been replaced by C11 stdatomic.h and is now unused.
2016-10-02 19:35:55 +02:00
Clément Bœsch
b77f62e27f
Merge commit ' ded4a6543d'
...
* commit 'ded4a6543d ':
xtea-test: Use struct allocation functions from the API
Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-24 11:16:52 +02:00
Clément Bœsch
b6310ab6b5
Merge commit ' 8131bd4c22'
...
* commit '8131bd4c22 ':
blowfish-test: Use struct allocation functions from the API
Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-24 11:14:23 +02:00
Clément Bœsch
1ca383c8d4
Merge commit ' a86ef80494'
...
* commit 'a86ef80494 ':
blowfish-test: Return different values for different errors
Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-24 11:10:35 +02:00
Clément Bœsch
5d48e4eafa
Merge commit ' a6a750c7ef'
...
* commit 'a6a750c7ef ':
tests: Move all test programs to a subdirectory
Merged-by: Clément Bœsch <clement@stupeflix.com>
2016-06-22 13:44:34 +02:00
Diego Biurrun
ded4a6543d
xtea-test: Use struct allocation functions from the API
2016-05-19 09:55:55 +02:00
Diego Biurrun
8131bd4c22
blowfish-test: Use struct allocation functions from the API
2016-05-19 09:55:55 +02:00
Diego Biurrun
a86ef80494
blowfish-test: Return different values for different errors
2016-05-19 09:55:55 +02:00
Diego Biurrun
a6a750c7ef
tests: Move all test programs to a subdirectory
2016-05-13 14:55:56 +02:00