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

Add unittest infrastructure #5

Merged
merged 26 commits into from
Nov 17, 2022
Merged

Conversation

kellyyeh
Copy link
Collaborator

Signed-off-by: kellyyeh kellyyeh@microsoft.com

Why I did it

Add unittest infrastructure

How I did it

Modified Makefile and added test directory

How to verify it

Run make

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

@lgtm-com
Copy link

lgtm-com bot commented Jul 28, 2022

This pull request fixes 1 alert when merging fc95e2b into 6f94c2e - view on LGTM.com

fixed alerts:

  • 1 for Local variable hides global variable

@lgtm-com
Copy link

lgtm-com bot commented Jul 28, 2022

This pull request fixes 1 alert when merging b8f4a78 into 6f94c2e - view on LGTM.com

fixed alerts:

  • 1 for Local variable hides global variable

@lgtm-com
Copy link

lgtm-com bot commented Jul 29, 2022

This pull request fixes 1 alert when merging 57ba072 into 6f94c2e - view on LGTM.com

fixed alerts:

  • 1 for Local variable hides global variable

@lgtm-com
Copy link

lgtm-com bot commented Jul 31, 2022

This pull request fixes 1 alert when merging 0902ada into 6f94c2e - view on LGTM.com

fixed alerts:

  • 1 for Local variable hides global variable

@lgtm-com
Copy link

lgtm-com bot commented Jul 31, 2022

This pull request fixes 1 alert when merging cc50101 into 6f94c2e - view on LGTM.com

fixed alerts:

  • 1 for Local variable hides global variable

@saiarcot895 saiarcot895 mentioned this pull request Aug 9, 2022
@kellyyeh kellyyeh marked this pull request as draft August 9, 2022 19:20
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Aug 17, 2022

CLA Signed

The committers listed above are authorized under a signed CLA.

@kellyyeh kellyyeh marked this pull request as ready for review September 26, 2022 19:11
@lgtm-com
Copy link

lgtm-com bot commented Sep 27, 2022

This pull request fixes 1 alert when merging 91833e5 into 9c3b738 - view on LGTM.com

fixed alerts:

  • 1 for Local variable hides global variable

kellyyeh and others added 14 commits October 7, 2022 23:20
Fix up the variables used for building a test binary, use a separate
build directory (one for regular builds and one for test builds), minor
changes to the install/uninstall targets.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
* Add a couple of negative test cases.
* For sockets being created, add some basic sanity checks to make sure
the sockets were actually opened and they are UDP sockets.
* Always compile the tests with ASAN, to catch any potential issues.
* Run the tests with sudo to actually allow opening raw sockets.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
* Add new libswsscommon dependency

Add uuid-dev, libzmq3-dev in lgtm.yml

* Update lgtm.yml
Why I did it
memset() is insecure function that can cause buffer overflow

How I did it
Replace memset() by zero initialization

Signed-off-by: maipbui <maibui@microsoft.com>
kellyyeh and others added 2 commits October 7, 2022 23:20
#### Why I did it
sonic-swss-common lib will add dependency to libyang soon, so need install libyang lib to prevent build and UT break.

#### How I did it
Modify azure pipeline to install libyang in azure pipeline steps.

#### How to verify it
Pass all UT.

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

#### Description for the changelog
Modify azure pipeline to install libyang in azure pipeline steps.

#### Link to config_db schema for YANG module changes

#### A picture of a cute animal (not mandatory but encouraged)
@lgtm-com
Copy link

lgtm-com bot commented Oct 10, 2022

This pull request fixes 1 alert when merging 78c9d5f into 9c3b738 - view on LGTM.com

fixed alerts:

  • 1 for Local variable hides global variable

@lgtm-com
Copy link

lgtm-com bot commented Oct 12, 2022

This pull request fixes 1 alert when merging 713a305 into 9c3b738 - view on LGTM.com

fixed alerts:

  • 1 for Local variable hides global variable

@lgtm-com
Copy link

lgtm-com bot commented Oct 24, 2022

This pull request fixes 1 alert when merging 5fd56e4 into 9c3b738 - view on LGTM.com

fixed alerts:

  • 1 for Local variable hides global variable

@lgtm-com
Copy link

lgtm-com bot commented Nov 16, 2022

This pull request fixes 1 alert when merging 2ecfe1d into 7f4fdab - view on LGTM.com

fixed alerts:

  • 1 for Local variable hides global variable

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

@kellyyeh kellyyeh merged commit 4d19e13 into sonic-net:master Nov 17, 2022
@kellyyeh kellyyeh deleted the unittest-framework branch November 17, 2022 18:05
jcaiMR pushed a commit to jcaiMR/sonic-dhcp-relay that referenced this pull request Dec 14, 2022
# This is the 1st commit message:

fix multi-vlan relay issue

# This is the commit message sonic-net#2:

issue fix

# This is the commit message sonic-net#3:

code refine in UT

# This is the commit message sonic-net#4:

fix counter rollback issue

# This is the commit message sonic-net#5:

Use github code scanning instead of LGTM (sonic-net#26)

* Use github code scanning instead of LGTM

* fi libyang libyang1

* remove libyang1

* add python

* add libpython
@qiluo-msft
Copy link
Collaborator

This commit could not be cleanly cherry-picked to 202012. Please submit another PR.

kellyyeh added a commit to kellyyeh/sonic-dhcp-relay that referenced this pull request Feb 1, 2023
kellyyeh added a commit to kellyyeh/sonic-dhcp-relay that referenced this pull request Feb 1, 2023
yxieca pushed a commit that referenced this pull request Feb 1, 2023
This is cherry-pick from PR #5
Signed-off-by: kellyyeh kellyyeh@microsoft.com

Why I did it
Add unittest infrastructure

How I did it
Modified Makefile and added test directory

How to verify it
Run make
@liuh-80
Copy link
Contributor

liuh-80 commented Feb 2, 2023

202012 branch PR merged: #31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants