X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Ftest-aes128.c;h=86f5521b623e79c6288580bc1f6ad6e46d0d805b;hb=7efa3dccd1968535ae32caf59746aa11ce7532f2;hp=19874b10be3c12b1bd61f066a350cf416c061fdf;hpb=8706009e555bb9fa04a5679e4be2c7c67506802b;p=sliver-openvswitch.git diff --git a/tests/test-aes128.c b/tests/test-aes128.c index 19874b10b..86f5521b6 100644 --- a/tests/test-aes128.c +++ b/tests/test-aes128.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2010 Nicira, Inc. + * 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);