L2 Coverage Documentation for RFC#197
Conversation
|
@copilot resolve the merge conflicts in this pull request |
# Conflicts: # docs/rfc-parameter-runtime-priority.md # test/docs/l2-test-coverage-analysis.md Co-authored-by: nhanasi <107076221+nhanasi@users.noreply.github.com>
Merge conflicts resolved in commit |
There was a problem hiding this comment.
Pull request overview
This PR adds and updates documentation to better describe RFC/TR-181 parameter lookup precedence at runtime and to capture the current (and missing) L2 functional test coverage for the RFC module.
Changes:
- Documented runtime lookup priority across
librfcapi/libtr181api, including pre-tr69hostiffallback layers (store/bootstrap/defaults). - Added a comprehensive L2 functional test coverage analysis document with gap identification and proposed scenarios.
- Linked the new runtime priority doc from the repository root
README.md.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
tr181api/docs/README.md |
Updates TR181 store hierarchy docs and clarifies getLocalParam() fallback behavior. |
rfcapi/docs/README.md |
Updates getRFCParameter() documentation to include live data model behavior and bootstrap/defaults precedence. |
docs/rfc-parameter-runtime-priority.md |
New deep-dive document describing runtime priority across multiple resolution paths (RFC library, bootstrap subsystem, live hostif fallback). |
test/docs/l2-test-coverage-analysis.md |
New document mapping L2 tests to code paths, highlighting gaps, and proposing additional scenarios and mock-server enhancements. |
README.md |
Adds a link to the new runtime priority document. |
Comments suppressed due to low confidence (2)
docs/rfc-parameter-runtime-priority.md:72
- This document says legacy
RFC_xxxxkeys are always file-based viarfcVariable.ini. In the currentrfcapi.cppnon-RDKB path,RFC_keys are only routed torfcVariable.iniwhen/tmp/.tr69hostif_http_server_readyis missing; once that sentinel exists,getRFCParameter()uses the localhost HTTP path and does not special-caseRFC_keys. Please clarify this in the runtime-priority description (or align the implementation if the intent is ‘always file-based’).
For TR181-style RFC keys such as `Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.*`, the effective priority is:
1. Live data-model value from `tr69hostif`, when `/tmp/.tr69hostif_http_server_ready` exists
2. Persisted XConf-applied value in `/opt/secure/RFC/tr181store.ini`
3. Persisted bootstrap value in `/opt/secure/RFC/bootstrap.ini`
4. RFC fallback default from `/tmp/rfcdefaults.ini`, generated from `/etc/rfcdefaults/*.ini`
For legacy `RFC_xxxx` keys without a dot, lookup remains file-based and uses `/opt/secure/RFC/rfcVariable.ini` directly.
test/docs/l2-test-coverage-analysis.md:1149
- Section numbering looks inconsistent: under “## 6. Mock Server Enhancement Requirements” the subsections are labeled “### 5.1” and “### 5.2”. Renumbering these to “6.1/6.2” (or dropping the numeric prefixes) would avoid confusion when referencing sections.
## 6. Mock Server Enhancement Requirements
To support the missing test scenarios, the mock XConf server (`rfcData.js`) needs:
### 5.1 New Response Endpoints
| Endpoint | Purpose | Gap |
|---|---|---|
| `/featureControl/timeout` | Delayed response (>120s) | GAP-H1 |
| `/featureControl/503retry` | Returns 503 first N times, then 200 | GAP-H2 |
| `/featureControl/malformed` | Returns invalid JSON | GAP-H3 |
| `/featureControl/emptyFeatures` | Returns `{"featureControl":{"features":[]}}` | GAP-H3 |
| `/featureControl/noConfigData` | Returns features without configData | GAP-H3 |
| `/featureControl/changedHash` | Returns response with different configSetHash | GAP-H9 |
| `/featureControl/partnerChange` | Returns changed PartnerID | GAP-H6 |
### 5.2 New Mock XConf Response Files
| For TR181-style RFC keys (`Device.*`), the effective priority is: | ||
|
|
||
| 1. Live TR181 data model via `tr69hostif` when `/tmp/.tr69hostif_http_server_ready` exists | ||
| 2. `/opt/secure/RFC/tr181store.ini` when the host interface is not ready | ||
| 3. `/opt/secure/RFC/bootstrap.ini` when the host interface is not ready and the key is not present in `tr181store.ini` | ||
| 4. `/tmp/rfcdefaults.ini` as the final fallback | ||
|
|
||
| For legacy `RFC_xxxx` keys without a dot, the lookup remains file-based and reads `/opt/secure/RFC/rfcVariable.ini` directly. | ||
|
|
| **Test Framework:** pytest (Python) with Gherkin `.feature` files | ||
| **Test Infrastructure:** Mock XConf HTTPS server (`rfcData.js`), mock parodus binary, Docker container | ||
| **Execution Scripts:** `run_l2.sh` (main), `run_l2_reboot_trigger.sh` (reboot-specific) | ||
|
|
||
| ### Test Directory Structure | ||
|
|
||
| ``` | ||
| test/functional-tests/ | ||
| ├── features/ # Gherkin feature specifications (19 files) | ||
| │ ├── rfc_data.feature |
No description provided.