From 3a41fa7cccc0104b422d85bb1784007526219770 Mon Sep 17 00:00:00 2001 From: Ge-org Brohammer Date: Fri, 28 Aug 2026 15:19:30 +0200 Subject: [PATCH] tests/realtek: Cover the storage error path that returned a freed GError Deleting a print whose template is not in the sensor's storage makes the driver fail its task SSM, which is the path that handed an already-freed GError to fpi_device_delete_complete(). Reading the reported error is therefore what the test is for. No enrollment is involved: the test deserializes a stored realtek print whose template is deliberately not on the device, so the recording needs no finger presses and the capture stays at 90 packets. Without the previous commit the test dies rather than fails: umockdev-run ... died with 1/1 drivers+custom - libfprint:realtek-storage-errors FAIL The duplicate-enrollment path reaches the same bug through fp_enroll_ssm_done(), but capturing it needs two full enrollments and some 1.07M packets of polling traffic, so it is left out here. --- tests/meson.build | 1 + tests/realtek-storage-errors/custom.pcapng | Bin 0 -> 6524 bytes tests/realtek-storage-errors/custom.py | 68 +++++ tests/realtek-storage-errors/device | 333 +++++++++++++++++++++ 4 files changed, 402 insertions(+) create mode 100644 tests/realtek-storage-errors/custom.pcapng create mode 100644 tests/realtek-storage-errors/custom.py create mode 100644 tests/realtek-storage-errors/device diff --git a/tests/meson.build b/tests/meson.build index aad0675e..bf87956a 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -59,6 +59,7 @@ drivers_tests = { 'fpcmoc': {}, 'realtek': {}, 'realtek-5816': {}, + 'realtek-storage-errors': {}, 'focaltech_moc': { 'timeout': 30 }, 'focaltech_moc-6553': {}, 'mafpmoc': {}, diff --git a/tests/realtek-storage-errors/custom.pcapng b/tests/realtek-storage-errors/custom.pcapng new file mode 100644 index 0000000000000000000000000000000000000000..d029c041d684a86ddcb3a0737865d5fe8bffe2a5 GIT binary patch literal 6524 zcmeHLYitx%6uz^scCn?kptgmO(TJhhc6VE9TN1=6r976Bm{uc_SX!9Jn9io)UGqK4w);Ht8c zCrXMvY%-g%qIFqA{W5dXqb==C%bV-l7w4J9!IEH^IcZi)huN^SwH2qPlG4(Ji^BI8 zO)e?}Fofcy7^|Qcp;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