Skip to content

Commit d034396

Browse files
committed
Bug#25372805 PERFORMANCE SCHEMA 5.6.35 UNITTEST PFT-T FAILING
Unit test pfs-t is failing, with the following error printed: not ok 179 - no locker (no thread owner) The root cause is the test case for sockets, which was not updated to follow a change in implementation in the code, as the behavior changed. Now, somehow this test failure went unnoticed, and after investigation it turns out that the unit tests programs to not return the test exit_status() on exit, masking test failures to the automated build scripts. This fix adjusts the failing test case, and fixes all performance schema unit tests to properly return the test exit_status().
1 parent c262036 commit d034396

11 files changed

+25
-24
lines changed

storage/perfschema/unittest/pfs-t.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -1344,8 +1344,9 @@ void test_locker_disabled()
13441344
ok(socket_A1 != NULL, "instrumented");
13451345
/* Socket thread owner has not been set */
13461346
socket_locker= psi->start_socket_wait(&socket_state, socket_A1, PSI_SOCKET_SEND, 12, "foo.cc", 12);
1347-
ok(socket_locker == NULL, "no locker (no thread owner)");
1348-
1347+
ok(socket_locker != NULL, "locker (owner not used)");
1348+
psi->end_socket_wait(socket_locker, 10);
1349+
13491350
/* Pretend the running thread is not instrumented */
13501351
/* ---------------------------------------------- */
13511352

@@ -1665,6 +1666,6 @@ int main(int, char **)
16651666
plan(216);
16661667
MY_INIT("pfs-t");
16671668
do_all_tests();
1668-
return 0;
1669+
return (exit_status());
16691670
}
16701671

storage/perfschema/unittest/pfs_account-oom-t.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -111,6 +111,6 @@ int main(int, char **)
111111
plan(6);
112112
MY_INIT("pfs_account-oom-t");
113113
do_all_tests();
114-
return 0;
114+
return (exit_status());
115115
}
116116

storage/perfschema/unittest/pfs_connect_attr-t.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -341,5 +341,5 @@ int main(int, char **)
341341
diag("skipping the cp1251 tests : missing character set");
342342
plan(59 + (cs_cp1251 ? 10 : 0));
343343
do_all_tests();
344-
return 0;
344+
return (exit_status());
345345
}

storage/perfschema/unittest/pfs_host-oom-t.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -111,6 +111,6 @@ int main(int, char **)
111111
plan(6);
112112
MY_INIT("pfs_host-oom-t");
113113
do_all_tests();
114-
return 0;
114+
return (exit_status());
115115
}
116116

storage/perfschema/unittest/pfs_instr-oom-t.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -686,6 +686,6 @@ int main(int, char **)
686686
plan(20);
687687
MY_INIT("pfs_instr-oom-t");
688688
do_all_tests();
689-
return 0;
689+
return (exit_status());
690690
}
691691

storage/perfschema/unittest/pfs_instr-t.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -416,6 +416,6 @@ int main(int, char **)
416416
plan(103);
417417
MY_INIT("pfs_instr-t");
418418
do_all_tests();
419-
return 0;
419+
return (exit_status());
420420
}
421421

storage/perfschema/unittest/pfs_instr_class-oom-t.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -67,6 +67,6 @@ int main(int, char **)
6767
plan(9);
6868
MY_INIT("pfs_instr_info-oom-t");
6969
do_all_tests();
70-
return 0;
70+
return (exit_status());
7171
}
7272

storage/perfschema/unittest/pfs_instr_class-t.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -673,6 +673,6 @@ int main(int, char **)
673673
plan(181);
674674
MY_INIT("pfs_instr_info-t");
675675
do_all_tests();
676-
return 0;
676+
return (exit_status());
677677
}
678678

storage/perfschema/unittest/pfs_misc-t.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -66,6 +66,6 @@ int main(int, char **)
6666
plan(2);
6767
MY_INIT("pfs_misc-t");
6868
do_all_tests();
69-
return exit_status();
69+
return (exit_status());
7070
}
7171

storage/perfschema/unittest/pfs_timer-t.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -117,6 +117,6 @@ int main(int, char **)
117117
plan(5);
118118
MY_INIT("pfs_timer-t");
119119
do_all_tests();
120-
return 0;
120+
return (exit_status());
121121
}
122122

storage/perfschema/unittest/pfs_user-oom-t.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -110,6 +110,6 @@ int main(int, char **)
110110
plan(6);
111111
MY_INIT("pfs_user-oom-t");
112112
do_all_tests();
113-
return 0;
113+
return (exit_status());
114114
}
115115

0 commit comments

Comments
 (0)