X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftest-aes128.c;h=86f5521b623e79c6288580bc1f6ad6e46d0d805b;hb=c5cf10598f8c9f4428291e9df3ecd72a05fb1ccf;hp=e7e990c691ecae31ffb2b327edeca3a800b10806;hpb=bf9712678fc9ec85bf2ac54407e16d76aa22e7b6;p=sliver-openvswitch.git diff --git a/tests/test-aes128.c b/tests/test-aes128.c index e7e990c69..86f5521b6 100644 --- a/tests/test-aes128.c +++ b/tests/test-aes128.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010 Nicira Networks. + * Copyright (c) 2009, 2010, 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. @@ -18,6 +18,7 @@ #include #include "aes128.h" #include "util.h" +#include "ovstest.h" static void hex_to_uint8(const char *input, uint8_t *output, size_t n) @@ -38,11 +39,11 @@ hex_to_uint8(const char *input, uint8_t *output, size_t n) return; error: - ovs_fatal(0, "\"%s\" is not exactly %zu hex digits", input, n * 2); + ovs_fatal(0, "\"%s\" is not exactly %"PRIuSIZE" hex digits", input, n * 2); } -int -main(int argc, char *argv[]) +static void +test_aes128_main(int argc, char *argv[]) { struct aes128 aes; uint8_t plaintext[16]; @@ -64,6 +65,6 @@ main(int argc, char *argv[]) printf("%02x", ciphertext[i]); } putchar('\n'); - - return 0; } + +OVSTEST_REGISTER("test-aes128", test_aes128_main);