aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-02-11 11:11:23 -0800
committerBen Pfaff <blp@nicira.com>2010-02-11 11:11:23 -0800
commitc69ee87c10818267f991236201150b1fa51ae519 (patch)
treeabea72de06ca718ef0296b88ee84a1bf889fed8c /tests
parent62ee3464d99c0e37f38b503321cd46181c5c7617 (diff)
parent67a4917b07031b387beafaedce413b4207214059 (diff)
Merge "master" into "next".
The main change here is the need to update all of the uses of UNUSED in the next branch to OVS_UNUSED as it is now spelled on "master".
Diffstat (limited to 'tests')
-rw-r--r--tests/test-dhcp-client.c2
-rw-r--r--tests/test-flows.c4
-rw-r--r--tests/test-hmap.c4
-rw-r--r--tests/test-jsonrpc.c8
-rw-r--r--tests/test-ovsdb.c40
-rw-r--r--tests/test-reconnect.c24
-rw-r--r--tests/test-vconn.c18
7 files changed, 50 insertions, 50 deletions
diff --git a/tests/test-dhcp-client.c b/tests/test-dhcp-client.c
index 3b35dac6..79d17736 100644
--- a/tests/test-dhcp-client.c
+++ b/tests/test-dhcp-client.c
@@ -91,7 +91,7 @@ release(void *cli_)
}
static void
-modify_dhcp_request(struct dhcp_msg *msg, void *aux UNUSED)
+modify_dhcp_request(struct dhcp_msg *msg, void *aux OVS_UNUSED)
{
if (vendor_class) {
dhcp_msg_put_string(msg, DHCP_CODE_VENDOR_CLASS, vendor_class);
diff --git a/tests/test-flows.c b/tests/test-flows.c
index 6e0b7736..451ca1ad 100644
--- a/tests/test-flows.c
+++ b/tests/test-flows.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,7 +31,7 @@
#include <assert.h>
int
-main(int argc UNUSED, char *argv[])
+main(int argc OVS_UNUSED, char *argv[])
{
struct ofp_match expected_match;
FILE *flows, *pcap;
diff --git a/tests/test-hmap.c b/tests/test-hmap.c
index cf6ee1c9..18d8f461 100644
--- a/tests/test-hmap.c
+++ b/tests/test-hmap.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2009 Nicira Networks.
+ * Copyright (c) 2008, 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -157,7 +157,7 @@ good_hash(int value)
}
static size_t
-constant_hash(int value UNUSED)
+constant_hash(int value OVS_UNUSED)
{
return 123;
}
diff --git a/tests/test-jsonrpc.c b/tests/test-jsonrpc.c
index 03d30001..06b1cf47 100644
--- a/tests/test-jsonrpc.c
+++ b/tests/test-jsonrpc.c
@@ -175,7 +175,7 @@ handle_rpc(struct jsonrpc *rpc, struct jsonrpc_msg *msg, bool *done)
}
static void
-do_listen(int argc UNUSED, char *argv[])
+do_listen(int argc OVS_UNUSED, char *argv[])
{
struct pstream *pstream;
struct jsonrpc **rpcs;
@@ -256,7 +256,7 @@ do_listen(int argc UNUSED, char *argv[])
}
static void
-do_request(int argc UNUSED, char *argv[])
+do_request(int argc OVS_UNUSED, char *argv[])
{
struct jsonrpc_msg *msg;
struct jsonrpc *rpc;
@@ -295,7 +295,7 @@ do_request(int argc UNUSED, char *argv[])
}
static void
-do_notify(int argc UNUSED, char *argv[])
+do_notify(int argc OVS_UNUSED, char *argv[])
{
struct jsonrpc_msg *msg;
struct jsonrpc *rpc;
@@ -327,7 +327,7 @@ do_notify(int argc UNUSED, char *argv[])
}
static void
-do_help(int argc UNUSED, char *argv[] UNUSED)
+do_help(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
usage();
}
diff --git a/tests/test-ovsdb.c b/tests/test-ovsdb.c
index 3025ce39..2e12d495 100644
--- a/tests/test-ovsdb.c
+++ b/tests/test-ovsdb.c
@@ -325,7 +325,7 @@ do_log_io(int argc, char *argv[])
}
static void
-do_parse_atomic_type(int argc UNUSED, char *argv[])
+do_parse_atomic_type(int argc OVS_UNUSED, char *argv[])
{
enum ovsdb_atomic_type type;
struct json *json;
@@ -337,7 +337,7 @@ do_parse_atomic_type(int argc UNUSED, char *argv[])
}
static void
-do_parse_base_type(int argc UNUSED, char *argv[])
+do_parse_base_type(int argc OVS_UNUSED, char *argv[])
{
struct ovsdb_base_type base;
struct json *json;
@@ -350,7 +350,7 @@ do_parse_base_type(int argc UNUSED, char *argv[])
}
static void
-do_parse_type(int argc UNUSED, char *argv[])
+do_parse_type(int argc OVS_UNUSED, char *argv[])
{
struct ovsdb_type type;
struct json *json;
@@ -482,7 +482,7 @@ compare_atoms(const void *a_, const void *b_)
}
static void
-do_sort_atoms(int argc UNUSED, char *argv[])
+do_sort_atoms(int argc OVS_UNUSED, char *argv[])
{
struct ovsdb_base_type base;
union ovsdb_atom *atoms;
@@ -524,7 +524,7 @@ do_sort_atoms(int argc UNUSED, char *argv[])
}
static void
-do_parse_column(int argc UNUSED, char *argv[])
+do_parse_column(int argc OVS_UNUSED, char *argv[])
{
struct ovsdb_column *column;
struct json *json;
@@ -537,7 +537,7 @@ do_parse_column(int argc UNUSED, char *argv[])
}
static void
-do_parse_table(int argc UNUSED, char *argv[])
+do_parse_table(int argc OVS_UNUSED, char *argv[])
{
struct ovsdb_table_schema *ts;
struct json *json;
@@ -705,7 +705,7 @@ do_parse_conditions(int argc, char *argv[])
}
static void
-do_evaluate_conditions(int argc UNUSED, char *argv[])
+do_evaluate_conditions(int argc OVS_UNUSED, char *argv[])
{
struct ovsdb_table_schema *ts;
struct ovsdb_table *table;
@@ -810,7 +810,7 @@ do_parse_mutations(int argc, char *argv[])
}
static void
-do_execute_mutations(int argc UNUSED, char *argv[])
+do_execute_mutations(int argc OVS_UNUSED, char *argv[])
{
struct ovsdb_table_schema *ts;
struct ovsdb_table *table;
@@ -926,7 +926,7 @@ do_query_cb(const struct ovsdb_row *row, void *cbdata_)
}
static void
-do_query(int argc UNUSED, char *argv[])
+do_query(int argc OVS_UNUSED, char *argv[])
{
struct do_query_cbdata cbdata;
struct ovsdb_table_schema *ts;
@@ -1016,7 +1016,7 @@ struct do_query_distinct_row {
};
static void
-do_query_distinct(int argc UNUSED, char *argv[])
+do_query_distinct(int argc OVS_UNUSED, char *argv[])
{
struct ovsdb_column_set columns;
struct ovsdb_table_schema *ts;
@@ -1141,7 +1141,7 @@ do_query_distinct(int argc UNUSED, char *argv[])
}
static void
-do_parse_schema(int argc UNUSED, char *argv[])
+do_parse_schema(int argc OVS_UNUSED, char *argv[])
{
struct ovsdb_schema *schema;
struct json *json;
@@ -1154,7 +1154,7 @@ do_parse_schema(int argc UNUSED, char *argv[])
}
static void
-do_execute(int argc UNUSED, char *argv[])
+do_execute(int argc OVS_UNUSED, char *argv[])
{
struct ovsdb_schema *schema;
struct json *json;
@@ -1204,7 +1204,7 @@ do_trigger_dump(struct test_trigger *t, long long int now, const char *title)
}
static void
-do_trigger(int argc UNUSED, char *argv[])
+do_trigger(int argc OVS_UNUSED, char *argv[])
{
struct ovsdb_schema *schema;
struct list completions;
@@ -1259,7 +1259,7 @@ do_trigger(int argc UNUSED, char *argv[])
}
static void
-do_help(int argc UNUSED, char *argv[] UNUSED)
+do_help(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
usage();
}
@@ -1271,14 +1271,14 @@ static struct ovsdb_txn *do_transact_txn;
static struct ovsdb_table *do_transact_table;
static void
-do_transact_commit(int argc UNUSED, char *argv[] UNUSED)
+do_transact_commit(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
ovsdb_txn_commit(do_transact_txn, false);
do_transact_txn = NULL;
}
static void
-do_transact_abort(int argc UNUSED, char *argv[] UNUSED)
+do_transact_abort(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
ovsdb_txn_abort(do_transact_txn);
do_transact_txn = NULL;
@@ -1338,7 +1338,7 @@ do_transact_set_i_j(struct ovsdb_row *row,
}
static void
-do_transact_insert(int argc UNUSED, char *argv[] UNUSED)
+do_transact_insert(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
struct ovsdb_row *row;
struct uuid *uuid;
@@ -1360,14 +1360,14 @@ do_transact_insert(int argc UNUSED, char *argv[] UNUSED)
}
static void
-do_transact_delete(int argc UNUSED, char *argv[] UNUSED)
+do_transact_delete(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
const struct ovsdb_row *row = do_transact_find_row(argv[1]);
ovsdb_txn_row_delete(do_transact_txn, row);
}
static void
-do_transact_modify(int argc UNUSED, char *argv[] UNUSED)
+do_transact_modify(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
const struct ovsdb_row *row_ro;
struct ovsdb_row *row_rw;
@@ -1387,7 +1387,7 @@ compare_rows_by_uuid(const void *a_, const void *b_)
}
static void
-do_transact_print(int argc UNUSED, char *argv[] UNUSED)
+do_transact_print(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
const struct ovsdb_row **rows;
const struct ovsdb_row *row;
diff --git a/tests/test-reconnect.c b/tests/test-reconnect.c
index 8441fadd..93991ff5 100644
--- a/tests/test-reconnect.c
+++ b/tests/test-reconnect.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2009 Nicira Networks.
+ * Copyright (c) 2009, 2010 Nicira Networks.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -86,19 +86,19 @@ main(void)
}
static void
-do_enable(int argc UNUSED, char *argv[] UNUSED)
+do_enable(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
reconnect_enable(reconnect, now);
}
static void
-do_disable(int argc UNUSED, char *argv[] UNUSED)
+do_disable(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
reconnect_disable(reconnect, now);
}
static void
-do_force_reconnect(int argc UNUSED, char *argv[] UNUSED)
+do_force_reconnect(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
reconnect_force_reconnect(reconnect, now);
}
@@ -118,31 +118,31 @@ error_from_string(const char *s)
}
static void
-do_disconnected(int argc UNUSED, char *argv[])
+do_disconnected(int argc OVS_UNUSED, char *argv[])
{
reconnect_disconnected(reconnect, now, error_from_string(argv[1]));
}
static void
-do_connecting(int argc UNUSED, char *argv[] UNUSED)
+do_connecting(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
reconnect_connecting(reconnect, now);
}
static void
-do_connect_failed(int argc UNUSED, char *argv[])
+do_connect_failed(int argc OVS_UNUSED, char *argv[])
{
reconnect_connect_failed(reconnect, now, error_from_string(argv[1]));
}
static void
-do_connected(int argc UNUSED, char *argv[] UNUSED)
+do_connected(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
reconnect_connected(reconnect, now);
}
static void
-do_received(int argc UNUSED, char *argv[] UNUSED)
+do_received(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
reconnect_received(reconnect, now);
}
@@ -179,13 +179,13 @@ do_run(int argc, char *argv[])
}
static void
-do_advance(int argc UNUSED, char *argv[])
+do_advance(int argc OVS_UNUSED, char *argv[])
{
now += atoi(argv[1]);
}
static void
-do_timeout(int argc UNUSED, char *argv[] UNUSED)
+do_timeout(int argc OVS_UNUSED, char *argv[] OVS_UNUSED)
{
int timeout = reconnect_timeout(reconnect, now);
if (timeout >= 0) {
@@ -197,7 +197,7 @@ do_timeout(int argc UNUSED, char *argv[] UNUSED)
}
static void
-do_set_max_tries(int argc UNUSED, char *argv[])
+do_set_max_tries(int argc OVS_UNUSED, char *argv[])
{
reconnect_set_max_tries(reconnect, atoi(argv[1]));
}
diff --git a/tests/test-vconn.c b/tests/test-vconn.c
index f12e378f..a394f6cf 100644
--- a/tests/test-vconn.c
+++ b/tests/test-vconn.c
@@ -134,7 +134,7 @@ fpv_destroy(struct fake_pvconn *fpv)
/* Connects to a fake_pvconn with vconn_open(), then closes the listener and
* verifies that vconn_connect() reports 'expected_error'. */
static void
-test_refuse_connection(int argc UNUSED, char *argv[])
+test_refuse_connection(int argc OVS_UNUSED, char *argv[])
{
const char *type = argv[1];
int expected_error;
@@ -156,7 +156,7 @@ test_refuse_connection(int argc UNUSED, char *argv[])
* closes it immediately, and verifies that vconn_connect() reports
* 'expected_error'. */
static void
-test_accept_then_close(int argc UNUSED, char *argv[])
+test_accept_then_close(int argc OVS_UNUSED, char *argv[])
{
const char *type = argv[1];
int expected_error;
@@ -181,7 +181,7 @@ test_accept_then_close(int argc UNUSED, char *argv[])
* reads the hello message from it, then closes the connection and verifies
* that vconn_connect() reports 'expected_error'. */
static void
-test_read_hello(int argc UNUSED, char *argv[])
+test_read_hello(int argc OVS_UNUSED, char *argv[])
{
const char *type = argv[1];
struct fake_pvconn fpv;
@@ -310,7 +310,7 @@ test_send_hello(const char *type, const void *out, size_t out_size,
/* Try connecting and sending a normal hello, which should succeed. */
static void
-test_send_plain_hello(int argc UNUSED, char *argv[])
+test_send_plain_hello(int argc OVS_UNUSED, char *argv[])
{
const char *type = argv[1];
struct ofp_header hello;
@@ -326,7 +326,7 @@ test_send_plain_hello(int argc UNUSED, char *argv[])
* the specification says that implementations must accept and ignore extra
* data). */
static void
-test_send_long_hello(int argc UNUSED, char *argv[])
+test_send_long_hello(int argc OVS_UNUSED, char *argv[])
{
const char *type = argv[1];
struct ofp_header hello;
@@ -344,7 +344,7 @@ test_send_long_hello(int argc UNUSED, char *argv[])
/* Try connecting and sending an echo request instead of a hello, which should
* fail with EPROTO. */
static void
-test_send_echo_hello(int argc UNUSED, char *argv[])
+test_send_echo_hello(int argc OVS_UNUSED, char *argv[])
{
const char *type = argv[1];
struct ofp_header echo;
@@ -359,7 +359,7 @@ test_send_echo_hello(int argc UNUSED, char *argv[])
/* Try connecting and sending a hello packet that has its length field as 0,
* which should fail with EPROTO. */
static void
-test_send_short_hello(int argc UNUSED, char *argv[])
+test_send_short_hello(int argc OVS_UNUSED, char *argv[])
{
const char *type = argv[1];
struct ofp_header hello;
@@ -371,7 +371,7 @@ test_send_short_hello(int argc UNUSED, char *argv[])
/* Try connecting and sending a hello packet that has a bad version, which
* should fail with EPROTO. */
static void
-test_send_invalid_version_hello(int argc UNUSED, char *argv[])
+test_send_invalid_version_hello(int argc OVS_UNUSED, char *argv[])
{
const char *type = argv[1];
struct ofp_header hello;
@@ -396,7 +396,7 @@ static const struct command commands[] = {
};
int
-main(int argc, char *argv[])
+main(int argc OVS_UNUSED, char *argv[])
{
set_program_name(argv[0]);
time_init();