Bug 1519945 - mariadb-connector-c: adding unit test in the RPM spec file
Summary: mariadb-connector-c: adding unit test in the RPM spec file
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: mariadb-connector-c
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Schorm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-01 18:39 UTC by Jun Aruga
Modified: 2019-05-28 20:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-28 20:15:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jun Aruga 2017-12-01 18:39:52 UTC
Description of problem:

This is a suggestion.

There is no unit test in mariadb-connector-c.spec.

I want tests code in the spec file.
because the upstream has unit test (unittest directory).
I am also working on mysql Ruby binding application using this mariadb-connector-c [1]

There are issues related to big endian environment such as ppc64 and s390x for the ruby bindings on scratch build.

So, I am happy if we could check the reliability of the mariadb-connecter-c on several archtectures.

But the mariadb-connecter-c upstream [2] CI environment is not so great.
The CI looks only for Windows (appveyor.yml).

As mariadb server has .travis.yml file [3] that is CI on Linux, adding Travis CI test for mariadb-connector-c makes sense.
So, it's great if we could contribute for that.

Thank you in advance.

[1] https://src.fedoraproject.org/fork/jaruga/rpms/rubygem-mysql2/blob/feature/update-to-0.4.10/f/rubygem-mysql2.spec
[2] https://github.com/MariaDB/mariadb-connector-c
[3] https://github.com/MariaDB/server/blob/10.3/.travis.yml

Version-Release number of selected component (if applicable):
mariadb-connector-c-3.0.2-15.fc27

Comment 1 Michal Schorm 2017-12-01 23:59:42 UTC
Hi,

MariaDB (and MySQL) has big testsuite (~4000 tests), from which most of them are beeing run everytime mariadb (community-mysql) package compiles.
(And they take several hours to execute)

When I started to use connector package for MariaDB I ran that testsuite too, in order to check that the standalone compiled client library doesn't raise buggy behaviour.

--

Also both for mariadb and connector, some 'make test' tests exists. However, they all require running server, so they can't be run at the package creation time.

--

I sure would be grateful for aditional testing - as Fedora CI group develop. At this time, they deployed such testing for Atomic Host packages, however they said the infrastructure is ready for all fedora packages, so I look forward to it.

--

Summary:
  - If the MariaDB testsuite could be automatized to be run on
    mariadb and connector, I'd trust it enough.

  - I *really* want to leave SPECfile as clean as possible.
    Separate file for test would be my choice.

  - Fedora CI should cover infrastructure for all of that - we should rather 
    get in touch with them and enable it for our packages!

  - I never really worked with .yml tests, however I look forward to teach myself 
    some way, in order to use Fedora CI.

Comment 2 Jun Aruga 2017-12-04 14:56:22 UTC
Hi,

>   - If the MariaDB testsuite could be automatized to be run on
    mariadb and connector, I'd trust it enough.

The MariaDB must be well-maintained. However the MariaDB (https://github.com/MariaDB/server/) and mariadb-connector-c (https://github.com/MariaDB/mariadb-connector-c/) 's code are a little different.
Today I reported this issue by the difference.
https://jira.mariadb.org/browse/CONC-297

>   - I *really* want to leave SPECfile as clean as possible.
    Separate file for test would be my choice.

"clean" means no tests in the RPM spec file?
No test is better than existed tests in the spec file?


If you need "running server", I can show you the example to run the server.
I think we do not have to use "Fedora CI" to run the tests.

> https://src.fedoraproject.org/fork/jaruga/rpms/rubygem-mysql2/blob/feature/update-to-0.4.10/f/rubygem-mysql2.spec

```
%check

%{_libexecdir}/mysqld \
  --datadir="${MYSQL_TEST_DATA_DIR}" \
  --log-error="${MYSQL_TEST_LOG}" \
  --socket="${MYSQL_TEST_SOCKET}" \
  --pid-file="${MYSQL_TEST_PID_FILE}" \
  --port="${MYSQL_TEST_PORT}" \
  --ssl &

# Write tests here.

# Clean up
kill "$(cat "${MYSQL_TEST_PID_FILE}")"
```

> I never really worked with .yml tests, however I look forward to teach myself 
    some way, in order to use Fedora CI.

OK, it is popular for upstream project to run Travis CI to test on Linux environment. I may work for that on the upstream project.
Because it is useful for me to maintain MySQL ruby binding depends on mariadb-c-connector.

Comment 3 Jun Aruga 2017-12-05 15:22:49 UTC
Hi Michal Schorm

By the way, mariadb-connector-c new version 3.0.3 was released on the upstream project yesterday.
This fixes one of the big endian issues.

Could you release it on Fedora rawhide?
Thanks in advance.

Comment 4 Michal Schorm 2017-12-05 15:34:55 UTC
Hi, yes, I definitelly will pack the new CONC/C, once it is released through their official channel:
https://mariadb.com/kb/en/library/mariadb-connector-c-302-release-notes/

I'm waiting for that update too, to fix several issues.
They only released C/C 2.3.4 there, yeasterday. :(

Comment 5 Jun Aruga 2017-12-06 11:54:53 UTC
> By the way, mariadb-connector-c new version 3.0.3 was released on the upstream project yesterday.

Sorry above thing is my mistake. The version 3.0.3 is not released yet.

> https://jira.mariadb.org/browse/CONC-297

They just only added a comment "fixed version v3.0.3" for above issue page that I reported.

Comment 6 Michal Schorm 2017-12-06 11:58:36 UTC
I started wondering, where did you found that "released version" and I was about to ask :D

But as I said - I'm waiting for 3.0.3 release too, so I'll deffinitely try to pack it ASAP.

Comment 7 Jun Aruga 2017-12-06 13:51:21 UTC
OK, thanks.

You can not see "Fix Version/s 3.0.3" in "Details" section on https://jira.mariadb.org/browse/CONC-297 ?

You may have to login with jira.mariadb.org JIRA account after creating the account on the web side. I am seeing the page with login status.

Comment 8 Fedora End Of Life 2018-02-20 15:38:36 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle.
Changing version to '28'.

Comment 9 Jun Aruga 2018-05-15 12:15:36 UTC
Good news.
The upstream mariadb-connector-c started to run the own unit tests on CI now.
Adding the unit tests logic in the RPM spec file might be easier now than before.

https://github.com/MariaDB/mariadb-connector-c/blob/master/.travis.yml

I want to ask you to add unit tests in %check section.
The running the unit test helps me to identify a issue of the MariaDB Ruby connector.

Comment 10 Ben Cotton 2019-05-02 21:45:58 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 11 Ben Cotton 2019-05-28 20:15:07 UTC
Fedora 28 changed to end-of-life (EOL) status on 2019-05-28. Fedora 28 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.