Skip to content
Permalink
Browse files

tests: cleanup warnings in libpluto unit tests

  • Loading branch information...
bartman committed Jun 13, 2019
1 parent 1c78e1f commit 6994a79bed9251ed0259d267bd1df454b59d4b5e
Showing with 70 additions and 110 deletions.
  1. +0 −2 tests/unit/libpluto/lp02-parentI1/parentI1_main.c
  2. +0 −3 tests/unit/libpluto/lp03-whacksemantics/whacksemantics.c
  3. +0 −3 tests/unit/libpluto/lp04-nsscert/nsscert.c
  4. +1 −3 tests/unit/libpluto/lp06-parentR1notchosen/parentI1R1.c
  5. +1 −4 tests/unit/libpluto/lp07-orient/orienttest_main.c
  6. +1 −1 tests/unit/libpluto/lp08-parentR1/parentR1.c
  7. +0 −3 tests/unit/libpluto/lp08-parentR1/parentR1_main.c
  8. +1 −3 tests/unit/libpluto/lp10-parentI2/parentI2_main.c
  9. +1 −3 tests/unit/libpluto/lp11-parentI2dup/parentI2duplicate.c
  10. +2 −2 tests/unit/libpluto/lp12-parentR2/parentR2_main.c
  11. +2 −2 tests/unit/libpluto/lp13-parentI3/parentI3.c
  12. +0 −2 tests/unit/libpluto/lp13-parentI3/parentI3_main.c
  13. +1 −1 tests/unit/libpluto/lp15-respondself/respondselfR1.c
  14. +1 −1 tests/unit/libpluto/lp18-certificateselfI1/Makefile.testcase
  15. +1 −1 tests/unit/libpluto/lp19-certreplyselfR1/certreplyselfR1.c
  16. +1 −1 tests/unit/libpluto/lp23-davecertI1/Makefile.testcase
  17. +1 −1 tests/unit/libpluto/lp24-certreplydaveR2/certreplydaveR2.c
  18. +1 −1 tests/unit/libpluto/lp26-davecertI2/davecertI2.c
  19. +0 −1 tests/unit/libpluto/lp28-addrinfoserialize/serialaddrinfo.c
  20. +5 −6 tests/unit/libpluto/lp29-adns/adnstest.c
  21. +2 −3 tests/unit/libpluto/lp30-dnskick/kickdns.c
  22. +2 −5 tests/unit/libpluto/lp31-IDhostpair/IDhostpair.c
  23. +2 −5 tests/unit/libpluto/lp33-IDanypair/IDhostpair.c
  24. +0 −2 tests/unit/libpluto/lp33-dnsload2/dnscpeI1.c
  25. +0 −3 tests/unit/libpluto/lp34-orientafterlisten/orienttest.c
  26. +1 −1 tests/unit/libpluto/lp37-h2hR1/h2hR1.c
  27. +0 −3 tests/unit/libpluto/lp40-orientafterprivate/orienttest.c
  28. +2 −0 tests/unit/libpluto/lp41-orientmoon/orientmoon.c
  29. +2 −0 tests/unit/libpluto/lp42-loadbobdefaultroute/loadbob.c
  30. +1 −1 tests/unit/libpluto/lp44-h2hR1-deny-ikev1/h2hR1-deny-ikev1.c
  31. +1 −1 tests/unit/libpluto/lp45-h2hR1-noikev2/h2hR1-noikev2.c
  32. +1 −1 tests/unit/libpluto/lp46-rekeyikev2-I1/rekeyit.c
  33. +1 −1 tests/unit/libpluto/lp48-rekeyikev2-inCR1/rekeyikev2-inCR1.c
  34. +1 −1 tests/unit/libpluto/lp50-rekey-no-reply-rekey/rekey-no-reply-I1.c
  35. +1 −1 tests/unit/libpluto/lp52-davecert-gatewayID-I1/Makefile.testcase
  36. +1 −1 tests/unit/libpluto/lp53-davecert-gatewayID-R1/Makefile.testcase
  37. +1 −1 tests/unit/libpluto/lp53-davecert-gatewayID-R1/davecert-R1-id.c
  38. +0 −2 tests/unit/libpluto/lp54-davecert-gatewayID-I2/davecertI2-id.c
  39. +1 −1 tests/unit/libpluto/lp58-rekeyv2nopfs-inCR1/rekeyv2nopfs-inCR1.c
  40. +0 −4 tests/unit/libpluto/lp60-bestif/bestif.c
  41. +1 −1 tests/unit/libpluto/lp62-nattR1/nattR1.c
  42. +0 −6 tests/unit/libpluto/lp65-nattI3/nattI3.c
  43. +1 −1 tests/unit/libpluto/lp70-invalid-init-msg/h2hR1.c
  44. +1 −1 tests/unit/libpluto/lp72-alg-h2hR1/h2hR1.c
  45. +0 −2 tests/unit/libpluto/lp75-alg-h2hI3/h2hI3.c
  46. +1 −2 tests/unit/libpluto/lp76-s2s-while-h2h-I1/h2hI3-statetable.c
  47. +6 −1 tests/unit/libpluto/lp77-del-matching-st/add2sa-del1sa.c
  48. +1 −2 tests/unit/libpluto/lp77-del-matching-st/h2hI3-statetable.c
  49. +0 −1 tests/unit/libpluto/lp81-h2h-rekeyikev2-I3-msgid0/rekeyChildSA-msgInI3.c
  50. +0 −1 tests/unit/libpluto/lp82-h2h-deleteSA-R2/deleteChildSA-fromR2.c
  51. +0 −1 tests/unit/libpluto/lp83-h2h-deleteSA-I3/deleteChildSA-msgInI3.c
  52. +0 −2 tests/unit/libpluto/lp84-h2h-deleteSA-R2-R/deleteChildSA-fromR2.c
  53. +0 −1 tests/unit/libpluto/lp85-h2h-invalid-deleteSA-I3/deleteChildSA-invalid-msgInI3.c
  54. +0 −2 tests/unit/libpluto/lp86-h2h-invalid-deleteSA-R2-R/deleteChildSA-invalid-fromR2.c
  55. +0 −1 tests/unit/libpluto/lp91-h2h-sareplace-R1/rekeyParentSA.c
  56. +1 −0 tests/unit/libpluto/seam_commhandle.c
  57. +5 −2 tests/unit/libpluto/seam_demux.c
  58. +4 −1 tests/unit/libpluto/seam_hostpair.c
  59. +1 −0 tests/unit/libpluto/seam_ikev1_main.c
  60. +4 −1 tests/unit/libpluto/seam_initiate.c
  61. +1 −0 tests/unit/libpluto/seam_kernelalgs.c
  62. +1 −0 tests/unit/libpluto/seam_spdbstruct.c
  63. +2 −0 tests/unit/libpluto/seam_x509_list.c
@@ -1,9 +1,7 @@
int main(int argc, char *argv[])
{
int len;
char *infile;
char *conn_name;
int lineno=0;
int regression = 0;
struct connection *c1;
struct state *st;
@@ -54,11 +54,8 @@ int warningsarefatal = 0;

int main(int argc, char *argv[])
{
int len;
err_t err = NULL;
char *infile;
char *conn_name;
int lineno=0;
struct starter_config *cfg = NULL;
struct starter_conn *conn = NULL;

@@ -27,9 +27,6 @@ extern int EF_DISABLE_BANNER;

int main(int argc, char *argv[])
{
int i;
chunk_t blob, crl_uri;
err_t e;
cert_t cacert,t1;
time_t until;

@@ -53,7 +53,7 @@ void recv_pcap_packet(u_char *user
, const u_char *bytes)
{
struct state *st;
struct pcr_kenonce *kn = &crypto_req->pcr_d.kn;
//struct pcr_kenonce *kn = &crypto_req->pcr_d.kn;

recv_pcap_packet_gen(user, h, bytes);

@@ -69,10 +69,8 @@ void recv_pcap_packet(u_char *user

int main(int argc, char *argv[])
{
int len;
char *infile;
char *conn_name;
int lineno=0;
int regression = 0;
struct connection *c1;
struct state *st;
@@ -1,11 +1,8 @@
int main(int argc, char *argv[])
{
int len;
char *infile;
char *conn_name;
int lineno=0;
struct connection *c1;
struct state *st;
struct connection *c1 = NULL;

#ifdef HAVE_EFENCE
EF_PROTECT_FREE=1;
@@ -7,7 +7,7 @@

#define TESTNAME "parentR1"

static void init_local_interface(void)
static inline void init_local_interface(void)
{
init_jamesjohnson_interface();
}
@@ -34,14 +34,11 @@ void recv_pcap_packet(u_char *user

int main(int argc, char *argv[])
{
int len;
char *infile, *pcapin, *pcapout;
char *conn_name;
int lineno=0;
int whackmsgcount=0;
struct connection *c1;
struct state *st;
char eb1[256]; /* error buffer for pcap open */

#ifdef HAVE_EFENCE
EF_PROTECT_FREE=1;
@@ -5,7 +5,7 @@ void recv_pcap_packet(u_char *user
, const u_char *bytes)
{
struct state *st;
struct pcr_kenonce *kn = &crypto_req->pcr_d.kn;
//struct pcr_kenonce *kn = &crypto_req->pcr_d.kn;

enable_debugging_on_sa(1);

@@ -23,10 +23,8 @@ void recv_pcap_packet(u_char *user

int main(int argc, char *argv[])
{
int len;
char *infile;
char *conn_name;
int lineno=0;
int regression = 0;
struct connection *c1;
struct state *st;
@@ -52,7 +52,7 @@ void recv_pcap_packet(u_char *user
, const u_char *bytes)
{
struct state *st;
struct pcr_kenonce *kn = &crypto_req->pcr_d.kn;
//struct pcr_kenonce *kn = &crypto_req->pcr_d.kn;

recv_pcap_packet_gen(user, h, bytes);

@@ -68,10 +68,8 @@ void recv_pcap_packet(u_char *user

int main(int argc, char *argv[])
{
int len;
char *infile;
char *conn_name;
int lineno=0;
int regression = 0;
struct connection *c1;
struct state *st;
@@ -54,13 +54,11 @@ void finish_pcap(void) {}

int main(int argc, char *argv[])
{
int len;
char *infile;
char *conn_name;
char *pcapin[PCAP_INPUT_COUNT];
int i;
char *pcap_out;
int lineno=0;
int regression;
struct connection *c1;
struct state *st;
@@ -81,6 +79,8 @@ int main(int argc, char *argv[])
argc--; argv++;
}

(void)regression;

if(argc != 3+PCAP_INPUT_COUNT) {
fprintf(stderr, "Usage: %s <whackrecord> <conn-name> <pcapout> <pcapin1> <pcapin2>..\n", progname);
exit(10);
@@ -12,7 +12,7 @@ void recv_pcap_packet(u_char *user
, const u_char *bytes)
{
struct state *st;
struct pcr_kenonce *kn = &crypto_req->pcr_d.kn;
//struct pcr_kenonce *kn = &crypto_req->pcr_d.kn;

recv_pcap_packet_gen(user, h, bytes);

@@ -31,7 +31,7 @@ void recv_pcap_packet2(u_char *user
, const u_char *bytes)
{
struct state *st;
struct pcr_kenonce *kn = &crypto_req->pcr_d.kn;
//struct pcr_kenonce *kn = &crypto_req->pcr_d.kn;

recv_pcap_packet_gen(user, h, bytes);

@@ -14,13 +14,11 @@ recv_pcap recv_inputs[PCAP_INPUT_COUNT]={

int main(int argc, char *argv[])
{
int len;
char *infile;
char *conn_name;
char *pcapin[PCAP_INPUT_COUNT];
int i;
char *pcap_out;
int lineno=0;
int regression = 0;
struct connection *c1;
struct state *st;
@@ -8,7 +8,7 @@

#define TESTNAME "respondselfR1"

static void init_local_interface(void)
static inline void init_local_interface(void)
{
init_jamesjohnson_interface();
}
@@ -6,5 +6,5 @@ UNITTESTARGS=-r ${WHACKFILE} ${CONNNAME}
TESTNAME=certificateselfI1


pcapupdate:
pcapupdate::
@true
@@ -7,7 +7,7 @@

#define TESTNAME "certreplytselffR1"

static void init_local_interface(void)
static inline void init_local_interface(void)
{
init_jamesjohnson_interface();
}
@@ -6,6 +6,6 @@ UNITTESTARGS=-r ${WHACKFILE} ${CONNNAME}
TESTNAME=davecertI1


pcapupdate:
pcapupdate::
@true

@@ -52,7 +52,7 @@ void recv_pcap_packet4(u_char *user
, const u_char *bytes)
{
struct state *st;
struct pcr_kenonce *kn = &crypto_req->pcr_d.kn;
//struct pcr_kenonce *kn = &crypto_req->pcr_d.kn;

recv_pcap_packet_gen(user, h, bytes);

@@ -29,7 +29,7 @@ static void init_fake_secrets(void)

static void init_loaded(void)
{
struct connection *c;
//struct connection *c;

/* loading X.509 CA certificates */
load_authcerts("CA cert", oco->cacerts_dir, AUTH_CA);
@@ -43,7 +43,6 @@ int warningsarefatal = 0;

int main(int argc, char *argv[])
{
err_t err = NULL;
struct addrinfo hints, *result1, *result2;
unsigned char buffer1[1024];
unsigned int buffer1_len = sizeof(buffer1);
@@ -102,13 +102,7 @@ void process_dns_results(void) {
int main(int argc, char *argv[])
{
bool recalculate = FALSE;
int len;
err_t e;
err_t err = NULL;
char *infile;
char *conn_name;
int lineno=0;
struct connection *c1 = NULL;
struct id moon, cassidy;
struct adns_continuation *cr1 = NULL;

@@ -132,6 +126,8 @@ int main(int argc, char *argv[])
argc--; argv++;
}

(void)recalculate;

tool_init_log();
cur_debugging |= DBG_DNS;
init_adns();
@@ -165,11 +161,14 @@ int main(int argc, char *argv[])
cassidy_continue, cr1);
freeanychunk(cassidy.name);
process_dns_results();
#else
(void)cassidy;
#endif

/* re-use cassidy */
cr1 = alloc_thing(struct adns_continuation, "cassidy A lookup");
e = start_adns_hostname(AF_UNSPEC, "cassidy.sandelman.ca", cassidy_host_continue, cr1);
(void)e;
process_dns_results();

stop_adns();
@@ -70,11 +70,8 @@ static void init_fake_secrets(void)
int main(int argc, char *argv[])
{
bool recalculate = FALSE;
int len;
err_t err = NULL;
char *infile;
char *conn_name;
int lineno=0;
struct connection *c1 = NULL;

#ifdef HAVE_EFENCE
@@ -96,6 +93,8 @@ int main(int argc, char *argv[])
argc--; argv++;
}

(void)recalculate;

tool_init_log();
load_oswcrypto();
init_fake_vendorid();
@@ -58,13 +58,8 @@ static void init_fake_secrets(void)

int main(int argc, char *argv[])
{
int len;
char *infile;
char *conn_name;
int lineno=0;
int regression = 0;
struct connection *c1;
struct state *st;

#ifdef HAVE_EFENCE
EF_PROTECT_FREE=1;
@@ -85,6 +80,8 @@ int main(int argc, char *argv[])
argc--; argv++;
}

(void)regression;

tool_init_log();
load_oswcrypto();
init_fake_vendorid();
@@ -58,13 +58,8 @@ static void init_fake_secrets(void)

int main(int argc, char *argv[])
{
int len;
char *infile;
char *conn_name;
int lineno=0;
int regression = 0;
struct connection *c1;
struct state *st;

#ifdef HAVE_EFENCE
EF_PROTECT_FREE=1;
@@ -85,6 +80,8 @@ int main(int argc, char *argv[])
argc--; argv++;
}

(void)regression;

tool_init_log();
load_oswcrypto();
init_fake_vendorid();
@@ -26,10 +26,8 @@ unsigned int sort_dns_answers;

int main(int argc, char *argv[])
{
int len;
char *infile;
char *conn_name;
int lineno=0;
int regression = 0;
struct connection *c1;
struct state *st;
@@ -45,12 +45,9 @@ u_int8_t reply_buffer[MAX_OUTPUT_UDP_SIZE];
int main(int argc, char *argv[])
{
int i;
int len;
char *infile;
char *conn_name;
int lineno=0;
struct connection *c1;
struct state *st;

#ifdef HAVE_EFENCE
EF_PROTECT_FREE=1;
@@ -8,7 +8,7 @@

#define TESTNAME "respondselfR1"

static void init_local_interface(void)
static inline void init_local_interface(void)
{
init_jamesjohnson_interface();
}
@@ -47,12 +47,9 @@ u_int8_t reply_buffer[MAX_OUTPUT_UDP_SIZE];
int main(int argc, char *argv[])
{
int i;
int len;
char *infile;
char *conn_name;
int lineno=0;
struct connection *c1;
struct state *st;

#ifdef HAVE_EFENCE
EF_PROTECT_FREE=1;

0 comments on commit 6994a79

Please sign in to comment.
You can’t perform that action at this time.