blob: a7e20d6307c07a2b43de6a4aace3b0fef3d9f09e [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')
Andrew Scullcab460b2022-05-30 10:00:06 +00008@pytest.mark.notbuildconfigspec('asan')
Simon Glassddba5202025-02-09 09:07:14 -07009def test_stackprotector(ubman):
Joel Peshkin369d87a2021-04-11 11:21:58 +020010 """Test that the stackprotector function works."""
11
Simon Glassddba5202025-02-09 09:07:14 -070012 ubman.run_command('stackprot_test',wait_for_prompt=False)
Joel Peshkin369d87a2021-04-11 11:21:58 +020013 expected_response = 'Stack smashing detected'
Simon Glassddba5202025-02-09 09:07:14 -070014 ubman.wait_for(expected_response)
15 ubman.restart_uboot()