Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-2159

Fix tests for pt-duplicate-key-checker

Details

    • Improvement
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 3.5.0
    • 3.5.2
    • None
    • None
    • Yes
    • Yes
    • 1

    Description

      How to Repeat

      Results are for PS-8.0.30

      $ prove -vw --trap --timer t/pt-duplicate-key-checker/
      [17:00:03] t/pt-duplicate-key-checker/basics.t ............ 
      not ok 1 - Finds mysql.columns_priv PK
      
      #   Failed test 'Finds mysql.columns_priv PK'
      #   at t/pt-duplicate-key-checker/basics.t line 36.
      #                   '# ########################################################################
      # # mysql.columns_priv                                                      
      # # ########################################################################
      # 
      # # PRIMARY (`Host`,`User`,`Db`,`Table_name`,`Column_name`)
      # 
      # # ########################################################################
      # # Summary of indexes                                                      
      # # ########################################################################
      # 
      # # Total Indexes  1
      # '
      #     doesn't match '(?^:PRIMARY \(`Host`,`Db`,`User`,`Table_name`,`Column_name`\))'
      ok 2 - No dupes on clean sandbox
      not ok 3 - Default output
      
      #   Failed test 'Default output'
      #   at t/pt-duplicate-key-checker/basics.t line 48.
      not ok 4 - --nosql
      
      #   Failed test '--nosql'
      #   at t/pt-duplicate-key-checker/basics.t line 55.
      not ok 5 - --nosummary
      
      #   Failed test '--nosummary'
      #   at t/pt-duplicate-key-checker/basics.t line 62.
      not ok 6 - Issue 306 crash on uppercase column names
      
      #   Failed test 'Issue 306 crash on uppercase column names'
      #   at t/pt-duplicate-key-checker/basics.t line 71.
      ok 7 - No dupes for issue 269
      ok 8 - No results for nonexistent db
      not ok 9 - Bug 894140
      
      #   Failed test 'Bug 894140'
      #   at t/pt-duplicate-key-checker/basics.t line 101.
      ok 10 - --key-types k
      ok 11 - --key-types f
      ok 12 - --key-types fk (explicit)
      not ok 13 - Exact unique dupes (bug 1217013)
      
      #   Failed test 'Exact unique dupes (bug 1217013)'
      #   at t/pt-duplicate-key-checker/basics.t line 147.
      # 15c15
      # < #	  `domain` varchar(175) character set utf8mb3 collate utf8mb3_bin not null
      # ---
      # > #	  `domain` varchar(175) character set utf8 collate utf8_bin not null
      not ok 14 - --verbose option doesn't skip dupes reporting (bug 1402730)
      
      #   Failed test '--verbose option doesn't skip dupes reporting (bug 1402730)'
      #   at t/pt-duplicate-key-checker/basics.t line 160.
      # 15c15
      # < #	  `domain` varchar(175) character set utf8mb3 collate utf8mb3_bin not null
      # ---
      # > #	  `domain` varchar(175) character set utf8 collate utf8_bin not null
      ok 15 - Sandbox servers
      1..15
      # Looks like you failed 8 tests of 15.
      Dubious, test returned 8 (wstat 2048, 0x800)
      Failed 8/15 subtests 
      [17:00:10] t/pt-duplicate-key-checker/clustered_keys.t .... 
      not ok 1 - Shorten, not remove, clustered dupes
      
      #   Failed test 'Shorten, not remove, clustered dupes'
      #   at t/pt-duplicate-key-checker/clustered_keys.t line 40.
      # 10,11c10,11
      # < #	  `b` int not null
      # < #	  `a` int not null
      # ---
      # > #	  `b` int(11) not null
      # > #	  `a` int(11) not null
      ok 2 - PTDEBUG doesn't auto-vivify cluster key hashref (bug 1036804)
      ok 3 - fk_chosen_index_bug_1201443
      ok 4 - Sandbox servers
      1..4
      # Looks like you failed 1 test of 4.
      Dubious, test returned 1 (wstat 256, 0x100)
      Failed 1/4 subtests 
      [17:00:19] t/pt-duplicate-key-checker/issue_1192.t ........ 
      1..2
      not ok 1 - Keys are sorted lc so left-prefix magic works (issue 1192)
      
      #   Failed test 'Keys are sorted lc so left-prefix magic works (issue 1192)'
      #   at t/pt-duplicate-key-checker/issue_1192.t line 41.
      ok 2 - Sandbox servers
      # Looks like you failed 1 test of 2.
      Dubious, test returned 1 (wstat 256, 0x100)
      Failed 1/2 subtests 
      [17:00:22] t/pt-duplicate-key-checker/issue_298.t ......... 
      1..2
      ok 1 - Does not crash on undef var
      ok 2 - Sandbox servers
      ok     4090 ms ( 0.00 usr  0.00 sys +  1.36 cusr  0.82 csys =  2.18 CPU)
      [17:00:27] t/pt-duplicate-key-checker/issue_331.t ......... 
      1..2
      not ok 1 - Issue 331 crash on fks
      
      #   Failed test 'Issue 331 crash on fks'
      #   at t/pt-duplicate-key-checker/issue_331.t line 44.
      # 10c10
      # < #	  `id` bigint not null default '0'
      # ---
      # > #	  `id` bigint(20) not null default '0'
      ok 2 - Sandbox servers
      # Looks like you failed 1 test of 2.
      Dubious, test returned 1 (wstat 256, 0x100)
      Failed 1/2 subtests 
      [17:00:31] t/pt-duplicate-key-checker/issue_663.t ......... 
      1..2
      ok 1 - Prints dupe key with prefixed column (issue 663)
      ok 2 - Sandbox servers
      ok     4099 ms ( 0.00 usr  0.00 sys +  1.40 cusr  0.79 csys =  2.19 CPU)
      [17:00:35] t/pt-duplicate-key-checker/standard_options.t .. 
      1..1
      ok 1 - Dies if PID file already exists (issue 391)
      ok     1005 ms ( 0.01 usr  0.00 sys +  0.80 cusr  0.17 csys =  0.98 CPU)
      [17:00:36]
      
      Test Summary Report
      -------------------
      t/pt-duplicate-key-checker/basics.t          (Wstat: 2048 Tests: 15 Failed: 8)
        Failed tests:  1, 3-6, 9, 13-14
        Non-zero exit status: 8
      t/pt-duplicate-key-checker/clustered_keys.t  (Wstat: 256 Tests: 4 Failed: 1)
        Failed test:  1
        Non-zero exit status: 1
      t/pt-duplicate-key-checker/issue_1192.t      (Wstat: 256 Tests: 2 Failed: 1)
        Failed test:  1
        Non-zero exit status: 1
      t/pt-duplicate-key-checker/issue_331.t       (Wstat: 256 Tests: 2 Failed: 1)
        Failed test:  1
        Non-zero exit status: 1
      Files=7, Tests=28, 33 wallclock secs ( 0.09 usr  0.04 sys + 10.02 cusr  5.95 csys = 16.10 CPU)
      Result: FAIL
      

      Suggested Fix

      Identify which tests fail, because badly written and which show real issues with code, fix either tests or code.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sveta.smirnova Sveta Smirnova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist