-/* Copyright (c) 2011, 2012, 2013 Nicira, Inc.
+/* Copyright (c) 2011, 2012, 2013, 2014 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*/
#include <config.h>
-
+#undef NDEBUG
#include "bundle.h"
-
#include <math.h>
#include <stdlib.h>
-
#include "flow.h"
#include "ofp-actions.h"
#include "ofpbuf.h"
-
+#include "ovstest.h"
#include "util.h"
#define N_FLOWS 50000
ovs_fatal(0, "%s", error);
}
- action = ofpbuf_data(&ofpacts);
+ action = ofpacts.data;
bundle = ofpact_get_BUNDLE(xmemdup(action, action->len));
ofpbuf_uninit(&ofpacts);
return str;
}
-int
-main(int argc, char *argv[])
+static void
+test_bundle_main(int argc, char *argv[])
{
bool ok = true;
struct ofpact_bundle *bundle;
free(bundle);
free(flows);
- return ok ? 0 : 1;
+ exit(ok ? 0 : 1);
}
+
+OVSTEST_REGISTER("test-bundle", test_bundle_main);