Path: blob/master/tools/testing/selftests/firmware/fw_run_tests.sh
26285 views
#!/bin/bash1# SPDX-License-Identifier: GPL-2.023# This runs all known tests across all known possible configurations we could4# emulate in one run.56set -e78TEST_DIR=$(dirname $0)9source $TEST_DIR/fw_lib.sh1011export HAS_FW_LOADER_USER_HELPER=""12export HAS_FW_LOADER_USER_HELPER_FALLBACK=""13export HAS_FW_LOADER_COMPRESS=""1415run_tests()16{17proc_set_force_sysfs_fallback $118proc_set_ignore_sysfs_fallback $219$TEST_DIR/fw_filesystem.sh2021proc_set_force_sysfs_fallback $122proc_set_ignore_sysfs_fallback $223$TEST_DIR/fw_fallback.sh2425proc_set_force_sysfs_fallback $126proc_set_ignore_sysfs_fallback $227$TEST_DIR/fw_upload.sh28}2930run_test_config_0001()31{32echo "-----------------------------------------------------"33echo "Running kernel configuration test 1 -- rare"34echo "Emulates:"35echo "CONFIG_FW_LOADER=y"36echo "CONFIG_FW_LOADER_USER_HELPER=n"37echo "CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n"38run_tests 0 139}4041run_test_config_0002()42{43echo "-----------------------------------------------------"44echo "Running kernel configuration test 2 -- distro"45echo "Emulates:"46echo "CONFIG_FW_LOADER=y"47echo "CONFIG_FW_LOADER_USER_HELPER=y"48echo "CONFIG_FW_LOADER_USER_HELPER_FALLBACK=n"49proc_set_ignore_sysfs_fallback 050run_tests 0 051}5253run_test_config_0003()54{55echo "-----------------------------------------------------"56echo "Running kernel configuration test 3 -- android"57echo "Emulates:"58echo "CONFIG_FW_LOADER=y"59echo "CONFIG_FW_LOADER_USER_HELPER=y"60echo "CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y"61run_tests 1 062}6364check_mods65check_setup6667echo "Running namespace test: "68$TEST_DIR/fw_namespace $DIR/trigger_request69echo "OK"7071if [ -f $FW_FORCE_SYSFS_FALLBACK ]; then72run_test_config_000173run_test_config_000274run_test_config_000375else76echo "Running basic kernel configuration, working with your config"77run_tests78fi798081