Details

    • Improvement
    • Status: Done
    • Medium
    • Resolution: Fixed
    • 3.5.0
    • 3.5.1
    • None
    • None
    • Yes
    • Yes
    • 2

    Description

      How to Repeat

      Results are for PS 5.7.40.

      $ prove -vw --trap --timer t/pt-kill/
      [17:56:46] t/pt-kill/basics.t ............ 
      1..6
      ok 1 - There were 2 to 5 captures
      ok 2 - Approximately 9 or 10 captures with --iterations 0
      ok 3 - --verbose
      ok 4 - kill-mysql-process says it reconnected
      ok 5 - pt-kill still checked the processlist 4 times
      ok 6 - Sandbox servers
      ok    31214 ms ( 0.01 usr  0.00 sys +  0.53 cusr  0.14 csys =  0.68 CPU)
      [17:57:17] t/pt-kill/execute_command.t ... 
      1..9
      ok 1 - No output without --print
      ok 2 - --execute-command
      ok 3 - --print with --execute-command
      ok 4 - --execute-command (online)
      Can't locate object method "daemonize" via package "Daemon" at /home/sveta/src/percona-toolkit/bin/pt-kill line 7241.
      grep: /tmp/pt-kill-test.124993.log: No such file or directory
      not ok 5 - Executed zombie command
      
      #   Failed test 'Executed zombie command'
      #   at t/pt-kill/execute_command.t line 86.
      #                   ''
      #     doesn't match '(?^:Executed echo zombie)'
      ok 6 - No zombies
      ok 7 - pt-kill stopped
      ok 8 - No zombies
      ok 9 - Sandbox servers
      # Looks like you failed 1 test of 9.
      Dubious, test returned 1 (wstat 256, 0x100)
      Failed 1/9 subtests 
      [17:57:56] t/pt-kill/filter_plugin.t ..... 
      1..1
      ok 1 - basic --filter function works
      ok      190 ms ( 0.00 usr  0.00 sys +  0.17 cusr  0.02 csys =  0.19 CPU)
      [17:57:56] t/pt-kill/group_by.t .......... 
      1..9
      ok 1 - Kill all but oldest
      ok 2 - Kill all but oldest, matching specific user
      ok 3 - Any busy time doesn't match
      ok 4 - Any busy time matches
      ok 5 - Each busy time doesn't match
      ok 6 - Each busy time matches
      ok 7 - Query count doesn't match
      ok 8 - Queries don't match unless comments are stripped
      ok 9 - --filter and custom --group-by
      ok      271 ms ( 0.01 usr  0.00 sys +  0.22 cusr  0.05 csys =  0.28 CPU)
      [17:57:57] t/pt-kill/group_queries.t ..... 
      1..3
      ok 1 - Group by Info
      ok 2 - Group by Info with similar fingerprints
      ok 3 - Group by fingerprint
      ok      188 ms ( 0.00 usr  0.00 sys +  0.16 cusr  0.03 csys =  0.19 CPU)
      [17:57:57] t/pt-kill/kill.t .............. 
      ok 1 - Got proc id of sleeping query
      ok 2 - --kill
      ok 3 - Killed connection
      ok 4 - Got proc id of sleeping query
      ok 5 - --kill-query
      ok 6 - Killed query, not connection
      ok 7 - Connection is still alive
      ok 8 - Sandbox servers
      1..8
      ok     5721 ms ( 0.00 usr  0.00 sys +  0.30 cusr  0.13 csys =  0.43 CPU)
      [17:58:02] t/pt-kill/log_dsn.t ........... 
      ok 1 - --log-dsn croaks if missing D and t
      ok 2 - --log-dsn croaks if missing D
      ok 3 - --log-dsn croaks if missing t
      ok 4 - --log-dsn with existing log table, no error
      ok 5 - ... which contains one row
      ok 6 - ... got the target db
      ok 7 - ... on the correct server
      ok 8 - ... correct kill reason
      ok 9 - ... timestamp is correct (bug 1086259)
      ok 10 - ... populated as expected
      ok 11 - --log-dsn --create-log-table and the table exists, no error
      ok 12 - --log-dsn --create-log-table and the table doesn't exist, no error
      ok 13 - --create-log-table is off by default
      ok 14 - Different --log-dsn runs reuse the log table
      Can't locate object method "daemonize" via package "Daemon" at /home/sveta/src/percona-toolkit/bin/pt-kill line 7241.
      ok 15 - --log-dsn --daemonize, master (bug 1209436)
      not ok 16 - --log-dsn --daemonize, slave (bug 1209436)
      
      #   Failed test '--log-dsn --daemonize, slave (bug 1209436)'
      #   at t/pt-kill/log_dsn.t line 298.
      # $VAR1 = [];
      Can't locate object method "daemonize" via package "Daemon" at /home/sveta/src/percona-toolkit/bin/pt-kill line 7241.
      ok 17 - --log-dsn in --config file, master (bug 1209436)
      not ok 18 - --log-dsn in --config file, slave (bug 1209436)
      
      #   Failed test '--log-dsn in --config file, slave (bug 1209436)'
      #   at t/pt-kill/log_dsn.t line 343.
      # $VAR1 = [];
      ok 19 - Sandbox servers
      1..19
      # Looks like you failed 2 tests of 19.
      Dubious, test returned 2 (wstat 512, 0x200)
      Failed 2/19 subtests 
      [17:59:12] t/pt-kill/match.t ............. 
      1..17
      ok 1 - --match-info
      ok 2 - Ignore State=Locked by default
      ok 3 - Can override default ignore State=Locked with --ignore-state ''
      ok 4 - --match-state
      ok 5 - --victims all
      ok 6 - --ignore-user
      ok 7 - --busy-time
      ok 8 - --busy-time but no query is busy enough
      ok 9 - --idle-time
      ok 10 - --match-state Locked --ignore-state '' --busy-time 5
      ok 11 - --match-all except ignored
      ok 12 - --match-all
      ok 13 - --query-id
      ok 14 - --json
      ok 15 - Doesn't match replication threads by default
      ok 16 - --replication-threads allows matching replication thread
      ok 17 - Sandbox servers
      ok     2842 ms ( 0.01 usr  0.00 sys +  0.39 cusr  0.14 csys =  0.54 CPU)
      [17:59:15] t/pt-kill/pt_167.t ............ # Thread started
      
      ok 1 - Got proc id of sleeping query: 9037
      ok 2 - --kill-query
      ok 3 - Sandbox servers
      1..3
      ok     5002 ms ( 0.00 usr  0.00 sys +  0.32 cusr  0.17 csys =  0.49 CPU)
      [17:59:20] t/pt-kill/standard_options.t .. 
      1..6
      Can't locate object method "daemonize" via package "Daemon" at /home/sveta/src/percona-toolkit/bin/pt-kill line 7241.
      not ok 1 - It lives daemonized
      
      #   Failed test 'It lives daemonized'
      #   at t/pt-kill/standard_options.t line 37.
      #                   'sveta     127566  127552  0 17:59 pts/0    00:00:00 sh -c ps -eaf | grep 'pt-kill -F'
      # sveta     127568  127566  0 17:59 pts/0    00:00:00 grep pt-kill -F
      # '
      #     doesn't match '(?^:pt-kill -F )'
      not ok 2 - PID file created
      
      #   Failed test 'PID file created'
      #   at t/pt-kill/standard_options.t line 42.
      not ok 3 - Log file created
      
      #   Failed test 'Log file created'
      #   at t/pt-kill/standard_options.t line 46.
      ok 4 - PID file removed
      not ok 5 - Dies if PID file already exists (--pid without --daemonize) (issue 391)
      
      #   Failed test 'Dies if PID file already exists (--pid without --daemonize) (issue 391)'
      #   at t/pt-kill/standard_options.t line 65.
      #                   'Can't locate object method "make_PID_file" via package "Daemon" at /home/sveta/src/percona-toolkit/bin/pt-kill line 7247.
      # '
      #     doesn't match '(?^:PID file /tmp/pt-script.pid already exists)'
      ok 6 - Sandbox servers
      # Looks like you failed 4 tests of 6.
      Dubious, test returned 4 (wstat 1024, 0x400)
      Failed 4/6 subtests 
      [17:59:21]
      
      Test Summary Report
      -------------------
      t/pt-kill/execute_command.t (Wstat: 256 Tests: 9 Failed: 1)
        Failed test:  5
        Non-zero exit status: 1
      t/pt-kill/log_dsn.t         (Wstat: 512 Tests: 19 Failed: 2)
        Failed tests:  16, 18
        Non-zero exit status: 2
      t/pt-kill/standard_options.t (Wstat: 1024 Tests: 6 Failed: 4)
        Failed tests:  1-3, 5
        Non-zero exit status: 4
      Files=10, Tests=81, 155 wallclock secs ( 0.05 usr  0.01 sys +  3.86 cusr  1.41 csys =  5.33 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