blob: b009437e5e05b08a9d35360cf0aca9f85ed2ff6a [file] [log] [blame]
Joel Peshkin369d87a2021-04-11 11:21:58 +02001# SPDX-License-Identifier: GPL-2.0
2# Copyright (c) 2021 Broadcom
3
4import pytest
5import signal
6
7@pytest.mark.buildconfigspec('cmd_stackprotector_test')
8def test_stackprotector(u_boot_console):
9 """Test that the stackprotector function works."""
10
11 u_boot_console.run_command('stackprot_test',wait_for_prompt=False)
12 expected_response = 'Stack smashing detected'
13 u_boot_console.wait_for(expected_response)
14 u_boot_console.restart_uboot()