Joel Peshkin | 369d87a | 2021-04-11 11:21:58 +0200 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | # Copyright (c) 2021 Broadcom |
| 3 | |
| 4 | import pytest |
| 5 | import signal |
| 6 | |
| 7 | @pytest.mark.buildconfigspec('cmd_stackprotector_test') |
Andrew Scull | cab460b | 2022-05-30 10:00:06 +0000 | [diff] [blame] | 8 | @pytest.mark.notbuildconfigspec('asan') |
Joel Peshkin | 369d87a | 2021-04-11 11:21:58 +0200 | [diff] [blame] | 9 | def test_stackprotector(u_boot_console): |
| 10 | """Test that the stackprotector function works.""" |
| 11 | |
| 12 | u_boot_console.run_command('stackprot_test',wait_for_prompt=False) |
| 13 | expected_response = 'Stack smashing detected' |
| 14 | u_boot_console.wait_for(expected_response) |
| 15 | u_boot_console.restart_uboot() |