Files view: the full DF chain in the file path (v2.7.6)
- the tracker kept only the immediate parent DF, so a phonebook file read as
"DF_PHONEBOOK/4FA1" — the trace's own selection path (00a4080406
7F105F3A4FA1) spells out the whole chain; the channel state now carries it
(selected_df_state() returns (df, path), e.g. ('5f3a', ['7f10', '5f3a'])),
the tracker stores it per file and _file_path() renders it:
"DF_TELECOM/DF_PHONEBOOK/4FA1"
- chain rules: a child DF selected by FID appends to the current chain, MF and
the ADF restart it, an AID is its own root, a path selection uses the DFs
in the path (an explicit '7fff' collapsing to the ADF), and an EF selects
keeps it. A leading MF is implicit in a longer path; MF-only files keep
"MF/…", ADF files "ADF/…" (the previous labels unchanged)
- the chain is learned from the FCP sighting too and extends a shorter path
recorded earlier, so entries created from a GET RESPONSE still get the full
path
- verified on the live traces (sessions 47/193): 5f3a/4fa1 ->
DF_TELECOM/DF_PHONEBOOK/4FA1, 5f3a/4f30 -> DF_TELECOM/DF_PHONEBOOK/EF_PBR
(4F30), while 3f00/2fe2 -> MF/EF_ICCID (2FE2) and 7fff/6f07 ->
ADF/EF_IMSI (6F07) stay as before
- tests: selected_df_state (path/FID/MF/ADF/AID/EF cases) and a tracker flow
with a path selection asserting the full path; 529 Python + 76 Node tests
- README/README_RUS show the chain; PWA_VERSION/pyproject/version.py 2.7.6,
SW cache simtrace-analyser-v86
This commit is contained in:
1 parent
1df52a34e5
commit
5dea6bceb8
12 files changed
+184
-52
No files matched your search
@@ -13,6 +13,11 @@ def sel_fid(fid, le='02'):
|
||||
return f'00a4000002{fid}61{le}'
|
||||
|
||||
|
||||
def sel_path(path_hex, le='02'):
|
||||
"""SELECT a path from the MF (P1=08)."""
|
||||
return f'00a40804{len(path_hex) // 2:02x}{path_hex}61{le}'
|
||||
|
||||
|
||||
def gr(data_hex, total=None):
|
||||
"""GET RESPONSE carrying *data_hex* (the FCP or the read data)."""
|
||||
n = len(data_hex) // 2 if total is None else total
|
||||
@@ -541,6 +546,20 @@ class TestNaming(TrackerCase):
|
||||
'DF_GSM/EF_SST (6F38)')
|
||||
|
||||
|
||||
class TestDfChain(TrackerCase):
|
||||
def test_path_selection_keeps_the_full_df_chain(self):
|
||||
# The trace's own path selection spells out DF_TELECOM/DF_PHONEBOOK;
|
||||
# the Files view used to show only the parent DF.
|
||||
data = self.track(
|
||||
sel_path('7f105f3a4fa1'),
|
||||
gr(fcp('4fa1', rec_len=44, n_rec=100)),
|
||||
)
|
||||
entry = data['files']['5f3a/4fa1']
|
||||
self.assertEqual(entry['path'], 'DF_TELECOM/DF_PHONEBOOK/4FA1')
|
||||
self.assertEqual(entry['record_len'], 44)
|
||||
self.assertEqual(entry['n_records'], 100)
|
||||
|
||||
|
||||
class TestFilePath(unittest.TestCase):
|
||||
def test_paths(self):
|
||||
from simtrace_analyser.filetrack import _file_path
|
||||
@@ -556,6 +575,13 @@ class TestFilePath(unittest.TestCase):
|
||||
# The DF_TELECOM files are named from TS 51.011 10.5 / TS 31.102 4.5.
|
||||
self.assertEqual(_file_path('7f10', '6f3a', '6F3A'),
|
||||
'DF_TELECOM/EF_ADN (6F3A)')
|
||||
# The full DF chain (learned from the selection path) is part of the
|
||||
# path — the immediate DF alone hid DF_TELECOM for the phonebook.
|
||||
self.assertEqual(_file_path('5f3a', '4fa1', '4FA1', None,
|
||||
['7f10', '5f3a']),
|
||||
'DF_TELECOM/DF_PHONEBOOK/4FA1')
|
||||
self.assertEqual(_file_path('7fff', '6f07', 'EF_IMSI', None, ['7fff']),
|
||||
'ADF/EF_IMSI (6F07)')
|
||||
# An application selected by an unknown AID: the AID is the DF name,
|
||||
# with the EF.DIR label when the trace surfaced it.
|
||||
self.assertEqual(_file_path('aid:a00000015141434c00', '4f09', '4F09'),
|
||||
|
||||
Reference in new issue
Block a user