Removing null characters while decoding from syseeprom#338
Merged
mihirpat1 merged 1 commit intosonic-net:masterfrom Dec 19, 2022
Merged
Removing null characters while decoding from syseeprom#338mihirpat1 merged 1 commit intosonic-net:masterfrom
mihirpat1 merged 1 commit intosonic-net:masterfrom
Conversation
Signed-off-by: Mihir Patel <patelmi@microsoft.com>
keboliu
approved these changes
Dec 19, 2022
Collaborator
|
@mihirpat1 Thanks Mihir. Can you test this on Celestica, Dell and arista platforms? |
Contributor
Author
Hi @prgeor , |
prgeor
approved these changes
Dec 19, 2022
8 tasks
keboliu
pushed a commit
to keboliu/sonic-platform-common
that referenced
this pull request
Jan 12, 2023
Signed-off-by: Mihir Patel <patelmi@microsoft.com>
StormLiangMS
pushed a commit
that referenced
this pull request
Jan 23, 2023
Signed-off-by: Mihir Patel <patelmi@microsoft.com>
oleksandrivantsiv
pushed a commit
to oleksandrivantsiv/sonic-platform-common
that referenced
this pull request
Oct 25, 2024
…dor API CLI return key-values pairs (sonic-net#338) The main motivation of this PR is improve coverage of ycabled. While fixing unit test cases found an improvement to the name key-values returned to CLI, changed those names for keys as well Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com Description Motivation and Context How Has This Been Tested? Unit-Tests and running the changes on testbed. Additional Information (Optional)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR will track the resolution for failure seen on Mellanox devices with SONiC management test failure for test_pmon_syseepromd_kill_and_start_status test case. The testcase is failing with the below error:
Motivation and Context
Overall, the testcase failed on Mellanox since the syseeprom has some fields wherein the string is appended by null characters. When the above testcase is executed, the null characters in the string are causing the error seen.
We observed that other platforms have string not terminated with null characters for various fields and the length mentioned in the EEPROM is same that of the string on EEPROM.
The below o/p was taken from Mellanox 3800 and it can be seen that the length of string is 20 which includes multiple null characters (^@ is 1 null character). The actual length of the string is 13 and there are 7 additional null characters.
root@str2-sn3800-02:/home/admin# sonic-db-cli STATE_DB HGETALL "EEPROM_INFO|0x22" | cat --show-nonprinting
{'Name': 'Part Number', 'Len': '20', 'Value': 'MSN3800-CS2FO^@^@^@^@^@^@^@'}
root@str2-sn3800-02:/home/admin#
How Has This Been Tested?
Please refer to the below for the details related to the tests performed
test_pmon_syseepromd_kill_and_start_status_test.txt
Additional Information (Optional)
Signed-off-by: Mihir Patel patelmi@microsoft.com