diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-09 14:48:41 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-07-09 14:48:41 +0100 |
commit | 7813c884ffa83169bb56d76eb61a8050b245843b (patch) | |
tree | 5fbb7bf84b4b09110e2a34774605178b30d81089 /test/lua/unit/siphash.lua | |
parent | 5988e42fbf670eae5d3839e517915917d45a7ec2 (diff) | |
download | rspamd-7813c884ffa83169bb56d76eb61a8050b245843b.tar.gz rspamd-7813c884ffa83169bb56d76eb61a8050b245843b.zip |
[Test] Remove obsoleted test
Diffstat (limited to 'test/lua/unit/siphash.lua')
-rw-r--r-- | test/lua/unit/siphash.lua | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/test/lua/unit/siphash.lua b/test/lua/unit/siphash.lua deleted file mode 100644 index 13f02eaf3..000000000 --- a/test/lua/unit/siphash.lua +++ /dev/null @@ -1,74 +0,0 @@ --- Test siphash routines - -context("Siphash check functions", function() - local ffi = require("ffi") - ffi.cdef[[ - void rspamd_cryptobox_init (void); - size_t siphash24_test(bool generic, size_t niters, size_t len); - bool siphash24_fuzz (size_t cycles); - double rspamd_get_ticks (void); - ]] - - ffi.C.rspamd_cryptobox_init() - - local speed_iters = 1000 - - test("Siphash test reference vectors (1KB)", function() - local t1 = ffi.C.rspamd_get_ticks() - local res = ffi.C.siphash24_test(true, speed_iters, 1024) - local t2 = ffi.C.rspamd_get_ticks() - - print("Reference siphash (1KB): " .. tostring(t2 - t1) .. " sec") - assert_not_equal(res, 0) - end) - test("Siphash test optimized vectors (1KB)", function() - local t1 = ffi.C.rspamd_get_ticks() - local res = ffi.C.siphash24_test(false, speed_iters, 1024) - local t2 = ffi.C.rspamd_get_ticks() - - print("Optimized siphash (1KB): " .. tostring(t2 - t1) .. " sec") - assert_not_equal(res, 0) - end) - test("Siphash test reference vectors (5B)", function() - local t1 = ffi.C.rspamd_get_ticks() - local res = ffi.C.siphash24_test(true, speed_iters, 5) - local t2 = ffi.C.rspamd_get_ticks() - - print("Reference siphash (5B): " .. tostring(t2 - t1) .. " sec") - assert_not_equal(res, 0) - end) - test("Siphash test optimized vectors (5B)", function() - local t1 = ffi.C.rspamd_get_ticks() - local res = ffi.C.siphash24_test(false, speed_iters, 5) - local t2 = ffi.C.rspamd_get_ticks() - - print("Optimized siphash (5B): " .. tostring(t2 - t1) .. " sec") - assert_not_equal(res, 0) - end) - test("Siphash test reference vectors (50B)", function() - local t1 = ffi.C.rspamd_get_ticks() - local res = ffi.C.siphash24_test(true, speed_iters, 50) - local t2 = ffi.C.rspamd_get_ticks() - - print("Reference siphash (50B): " .. tostring(t2 - t1) .. " sec") - assert_not_equal(res, 0) - end) - test("Siphash test optimized vectors (50B)", function() - local t1 = ffi.C.rspamd_get_ticks() - local res = ffi.C.siphash24_test(false, speed_iters, 50) - local t2 = ffi.C.rspamd_get_ticks() - - print("Optimized siphash (50B): " .. tostring(t2 - t1) .. " sec") - assert_not_equal(res, 0) - end) - test("Siphash fuzz test (1000 iters)", function() - local res = ffi.C.siphash24_fuzz(1000) - - assert_not_equal(res, 0) - end) - test("Siphash fuzz test (10000 iters)", function() - local res = ffi.C.siphash24_fuzz(10000) - - assert_not_equal(res, 0) - end) -end) |