[Skiboot] skiboot + AFL fuzz test for 'libstb' unit tests

Nageswara R Sastry rnsastry at linux.vnet.ibm.com
Wed Oct 26 18:51:21 AEDT 2016


On 2016-10-26 12:48, Stewart Smith wrote:

>> make HOSTCC=$HOME/afl/afl-clang-fast        # this built all the
>> binaries, except 'extract-gcov’.
>> make check CC=$HOME/afl/afl-clang-fast       # Here have to use CC, 
>> with
>> HOSTCC make check didn’t work.
>> 
>> make check couldn’t compile the following. But compiled ‘libstb’
>> unit tests. So proceeding further.
>> ...
>> ~skiboot/test/hello_world/Makefile.check:21: recipe for target
>> 'test/hello_world/hello_kernel/hello_kernel.o' failed
>> make: *** [test/hello_world/hello_kernel/hello_kernel.o] Error 1
> 
> So, for 'make check' it also uses HOSTCC, as we build a couple of 
> things
> for the target for tests, one of them being the best Operating System 
> OF
> ALL TIME, the hello_kernel.
> 
> So you'll need to pass HOSTCC to 'make check' to get the unit tests
> built using that compiler.
> 

Stewart, Thanks for your reply.

When I tried with HOSTCC seeing the following
$ make check HOSTCC=$HOME/afl/afl-clang-fast
	[ HOSTCC ] ccan/check_type/test/run.c
afl-clang-fast 2.35b by <lszekeres at google.com>
error: unknown warning option '-Wjump-misses-init' 
[-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wsuggest-attribute=const' 
[-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wsuggest-attribute=noreturn' 
[-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wstack-usage=1024'; did you mean 
'-Wtype-safety'? [-Werror,-Wunknown-warning-option]
skiboot/ccan/Makefile.check:28: recipe for target 
'ccan/check_type/test/run' failed
make: *** [ccan/check_type/test/run] Error 1

seems afl-clang is not understanding gcc related compile options.

-- 
Regards,
R.Nageswara Sastry



More information about the Skiboot mailing list