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

Unable to run SAI fake tests #88

Open
ravi861 opened this issue Jul 17, 2020 · 3 comments
Open

Unable to run SAI fake tests #88

ravi861 opened this issue Jul 17, 2020 · 3 comments

Comments

@ravi861
Copy link

ravi861 commented Jul 17, 2020

When try to execute sai_test-fake-1.5.0, I encountered the following error.

[root@ccb9aa60476f fboss]# ./sai_test-fake-1.5.0 --gtest_filter=HwVlanTest.VlanApplyConfig
Note: Google Test filter = HwVlanTest.VlanApplyConfig
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from HwVlanTest
[ RUN      ] HwVlanTest.VlanApplyConfig
Not valid AgentConfig, fallback to parsing as SwitchConfig...
E0717 04:28:20.606528 358895 PlatformProductInfo.cpp:148] json parse error on line 0: expected json value
E0717 04:28:20.606630 358895 PlatformProductInfo.cpp:70] Failed initializing ProductInfo from /var/facebook/fboss/fruid.json, fall back to use fbwhoami: json parse error on line 0: expected json value
unknown file: Failure
C++ exception with description "invalid model name " thrown in SetUp().
[  FAILED  ] HwVlanTest.VlanApplyConfig (3 ms)
[----------] 1 test from HwVlanTest (3 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (3 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] HwVlanTest.VlanApplyConfig

 1 FAILED TEST

Upon copying a fruid.json from /tmp/fboss_bins-1cmivb7i6/share/th/fruid.json, the test seems to proceed further but then crashes.

[root@ccb9aa60476f fboss]# cp /tmp/fboss_bins-1cmivb7i6/share/th/fruid.json /var/facebook/fboss/.
[root@ccb9aa60476f fboss]#
[root@ccb9aa60476f fboss]#
[root@ccb9aa60476f fboss]#
[root@ccb9aa60476f fboss]# ./sai_test-fake-1.5.0 --gtest_filter=HwVlanTest.VlanApplyConfig
Note: Google Test filter = HwVlanTest.VlanApplyConfig
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from HwVlanTest
[ RUN      ] HwVlanTest.VlanApplyConfig
Not valid AgentConfig, fallback to parsing as SwitchConfig...
*** Aborted at 1594960127 (unix time) try "date -d @1594960127" if you are using GNU date ***
PC: @                0x0 (unknown)
*** SIGSEGV (@0x10000001f) received by PID 358898 (TID 0x7ffa017e8840) from PID 31; stack trace: ***
    @     0x7ffa00701546 google::(anonymous namespace)::FailureSignalHandler()
    @     0x7ff9ff76e630 (unknown)
    @           0x6eb916 facebook::fboss::SaiBcmPlatform::getHwConfig()
    @           0x6e29ba facebook::fboss::SaiPlatform::generateHwConfigFile()
    @           0xd05d6b facebook::fboss::Platform::init()
    @           0x6e1a6e facebook::fboss::initSaiPlatform()
    @           0x5b6593 facebook::fboss::SaiSwitchEnsemble::SaiSwitchEnsemble()
    @           0x5b60e2 facebook::fboss::createHwEnsemble()
    @           0x601cb9 facebook::fboss::HwTest::SetUp()
    @           0x6de6ea testing::internal::HandleExceptionsInMethodIfSupported<>()
    @           0x6d51d9 testing::Test::Run()
    @           0x6d54b2 testing::TestInfo::Run()
    @           0x6d5628 testing::TestSuite::Run()
    @           0x6d5c23 testing::internal::UnitTestImpl::RunAllTests()
    @           0x6dec2a testing::internal::HandleExceptionsInMethodIfSupported<>()
    @           0x6d5e75 testing::UnitTest::Run()
    @           0x4f2d9f main
    @     0x7ff9feb94555 __libc_start_main
    @           0x56467c (unknown)
    @                0x0 (unknown)
Segmentation fault

This possibly makes the application think it is some kind of HW platform.

Is there a sample fruid.json available to execute the fake SAI tests?
2a5e5b1 is the commit used when building fboss.

Any help is much appreciated?

@shri-khare
Copy link
Contributor

Don't think we support running fake tests like that:

@ravi861
Copy link
Author

ravi861 commented Jul 24, 2020

Thank you for the response. It would help if you can publish a format for the fruid.json and agent.conf if you think that will help with a custom SAI and maybe what their purpose is.

@pettershao-ragilenetworks
Copy link

pettershao-ragilenetworks commented Oct 13, 2021

hi @shri-khare I need a agent.conf too,can you help share one, thanks!

[root@bogon fboss]# ./bin/wedge_agent -mode=wedge -mgmt_if=enp7s0 -config=/etc/coop/sample3.json
Not valid AgentConfig, fallback to parsing as SwitchConfig...
terminate called after throwing an instance of 'apache::thrift::bad_field_access'
  what():  accessing unset optional value
*** Aborted at 1634091526 (Unix time, try 'date -d @1634091526') ***
*** Signal 6 (SIGABRT) (0xa2e) received by PID 2606 (pthread TID 0x7f8aa9304800) (linux TID 2606) (maybe from PID 2606, UID 0) (code: -6), stack trace: ***
(error retrieving stack trace)
Aborted

arajeev-ARISTA pushed a commit to arajeev-ARISTA/fboss that referenced this issue Sep 26, 2023
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

3 participants