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

[Accton][platform][device]: Enhance AS9726-32D sonic_platform feature. #20866

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ec-michael-shih
Copy link
Contributor

Why I did it

Enhance features and sonic-platform and fixed bugs on this platform.

How I did it

Code base is PR14237 and enhance features on it.
Finally to do sonic-mgmt(202311) pytest successfully.

How to verify it

  1. Check sonic-platform command and show good:
    show platform {fan, temperature, firmware status, syseeprom, psustatus}
  2. Do sonic-mgmt pytest:
    test_thermal.log
    test_thermal_state_db.log
    test_watchdog.log
    test_xcvr_info_in_db.log
    test_chassis.log
    test_chassis_fans.log
    test_component.log
    test_fan_drawer.log
    test_fan_drawer_fans.log
    test_fancontrol.log
    test_fwutil.log
    test_ledd.log
    test_module.log
    test_pcied.log
    test_platform_info.log
    test_psu.log
    test_psu_fans.log
    test_psud.log
    test_sensors.log
    test_sfp.log
    test_sfpshow.log
    test_sfputil.log
    test_show_intf_xcvr.log
    test_show_platform.log
    test_snmp_psu.log
    test_syseepromd.log
    test_system_health.log
    test_system_status.log

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205
  • 202211
  • 202305

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

istockphoto-824848938-612x612

Signed-off-by: michael_shih <michael_shih@accton.com>
Signed-off-by: michael_shih <michael_shih@accton.com>
@ec-michael-shih
Copy link
Contributor Author

ec-michael-shih commented Nov 21, 2024

@lguohan @jleveque There is a code checking tool: Semgrep。
I checked that my driver uses API: strncpy(), and semgrep recommended that I use a safer writing method: API: strncpy_s().

I used the standard modification method (reference_URL), which is basically the the same modification method on sonic-buildimage with memset_s, wrap it with
#define __STDC_WANT_LIB_EXT1__ 1
and

#ifdef __STDC_LIB_EXT1__
  ...
  strncpy_s()
  ...
#endif

But the check of this rule seems to be unable to allow me to successfully pass.
Are there any concepts you’d like to share?

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

Successfully merging this pull request may close these issues.

1 participant