Skip to content

Commit 8da3f10

Browse files
committed
BUG#35696649 ADD TLS SUPPORT FOR REMAINING TESTS AND TOOLS
Trims trailing whitespaces in ndb tests and test tools. Change-Id: I093c5da292e5924b574a10b8e8c75f75fc1f5139
1 parent 2230a58 commit 8da3f10

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3102
-3102
lines changed

storage/ndb/test/crund/src/cpp/NdbapiAB.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ struct NdbapiAB::BufIndexScanOp : IndexScanOp< xMode > {
932932
vector< ElementT > obuf; // result buffer per scan op, managed by NDBAPI
933933
vector< ElementT > buf; // cloned scan result row, content managed by app
934934
typename vector< ElementT >::iterator pos; // consumed elements in buf
935-
935+
936936
BufIndexScanOp(string name, NdbapiAB& load, const D::Index* index,
937937
int width)
938938
: IndexScanOp< xMode >(name, load, index), width(width) {

storage/ndb/test/include/NDBT.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
#define NDB_TEST_HPP
2727

2828
/**
29-
* NdbTest.hpp
30-
* This is the main include file to include in test programs
29+
* NdbTest.hpp
30+
* This is the main include file to include in test programs
3131
* It will include all the other include files in the NDBT-toolkit
3232
*
3333
*/

storage/ndb/test/include/NdbMgmd.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class NdbMgmd {
5252
unsigned int m_timeout;
5353
unsigned int m_version;
5454
ndb_socket_t m_event_socket;
55-
55+
5656
void error(const char* msg, ...) ATTRIBUTE_FORMAT(printf, 2, 3)
5757
{
5858
if (!m_verbose)
@@ -446,8 +446,8 @@ class NdbMgmd {
446446
error("subscribe_to_events: not connected");
447447
return false;
448448
}
449-
450-
int filter[] =
449+
450+
int filter[] =
451451
{
452452
15, NDB_MGM_EVENT_CATEGORY_STARTUP,
453453
15, NDB_MGM_EVENT_CATEGORY_SHUTDOWN,
@@ -463,7 +463,7 @@ class NdbMgmd {
463463
};
464464

465465
m_event_socket = ndb_socket_create_from_native(ndb_mgm_listen_event(m_handle, filter));
466-
466+
467467
return ndb_socket_valid(m_event_socket);
468468
}
469469

@@ -475,15 +475,15 @@ class NdbMgmd {
475475
error("get_next_event_line: not connected");
476476
return false;
477477
}
478-
478+
479479
if (!ndb_socket_valid(m_event_socket))
480480
{
481481
error("get_next_event_line: not subscribed");
482482
return false;
483483
}
484484

485485
SocketInputStream stream(m_event_socket, timeout_millis);
486-
486+
487487
const char* result = stream.gets(buff, bufflen);
488488
if (result && strlen(result))
489489
{
@@ -497,7 +497,7 @@ class NdbMgmd {
497497
return false;
498498
}
499499
}
500-
500+
501501
error("get_next_event_line: error from stream.gets()");
502502
return false;
503503
}
@@ -560,7 +560,7 @@ class NdbMgmd {
560560

561561
return true;
562562
}
563-
563+
564564
bool change_config32(Uint32 new_value, Uint32 *saved_old_value,
565565
unsigned type_of_section, unsigned config_variable)
566566
{

storage/ndb/test/include/NdbRestarter.hpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ class NdbRestarter {
4747
NRRF_FORCE = 0x8
4848
};
4949

50-
int restartOneDbNode(int _nodeId,
51-
bool initial = false,
52-
bool nostart = false,
50+
int restartOneDbNode(int _nodeId,
51+
bool initial = false,
52+
bool nostart = false,
5353
bool abort = false,
5454
bool force = false,
5555
bool captureError = false);
@@ -64,11 +64,11 @@ class NdbRestarter {
6464
captureError);
6565
}
6666

67-
int restartAll(bool initial = false,
68-
bool nostart = false,
67+
int restartAll(bool initial = false,
68+
bool nostart = false,
6969
bool abort = false,
7070
bool force = false);
71-
71+
7272
int restartAll2(Uint32 flags){
7373
return restartAll(flags & NRRF_INITIAL,
7474
flags & NRRF_NOSTART,
@@ -85,20 +85,20 @@ class NdbRestarter {
8585
int num_nodes,
8686
Uint32 flags,
8787
bool captureError = false);
88-
88+
8989
int startAll();
9090
int startNodes(const int * _nodes, int _num_nodes);
9191
int waitConnected(unsigned int _timeout = 120);
9292
int waitClusterStarted(unsigned int _timeout = 120);
9393
int waitClusterSingleUser(unsigned int _timeout = 120);
9494
int waitClusterStartPhase(int _startphase, unsigned int _timeout = 120);
95-
int waitClusterNoStart(unsigned int _timeout = 120);
95+
int waitClusterNoStart(unsigned int _timeout = 120);
9696
int waitNodesStarted(const int * _nodes, int _num_nodes,
9797
unsigned int _timeout = 120);
98-
int waitNodesStartPhase(const int * _nodes, int _num_nodes,
98+
int waitNodesStartPhase(const int * _nodes, int _num_nodes,
9999
int _startphase, unsigned int _timeout = 120);
100100
int waitNodesNoStart(const int * _nodes, int _num_nodes,
101-
unsigned int _timeout = 120);
101+
unsigned int _timeout = 120);
102102

103103
bool checkClusterState(const int * deadnodes, int num_nodes);
104104

@@ -135,7 +135,7 @@ class NdbRestarter {
135135

136136
int getMasterNodeVersion(int& version);
137137
int getNodeTypeVersionRange(ndb_mgm_node_type type, int& minVer, int& maxVer);
138-
138+
139139
int getNodeStatus(int nodeId); // return NDB_MGM_NODE_STATUS_*
140140

141141
/**
@@ -165,7 +165,7 @@ class NdbRestarter {
165165

166166
int waitClusterState(ndb_mgm_node_status _status,
167167
unsigned int _timeout,
168-
int _startphase = -1);
168+
int _startphase = -1);
169169

170170
int waitNodesState(const int * _nodes, int _num_nodes,
171171
ndb_mgm_node_status _status,
@@ -179,7 +179,7 @@ class NdbRestarter {
179179

180180
Vector<ndb_mgm_node_state> mgmNodes;
181181
Vector<ndb_mgm_node_state> apiNodes;
182-
182+
183183
bool connected;
184184
BaseString addr;
185185
ndb_mgm::config_ptr m_config;

storage/ndb/test/include/NdbTest.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
#define NDB_TEST_HPP
2828

2929
/**
30-
* NdbTest.hpp
31-
* This is the main include file to include in test programs
30+
* NdbTest.hpp
31+
* This is the main include file to include in test programs
3232
* It will include all the other include files in the NDBT-toolkit
3333
*
3434
*/

storage/ndb/test/ndbapi/bank/bankCreator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@
2727
#include <NdbOut.hpp>
2828

2929
#include <NdbApi.hpp>
30-
#include <NDBT.hpp>
30+
#include <NDBT.hpp>
3131
#include <NdbSleep.h>
3232
#include <getarg.h>
3333
#include "Bank.hpp"
34-
34+
3535

3636
int main(int argc, const char** argv){
3737
ndb_init();
@@ -48,9 +48,9 @@ int main(int argc, const char** argv){
4848
};
4949
int num_args = sizeof(args) / sizeof(args[0]);
5050
int optind = 0;
51-
char desc[] =
51+
char desc[] =
5252
"This program will create and load the tables for bank\n";
53-
53+
5454
if(getarg(args, num_args, argc, argv, &optind) || _help) {
5555
arg_printusage(args, num_args, argv[0], desc);
5656
return NDBT_ProgramExit(NDBT_WRONGARGS);

storage/ndb/test/ndbapi/bank/bankMakeGL.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,26 @@
2727
#include <NdbOut.hpp>
2828

2929
#include <NdbApi.hpp>
30-
#include <NDBT.hpp>
30+
#include <NDBT.hpp>
3131
#include <NdbSleep.h>
3232
#include <getarg.h>
3333
#include "Bank.hpp"
34-
34+
3535

3636
int main(int argc, const char** argv){
3737
ndb_init();
3838
int _help = 0;
3939
const char * _database = "BANK";
40-
40+
4141
struct getargs args[] = {
4242
{ "usage", '?', arg_flag, &_help, "Print help", "" },
43-
{ "database", 'd', arg_string, &_database, "Database name", ""}
43+
{ "database", 'd', arg_string, &_database, "Database name", ""}
4444
};
4545
int num_args = sizeof(args) / sizeof(args[0]);
4646
int optind = 0;
47-
char desc[] =
47+
char desc[] =
4848
"This program will make GL records in the bank\n";
49-
49+
5050
if(getarg(args, num_args, argc, argv, &optind) || _help) {
5151
arg_printusage(args, num_args, argv[0], desc);
5252
return NDBT_ProgramExit(NDBT_WRONGARGS);
@@ -63,7 +63,7 @@ int main(int argc, const char** argv){
6363

6464
if (bank.performMakeGLs() != 0)
6565
return NDBT_ProgramExit(NDBT_FAILED);
66-
66+
6767
return NDBT_ProgramExit(NDBT_OK);
6868

6969
}

storage/ndb/test/ndbapi/bank/bankSumAccounts.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,26 @@
2727
#include <NdbOut.hpp>
2828

2929
#include <NdbApi.hpp>
30-
#include <NDBT.hpp>
30+
#include <NDBT.hpp>
3131
#include <NdbSleep.h>
3232
#include <getarg.h>
3333
#include "Bank.hpp"
34-
34+
3535

3636
int main(int argc, const char** argv){
3737
ndb_init();
3838
int _help = 0;
3939
const char * _database="BANK";
40-
40+
4141
struct getargs args[] = {
4242
{ "usage", '?', arg_flag, &_help, "Print help", "" },
43-
{ "database", 'd', arg_string, &_database, "Database name", ""}
43+
{ "database", 'd', arg_string, &_database, "Database name", ""}
4444
};
4545
int num_args = sizeof(args) / sizeof(args[0]);
4646
int optind = 0;
47-
char desc[] =
47+
char desc[] =
4848
"This program will check the sum of all ACCOUNTS in the bank\n";
49-
49+
5050
if(getarg(args, num_args, argc, argv, &optind) || _help) {
5151
arg_printusage(args, num_args, argv[0], desc);
5252
return NDBT_ProgramExit(NDBT_WRONGARGS);
@@ -63,7 +63,7 @@ int main(int argc, const char** argv){
6363

6464
if (bank.performSumAccounts() != 0)
6565
return NDBT_ProgramExit(NDBT_FAILED);
66-
66+
6767
return NDBT_ProgramExit(NDBT_OK);
6868

6969
}

storage/ndb/test/ndbapi/bank/bankTimer.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,28 @@
2828
#include <NdbOut.hpp>
2929

3030
#include <NdbApi.hpp>
31-
#include <NDBT.hpp>
31+
#include <NDBT.hpp>
3232
#include <NdbSleep.h>
3333
#include <getarg.h>
3434
#include "Bank.hpp"
35-
35+
3636

3737
int main(int argc, const char** argv){
3838
ndb_init();
3939
int _help = 0;
4040
int _wait = 30;
4141
const char * _database="BANK";
42-
42+
4343
struct getargs args[] = {
4444
{ "wait", 'w', arg_integer, &_wait, "Max time to wait between days", "secs" },
45-
{ "database", 'd', arg_string, &_database, "Database name", ""},
45+
{ "database", 'd', arg_string, &_database, "Database name", ""},
4646
{ "usage", '?', arg_flag, &_help, "Print help", "" }
4747
};
4848
int num_args = sizeof(args) / sizeof(args[0]);
4949
int optind = 0;
50-
char desc[] =
50+
char desc[] =
5151
"This program will increase time in the bank\n";
52-
52+
5353
if(getarg(args, num_args, argc, argv, &optind) || _help) {
5454
arg_printusage(args, num_args, argv[0], desc);
5555
return NDBT_ProgramExit(NDBT_WRONGARGS);
@@ -66,7 +66,7 @@ int main(int argc, const char** argv){
6666

6767
if (bank.performIncreaseTime(_wait) != 0)
6868
return NDBT_ProgramExit(NDBT_FAILED);
69-
69+
7070
return NDBT_ProgramExit(NDBT_OK);
7171

7272
}

storage/ndb/test/ndbapi/bank/bankTransactionMaker.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,28 @@
2828
#include <NdbOut.hpp>
2929

3030
#include <NdbApi.hpp>
31-
#include <NDBT.hpp>
31+
#include <NDBT.hpp>
3232
#include <NdbSleep.h>
3333
#include <getarg.h>
3434
#include "Bank.hpp"
35-
35+
3636

3737
int main(int argc, const char** argv){
3838
ndb_init();
3939
int _help = 0;
4040
int _wait = 20;
4141
const char * _database = "BANK";
42-
42+
4343
struct getargs args[] = {
4444
{ "wait", 'w', arg_integer, &_wait, "Time to wait between transactions", "ms" },
4545
{ "database", 'd', arg_string, &_database, "Database name", ""},
4646
{ "usage", '?', arg_flag, &_help, "Print help", "" }
4747
};
4848
int num_args = sizeof(args) / sizeof(args[0]);
4949
int optind = 0;
50-
char desc[] =
50+
char desc[] =
5151
"This program will perform transactions in the bank\n";
52-
52+
5353
if(getarg(args, num_args, argc, argv, &optind) || _help) {
5454
arg_printusage(args, num_args, argv[0], desc);
5555
return NDBT_ProgramExit(NDBT_WRONGARGS);
@@ -66,7 +66,7 @@ int main(int argc, const char** argv){
6666

6767
if (bank.performTransactions(_wait) != 0)
6868
return NDBT_ProgramExit(NDBT_FAILED);
69-
69+
7070
return NDBT_ProgramExit(NDBT_OK);
7171

7272
}

0 commit comments

Comments
 (0)