From f6b768e00281e488f259f9a75ff1bd18cf77bc82 Mon Sep 17 00:00:00 2001 From: nip <182409448+nip-was-here@users.noreply.github.com> Date: Mon, 19 Oct 2026 08:35:37 +0400 Subject: [PATCH] Revert redundant test Signed-off-by: nip <182409448+nip-was-here@users.noreply.github.com> --- tools/iso14443a_frame_test.py | 82 ----------------------------------- tools/pm3_tests.sh | 1 - 2 files changed, 83 deletions(-) delete mode 100644 tools/iso14443a_frame_test.py diff --git a/tools/iso14443a_frame_test.py b/tools/iso14443a_frame_test.py deleted file mode 100644 index 7c7d08947..000000000 --- a/tools/iso14443a_frame_test.py +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (C) Proxmark3 contributors. See AUTHORS.md for details. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -"""Compile and exercise the firmware's ISO14443A frame-completeness predicate.""" - -import os -from pathlib import Path -import shlex -import subprocess -import tempfile - - -SOURCE = r''' -#include -#include "iso14443a.h" - -int main(void) { - tDemod14a frame = {0}; - frame.len = 4; - frame.parityLen = 1; - if (!iso14a_is_complete_frame(&frame, 4)) return 1; - - // Regression: four bytes with unfinished trailing bits are not a nonce. - for (uint16_t bits = 1; bits <= 8; bits++) { - frame.bitCount = bits; - if (iso14a_is_complete_frame(&frame, 4)) return 2; - } - frame.bitCount = 0; - frame.collisionPos = 1; - if (iso14a_is_complete_frame(&frame, 4)) return 3; - frame.collisionPos = 0; - for (uint8_t parity_len = 0; parity_len <= 2; parity_len += 2) { - frame.parityLen = parity_len; - if (iso14a_is_complete_frame(&frame, 4)) return 4; - } - frame.parityLen = 1; - for (uint16_t len = 0; len <= 5; len++) { - frame.len = len; - if (iso14a_is_complete_frame(&frame, 4) != (len == 4)) return 5; - } - frame.len = 0; - frame.parityLen = 0; - if (iso14a_is_complete_frame(&frame, 0)) return 6; - frame.len = 9; - frame.parityLen = 1; - if (iso14a_is_complete_frame(&frame, 9)) return 7; - frame.parityLen = 2; - if (!iso14a_is_complete_frame(&frame, 9)) return 8; - puts("ISO14443A frame test: OK"); - return 0; -} -''' - - -def main(): - root = Path(__file__).resolve().parent.parent - with tempfile.TemporaryDirectory(prefix="iso14443a-frame-test-") as directory: - executable = Path(directory) / ("frame_test.exe" if os.name == "nt" else "frame_test") - command = shlex.split(os.environ.get("CC", "cc")) + [ - "-std=c99", "-Wall", "-Wextra", "-Werror", "-DPM5", - "-I" + str(root / "armsrc"), "-I" + str(root / "include"), - "-I" + str(root / "common"), "-x", "c", "-", "-o", str(executable), - ] - subprocess.run(command, input=SOURCE, text=True, check=True) - subprocess.run([str(executable)], check=True) - - -if __name__ == "__main__": - main() diff --git a/tools/pm3_tests.sh b/tools/pm3_tests.sh index 6ee67c338..3a0487970 100755 --- a/tools/pm3_tests.sh +++ b/tools/pm3_tests.sh @@ -299,7 +299,6 @@ while true; do if ! CheckExecute "findbits_test test" "$PYTHON tools/findbits_test.py 2>&1" "OK"; then break; fi if ! CheckExecute "dfc_converter test" "$PYTHON tools/dfc_converter_test.py 2>&1" "OK"; then break; fi if ! CheckExecute "PM5 RTC tick test" "$PYTHON tools/pm5_rtc_tick_test.py 2>&1" "RTC tick snapshot test: OK"; then break; fi - if ! CheckExecute "iso14443a frame test" "$PYTHON tools/iso14443a_frame_test.py 2>&1" "ISO14443A frame test: OK"; then break; fi if ! CheckExecute "pm3_eml_mfd test" "$PYTHON tools/mfc/pm3_eml_mfd_test.py 2>&1" "OK"; then break; fi if ! CheckExecute "recover_pk test" "$PYTHON tools/recover_pk.py selftests 2>&1" "Tests:.*\(.*ok.*"; then break; fi if ! CheckExecute "mkversion create test" "tools/mkversion.sh --short" 'Iceman/'; then break; fi