Skip to content

Commit 6dd49ca

Browse files
author
mtirum011
committed
RDKEMW-13945: Fix L2 Issue on RFC Component
1 parent fddcb81 commit 6dd49ca

3 files changed

Lines changed: 22 additions & 42 deletions

File tree

.github/workflows/L2-tests.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,27 @@ jobs:
6666
run: |
6767
docker run -d --name native-platform --link mockxconf -v ${{ github.workspace }}:/mnt/L2_CONTAINER_SHARED_VOLUME ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest
6868
69+
6970
- name: Build RFC and Run L2 inside Native Platform Container
7071
run: |
7172
docker exec -i native-platform /bin/bash -c "cd /mnt/L2_CONTAINER_SHARED_VOLUME/ && sh ./cov_build.sh && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/lib/aarch64-linux-gnu:/usr/local/lib && sh run_l2.sh"
7273
74+
- name: Enable core dump
75+
run: ulimit -c unlimited
76+
77+
- name: Run test
78+
run: |
79+
cd /usr/local/bin
80+
./parodus '{"command":"SET","parameters":[{"name":"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload","dataType":0,"value":"TESTIMAGE_DEV.bin"}]}'
81+
82+
- name: Print stacktrace
83+
if: failure()
84+
run: |
85+
core=$(ls core* 2>/dev/null | head -n1)
86+
if [ -n "$core" ]; then
87+
gdb -batch -ex "bt full" /tmp/parodus $core
88+
fi
89+
7390
- name: Copy unknown-accountid-xconf-rfc-response json to mockxconf service
7491
run: |
7592
docker cp ${{ github.workspace }}/test/test-artifacts/mockxconf/xconf-rfc-response-unknown-accountid.json mockxconf:/etc/xconf/xconf-rfc-response.json

run_l2.sh

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -25,46 +25,9 @@ cp ./rfc.properties /opt/rfc.properties
2525
cp /opt/certs/client.pem /etc/ssl/certs/client.pem
2626
cp ./rfcMgr/gtest/mocks/tr181store.ini /opt/secure/RFC/tr181store.ini
2727

28-
rbuscli set Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Control.ConfigSetTime uint32 1763118860
28+
ls -l /usr/local/bin/parodus
2929

30-
# Run L2 Test cases
31-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_single_instance_run.json test/functional-tests/tests/test_rfc_single_instance_run.py
32-
33-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_device_offline.json test/functional-tests/tests/test_rfc_device_offline_status.py
34-
35-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_init_failure.json test/functional-tests/tests/test_rfc_initialization_failure.py
36-
37-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_xconf_communication_success.json test/functional-tests/tests/test_rfc_xconf_communication.py
38-
39-
40-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_setget_param.json test/functional-tests/tests/test_rfc_setget_param.py
41-
42-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_tr181_setget_local_param.json test/functional-tests/tests/test_rfc_tr181_setget_local_param.py
43-
44-
# The cert selector test cases are commented for now. Once the code changes are moved to open source, it will be enabled.
45-
#pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_dynamic_static_cert_selector.json test/functional-tests/tests/test_rfc_dynamic_static_cert_selector.py
46-
47-
#pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_static_cert_selector.json test/functional-tests/tests/test_rfc_static_cert_selector.py
48-
49-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_xconf_rfc_data.json test/functional-tests/tests/test_rfc_xconf_rfc_data.py
50-
51-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_xconf_request_params.json test/functional-tests/tests/test_rfc_xconf_request_params.py
52-
53-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_valid_accountid.json test/functional-tests/tests/test_rfc_valid_accountid.py
54-
55-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_factory_reset.json test/functional-tests/tests/test_rfc_factory_reset.py
56-
57-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_trigger_reboot_unknown_accountid.json test/functional-tests/tests/test_rfc_trigger_reboot.py
58-
59-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_feature_enable.json test/functional-tests/tests/test_rfc_feature_enable.py
60-
61-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_configsethash_time.json test/functional-tests/tests/test_rfc_xconf_configsethash_time.py
62-
63-
echo "ENABLE_MAINTENANCE=true" >> /etc/device.properties
64-
65-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_xconf_reboot.json test/functional-tests/tests/test_rfc_xconf_reboot.py
66-
67-
pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_override_rfc_prop.json test/functional-tests/tests/test_rfc_override_rfc_prop.py
30+
cp /usr/local/bin/parodus /tmp/parodus
6831

6932
#pytest --json-report --json-report-summary --json-report-file $RESULT_DIR/rfc_rfc_webpa.json test/functional-tests/tests/test_rfc_webpa.py
7033

test/functional-tests/tests/test_rfc_webpa.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121

2222
def test_WebPA_Set_ACC_Id():
2323
print("Starting parodus mock process")
24-
payload = '{"command":"SET","parameters":[{"name":"Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AccountInfo.AccountID","dataType":0,"value":"412370664406228514"}]}'
25-
command = ["/usr/local/bin/parodus", payload]
24+
payload = '{"command":"SET","parameters":[{"name":"Device.DeviceInfo.X_RDKCENTRAL-COM_FirmwareToDownload","dataType":0,"value":"TESTIMAGE_DEV.bin"}]}'
25+
command = ["/tmp/parodus", payload]
2626

2727
result = subprocess.run(command, capture_output=True, text=True)
2828
assert result.returncode == 0, f"Command failed with error: {result.stderr}"
@@ -36,7 +36,7 @@ def test_WebPA_Set_ACC_Id():
3636
def test_WebPA_Get_ACC_Id():
3737
print("Starting parodus mock process")
3838
payload ='{"command":"GET","names":["Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.AccountInfo.AccountID"]}'
39-
command = ["/usr/local/bin/parodus", payload]
39+
command = ["/tmp/parodus", payload]
4040

4141
result = subprocess.run(command, capture_output=True, text=True)
4242
assert result.returncode == 0, f"Command failed with error: {result.stderr}"

0 commit comments

Comments
 (0)