Bug #47540 Backup unit tests errors on Solaris

Submitted: 23 Sep 2009 8:06 Modified: 22 Feb 2010 21:00
Reporter: Olav Sandstå Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Backup Severity:S3 (Non-critical)
Version:6.0.14 OS:Solaris (Solaris 10 on x86)
Assigned to: Ritheesh Vedire CPU Architecture:Any
Tags: PB, test failure

[23 Sep 2009 8:06] Olav Sandstå
Description:
When running the backup unit tests on Solaris several of them fail. The following output is printed:

mysys/safe_cleanup_cat_path-t...ok                                           
backup/bstr_callback_errors-t...FAILED before any test output arrived
backup/bstr_io_errors-t.........FAILED before any test output arrived
backup/bstr_eos-t...............FAILED before any test output arrived
backup/bstr_data_chunks-t.......ok                                           
backup/bstr_random_chunks-t.....ok 119/0Don't know which tests failed: got 119 ok, expected 0
backup/bstr_extra-t.............ok                                           
backup/bstr_extra1-t............ok                                           
backup/bstr_eoc-t...............ok                                           
backup/bug45737-t...............ok                                           
../dbug/tests-t.................ok     

Running the same tests on Linux does not produce any errors.

How to repeat:
1. Branch e.g. mysql-6.0-codebase-bugfixing
2. ./BUILD/autorun.sh
3. Run configure with Sun Studio:

     ./configure CC=/opt/studio12/SUNWspro/bin/cc CXX=/opt/studio12/SUNWspro/bin/CC CFLAGS="-Xa -m64 -mt -g" CXXFLAGS="-m64 -mt -g" --prefix=/home/os136802/install/mysql6 --with-client-ldflags=-static --with-plugins=myisam,innobase --enable-dtrace --with-debug

4. make
5. Run the unit tests like this:

     make test
[23 Sep 2009 9:22] Sveta Smirnova
Thank you for the report.

Verified as described.
[23 Oct 2009 6:17] Ritheesh Vedire
The unit tests passed when the function  plan(int no_of_tests) was  placed at the beginning of run_test() function .  For all the unit tests that ' failed before the output  arrived' the plan() function was at the end of the run_test()
[13 Nov 2009 15:13] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/90368

2890 Ritheesh Vedire	2009-11-13
      BUG#47540: Backup unit tests errors on Solaris.
      
      The common error is the placement of plan() at the end
       of run_test().Tests passed when plan() is placed at the begining of
       run_test() adhering to unit test frame work.
      
      In few unit tests, where number of tests to planned are not known before hand,
      plan(NO_PLAN) was called. Whenever ok() fails, g_test.failed is incremented (tap.c)
      and failed tests are reported. 
     @ sql/backup/stream_v1_transport.c
        This solves BUG#46880. See Rafal's note on BUG#46880 page.
     @ unittest/backup/bstr_callback_errors-t.c
        Tests to be planned are known, hence called plan(planned).
     @ unittest/backup/bstr_eos-t.c
        Tests to be planned are not known, hence called plan(NO_PLAN).
        Unit test had an additional issue due to BUG#46880.
     @ unittest/backup/bstr_io_errors-t.c
        Tests to be planned are not known, hence called plan(NO_PLAN).
     @ unittest/backup/bstr_random_chunks-t.c
        Tests to be planned are not known, hence called plan(NO_PLAN).
[13 Nov 2009 15:48] Rafal Somla
Good to push.
[13 Nov 2009 19:07] Chuck Bell
Approved pending changes.
[16 Nov 2009 7:37] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/90486

2890 Ritheesh Vedire	2009-11-16
      BUG#47540: Backup unit tests errors on Solaris.
      
      The common error is the placement of plan() at the end
      of run_test().Tests passed when plan() is placed at the 
      begining of run_test() adhering to unit test frame work.
      
      In few unit tests, where number of tests to planned are not 
      known  before hand, plan(NO_PLAN) was called. That was because 
      Whenever ok() fails, g_test.failed is incremented (tap.c) and 
      number of failed tests are reported. 
     @ sql/backup/stream_v1_transport.c
        This solves BUG#46880. See Rafal's note on BUG#46880 page.
     @ unittest/backup/bstr_callback_errors-t.c
        Tests to be planned are known, hence called plan(planned).
     @ unittest/backup/bstr_eos-t.c
        Tests to be planned are not known, hence called plan(NO_PLAN).
        Unit test had an additional issue due to BUG#46880.
     @ unittest/backup/bstr_io_errors-t.c
        Tests to be planned are not known, hence called plan(NO_PLAN).
     @ unittest/backup/bstr_random_chunks-t.c
        Tests to be planned are not known, hence called plan(NO_PLAN).
[15 Dec 2009 13:21] Sveta Smirnova
Bug #49711 was marked as duplicate of this one.
[20 Feb 2010 9:16] Bugs System
Pushed into 6.0.14-alpha (revid:ingo.struewing@sun.com-20100218152520-s4v1ld76bif06eqn) (version source revid:ingo.struewing@sun.com-20100119103538-wtp5alpz4p2jayl5) (merge vers: 6.0.14-alpha) (pib:16)
[22 Feb 2010 21:00] Paul DuBois
Changes for test cases. No changelog entry needed.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.047 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.