# SPDX-License-Identifier: GPL-2.0-only

menuconfig TEST
	bool "Testing"

if TEST

source "test/self/Kconfig"

config FUZZ
	bool "fuzz tests"
	select RAMDISK_BLK
	select DISK
	help
	  Say y here to add include fuzz tests into barebox.
	  These need to be exercised either via command or
	  by libfuzzer

config FUZZ_EXTERNAL
	bool "link against libfuzzer"
	depends on SANDBOX && CC_IS_CLANG
	help
	  LibFuzzer is an in-process, coverage-guided, evolutionary fuzzing
	  engine. It can be linked against barebox on the sandbox
	  architecture to feed fuzzed inputs into the fuzz tests.

if FUZZ

config CMD_FUZZ
	bool "fuzz command"
	depends on COMMAND_SUPPORT
	default y
	help
	  Command to run enabled barebox fuzz tests on fixed input.
	  If run without arguments, all tests are run.

	  This is mostly useful for debugging, use FUZZ_EXTERNAL
	  to have fuzzed inputs be bed automatically .

	  Usage: fuzz [-ls] -f FILE [test]

	  Options:
	    -l        list registered fuzz tests
	    -f FILE   use FILE as fuzz input
	    -s SIZE   read only SIZE bytes from file

endif

config TEST_KEY_RSA2048
	bool
	help
	  This is selected by crypto test code that needs a RSA2048 public
	  key. The key added by this option is stand-alone, i.e., it is
	  not part of the key ring and won't be consulted for FIT image
	  verification.

endif
