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

Copy python tests for Modulemd.ModuleStream into C #199

Open
sgallagher opened this issue Feb 26, 2019 · 7 comments
Open

Copy python tests for Modulemd.ModuleStream into C #199

sgallagher opened this issue Feb 26, 2019 · 7 comments
Labels
good first issue Easy tickets suitable for a new contributor

Comments

@sgallagher
Copy link
Collaborator

Currently, most of the tests for the ModuleStream objects are run under Python. The valgrind tests for identifying memory leaks and errors can only run against tests in the C code. We need to replicate the python tests as C tests.

This would be a good task for a newcomer to the project. Look at the tests being run in modulemd/v2/tests/ModulemdTests/modulestream.py and copy them into modulemd/v2/tests/test-modulemd-modulestream.c

This will ensure that these code-paths are scanned with valgrind for leaks when ninja test is run (and when the CI test suite is executed).

@sgallagher sgallagher added the good first issue Easy tickets suitable for a new contributor label Feb 26, 2019
@ghost
Copy link

ghost commented Feb 27, 2019

hi ! I want to start contributing in this project. Please guide me how to approach. I am appliying for outreachy.

Thanks in advance.

athira-selvam added a commit to athira-selvam/libmodulemd that referenced this issue Feb 28, 2019
The tests for depends_on_stream() and build_depends_on_stream() is modified to handle empty lists
Replicates the existing python tests, and newly added tests for depends_on_stream to C.
Fixes : fedora-modularity#192
related:  fedora-modularity#199
@swagatikapanda123
Copy link

hello!! my name is swagatika . I am facing trouble in how to find an issue in the project. could you please guide me how to find an issue..

athira-selvam added a commit to athira-selvam/libmodulemd that referenced this issue Mar 6, 2019
Most of the tests for ModuleStream objects are run under Python.
The valgrind tests for identifying memory leaks and errors can only
run against tests in the C code.
The tests for ModuleStream.depends_on_stream have been copied from
Python to C.
issue : fedora-modularity#199
athira-selvam added a commit to athira-selvam/libmodulemd that referenced this issue Mar 7, 2019
Most of the tests for ModuleStream objects are run under Python.
The valgrind tests for identifying memory leaks and errors can only
run against tests in the C code.
The tests for ModuleStream.depends_on_stream have been copied from
Python to C.
issue : fedora-modularity#199
athira-selvam added a commit to athira-selvam/libmodulemd that referenced this issue Mar 9, 2019
Most of the tests for ModuleStream objects are run under Python.
The valgrind tests for identifying memory leaks and errors can only
run against tests in the C.
The tests for ModuleStream.depends_on_stream have been copied from
Python to C.
issue : fedora-modularity#199
athira-selvam added a commit to athira-selvam/libmodulemd that referenced this issue Mar 9, 2019
Most of the tests for ModuleStream objects are run under Python.
The valgrind tests for identifying memory leaks and errors can only
run against tests in the C.
The tests for ModuleStream.depends_on_stream have been copied from
Python to C.
issue : fedora-modularity#199
sgallagher pushed a commit that referenced this issue Mar 12, 2019
Most of the tests for ModuleStream objects are run under Python.
The valgrind tests for identifying memory leaks and errors can only
run against tests in the C.
The tests for ModuleStream.depends_on_stream have been copied from
Python to C.
issue : #199
@athira-selvam
Copy link
Contributor

Is @swagatikapanda123 working on this?
@sgallagher Shall I try to copy some more functions from python to C?

@athira-selvam
Copy link
Contributor

Hi,
Is anyone working on this Issue?

@swagatikapanda123
Copy link

yes !!

@OrionStar25
Copy link
Member

@sgallagher Currently, these tests are left to copy:

  1. test_buildopts
  2. v1_eol
  3. v1_yaml

Since v1 is deprecated, are 2 and 3 required to copy?

@sgallagher
Copy link
Collaborator Author

@OrionStar25 I'd prefer if they were, because it allows us to run memory checks and static analysis scans against those codepaths. Thank you (and your mentees) very much for your work on this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Easy tickets suitable for a new contributor
Projects
None yet
Development

No branches or pull requests

4 participants