Issue with Running SAI-Challenger on Physical SONiC Switch

70 views
Skip to first unread message

Binh Nguyen Hiep

unread,
Jan 19, 2025, 3:14:04 AM1/19/25
to sonicproject

Hi Team,

I encountered an issue while running SAI-Challenger on a physical SONiC switch with the as5835_sonic testbed and Redis DB. The problem occurs consistently across all unit tests, resulting in the following error:

        while len(status) < 3 and attempts > 0:
            assert self.__check_syncd_running(), "FATAL - SyncD has exited or crashed!"
            time.sleep(tout)
            attempts -= 1
            status = self.r.lrange("GETRESPONSE_KEY_VALUE_OP_QUEUE", 0, -1)

        self.r.delete("GETRESPONSE_KEY_VALUE_OP_QUEUE")

>       assert len(status) == 3, f"SAI \"{op[1:]}\" operation failure!"
E       AssertionError: SAI "create" operation failure

It seems that SAI-Challenger stops all SONiC services before running the tests, leaving only the database and syncd running. However, to fetch the status from the GETRESPONSE_KEY_VALUE_OP_QUEUE table, the sonic.target services appear to be required.

Could you provide guidance on resolving this issue?

Thank you,
Binh Nguyen

Andriy Kokhan

unread,
Jan 19, 2025, 3:24:41 AM1/19/25
to Binh Nguyen Hiep, sonicproject
Hi Binh Nguyen,

To be able to help, more context is needed.
- What version (commit ID) of SAI Challenger (SAI-C) is used?
- Steps used to build & run SAI-C
- SONiC version running on the target device (show version output)

Best regards,
Andriy

--
You received this message because you are subscribed to the Google Groups "sonicproject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonicproject...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/sonicproject/bf015522-0fbb-4f11-8285-6a9662fcc44dn%40googlegroups.com.

Binh Nguyen Hiep

unread,
Jan 19, 2025, 5:21:52 AM1/19/25
to sonicproject
Hi Andriy,
Thanks for your help. This is my Testing environment for SAI-C and SONiC:

Latest commit ID of SAI-C: f249b338dd2596c2c511f491720ce47ccefb779a  (main branch).

Capture1.JPG

- Steps used to build & run SAI-C
1/ Copy SAI-C to SONiC switch, goto SAI-C dir
2/Build client Docker image
    ./build.sh -i client -o bullseye
    ./run.sh -i client -o bullseye
    ./exec.sh -i client
3/Run unit test
#pytest -v --testbed=as5835_sonic -k test_hostif_ut.py
Here is the json configuration of as5835 testbed:
as5835_sonic.json:

2025-01-19 17_10_12-C__Users_nh13i_AppData_Local_Temp_scp49543_home_netvision_SAI-Challenger_testbed.png
- SONiC version:

Capture.JPG

- Lib SAI version:

Capture22.JPG

Best Regards,
Binh Nguyen.

Andriy Kokhan

unread,
Jan 19, 2025, 6:18:49 AM1/19/25
to Binh Nguyen Hiep, sonicproject
In general, the steps are correct.
But to be able to run TCs, the SAI headers must be compatible (ideally - identical) on both sides - SAI-C client and DUT (libsai in SONiC). Note, currently SAI-C does not have a mechanism to validate this.

The version of SAI used by SAI-C can be found in sai.env file. However, provided details do not contain the information about the SAI version in SONiC. Since its Edgecore proprietary SONiC image, I can not trace the SONiC version to the SAI version. Probably, SONiC syslog file can provide some hints - that's something that I'd suggest you to examine.

Also, the minor comment - to be able to run UTs, you don't need "dataplane" section in as5835_sonic.json

Regards,
Andriy

Reply all
Reply to author
Forward
0 new messages