[WinError 4551] An Application Control policy has blocked this file

Windows 11 Smart App control intermittently blocks pio.exe (and the platformio.exe alias) from running tests using the native platform. Device specific platforms (E.g. atmelavr) seem to be OK. E.g.

PS C:\dev\speeduino> platformio test -e native_code_coverage --filter test_storage

Verbosity level can be increased via -v, -vv, or -vvv optionCollected 12 tests

Processing test_storage in native_code_coverage environment

Building…

Testing…

[WinError 4551] An Application Control policy has blocked this file

----------------- native_code_coverage:test_storage [ERRORED] Took 2.54 seconds -----------------

============================================ SUMMARY ============================================

Environment Test Status Duration


native_code_coverage test_storage ERRORED 00:00:02.543

=========================== 1 test cases: 0 succeeded in 00:00:02.543 ===========================