test_stackprotector.py 491 B

123456789101112131415
  1. # SPDX-License-Identifier: GPL-2.0
  2. # Copyright (c) 2021 Broadcom
  3. import pytest
  4. import signal
  5. @pytest.mark.buildconfigspec('cmd_stackprotector_test')
  6. @pytest.mark.notbuildconfigspec('asan')
  7. def test_stackprotector(u_boot_console):
  8. """Test that the stackprotector function works."""
  9. u_boot_console.run_command('stackprot_test',wait_for_prompt=False)
  10. expected_response = 'Stack smashing detected'
  11. u_boot_console.wait_for(expected_response)
  12. u_boot_console.restart_uboot()