Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The return value of 'sscanf()' should be checked #120

Open
QiAnXinCodeSafe opened this issue May 27, 2020 · 0 comments
Open

The return value of 'sscanf()' should be checked #120

QiAnXinCodeSafe opened this issue May 27, 2020 · 0 comments

Comments

@QiAnXinCodeSafe
Copy link

sscanf(buf + i, "%2hhx", buf + (i / 2));

facebook-github-bot pushed a commit that referenced this issue Dec 12, 2020
Summary:
ELBERT: bios_util.sh: Improve stability

- Add retry_command method to board-utils.sh. This might later be expanded to other utilities.
- Split bios program into write and verify stages, where the verify stage is retried to remove false negatives

Testing:
```
With up to 5 retries, 340 program cycles of alternating images succeeded.
The false positive failure rate is about 15% for the full 16MB image. The reason for these false readings is being investigated/
With 5 retries, the theoretical failure rate matched the measured order for subsequent retries.

e.g.:

Theoretical:
1) 0.156^0 * 0.844  = 84.4%
2) 0.156^1 * 0.844  = 13.16%
3) 0.156^2 * 0.844  = 2.05%
4) 0.156^3 * 0.844  = 0.32%
5) 0.156^4 * 0.844  = 0.05%

Measured: Out of 346 passed programming cycles: The following indicated how many read attempts it took to match the expected image.

# Attempt 1 84.40%
292
# Attempt 2 13.00%
45
# Attempt 3 1.73%
6
# Attempt 4 0.87%
3
# Attempt 5 0%
0

Pull Request resolved: facebookexternal/openbmc.arista#120

Reviewed By: mikechoifb

fbshipit-source-id: c365e5d741
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant