mirror of
https://github.com/circify/circ.git
synced 2026-04-21 03:00:54 -04:00
all tests pass
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
* Example on how to merge two data sets and to perform various analyses
|
||||
*/
|
||||
|
||||
#define LEN_A 20
|
||||
#define LEN_B 20
|
||||
#define LEN_A 5
|
||||
#define LEN_B 5
|
||||
|
||||
#define ATT_A 2 //Number of attributes
|
||||
#define ATT_B 2
|
||||
|
||||
@@ -4,32 +4,29 @@ from util import run_tests
|
||||
from test_suite import *
|
||||
|
||||
if __name__ == "__main__":
|
||||
# tests = arithmetic_tests + \
|
||||
# arithmetic_boolean_tests + \
|
||||
# nary_arithmetic_tests + \
|
||||
# bitwise_tests + \
|
||||
# boolean_tests + \
|
||||
# nary_boolean_tests + \
|
||||
# const_arith_tests + \
|
||||
# const_bool_tests + \
|
||||
# ite_tests + \
|
||||
# shift_tests + \
|
||||
# div_tests + \
|
||||
# mod_tests + \
|
||||
# array_tests + \
|
||||
# c_array_tests + \
|
||||
# function_tests + \
|
||||
# struct_tests + \
|
||||
# matrix_tests + \
|
||||
# ptr_tests + \
|
||||
# c_misc_tests + \
|
||||
# biomatch_tests + \
|
||||
# kmeans_tests_2 + \
|
||||
# gauss_tests
|
||||
|
||||
# tests = biomatch_tests
|
||||
|
||||
tests = db_tests
|
||||
tests = arithmetic_tests + \
|
||||
arithmetic_boolean_tests + \
|
||||
nary_arithmetic_tests + \
|
||||
bitwise_tests + \
|
||||
boolean_tests + \
|
||||
nary_boolean_tests + \
|
||||
const_arith_tests + \
|
||||
const_bool_tests + \
|
||||
ite_tests + \
|
||||
shift_tests + \
|
||||
div_tests + \
|
||||
mod_tests + \
|
||||
array_tests + \
|
||||
c_array_tests + \
|
||||
function_tests + \
|
||||
struct_tests + \
|
||||
matrix_tests + \
|
||||
ptr_tests + \
|
||||
c_misc_tests + \
|
||||
biomatch_tests + \
|
||||
kmeans_tests_2 + \
|
||||
gauss_tests + \
|
||||
db_tests
|
||||
|
||||
# TODO: add support for return value - int promotion
|
||||
# unsigned_arithmetic_tests + \
|
||||
|
||||
@@ -44,8 +44,8 @@ def run_test(expected: str, server_cmd: List[str], client_cmd: List[str]) -> boo
|
||||
client_proc = Popen(" ".join(client_cmd),
|
||||
shell=True, stdout=PIPE, stderr=PIPE)
|
||||
|
||||
server_out, server_err = server_proc.communicate(timeout=30)
|
||||
client_out, client_err = client_proc.communicate(timeout=30)
|
||||
server_out, server_err = server_proc.communicate(timeout=300)
|
||||
client_out, client_err = client_proc.communicate(timeout=300)
|
||||
|
||||
if server_err:
|
||||
raise RuntimeError(
|
||||
|
||||
@@ -30,98 +30,93 @@ function mpc_test_2 {
|
||||
RUST_BACKTRACE=1 measure_time $BIN --parties $parties $cpath mpc --cost-model "hycc" --selection-scheme "a+b"
|
||||
}
|
||||
|
||||
# build mpc arithmetic tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_add.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_sub.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_mult.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_mult_add_pub.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_mod.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_add_unsigned.c
|
||||
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_int_equals.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_int_greater_than.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_int_greater_equals.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_int_less_than.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_int_less_equals.c
|
||||
|
||||
# build nary arithmetic tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/nary_arithmetic_tests/2pc_nary_arithmetic_add.c
|
||||
|
||||
# build bitwise tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/bitwise_tests/2pc_bitwise_and.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/bitwise_tests/2pc_bitwise_or.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/bitwise_tests/2pc_bitwise_xor.c
|
||||
|
||||
# build boolean tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/boolean_tests/2pc_boolean_and.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/boolean_tests/2pc_boolean_or.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/boolean_tests/2pc_boolean_equals.c
|
||||
|
||||
# build nary boolean tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/nary_boolean_tests/2pc_nary_boolean_and.c
|
||||
|
||||
# build const tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/const_tests/2pc_const_arith.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/const_tests/2pc_const_bool.c
|
||||
|
||||
# build if statement tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/ite_tests/2pc_ite_ret_bool.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/ite_tests/2pc_ite_ret_int.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/ite_tests/2pc_ite_only_if.c
|
||||
|
||||
# build shift tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/shift_tests/2pc_lhs.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/shift_tests/2pc_rhs.c
|
||||
|
||||
# build div tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/div_tests/2pc_div.c
|
||||
|
||||
# build array tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/array_tests/2pc_array_sum.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/array_tests/2pc_array_index.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/array_tests/2pc_array_index_2.c
|
||||
|
||||
# build circ/compiler array tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/c_array_tests/2pc_array.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/c_array_tests/2pc_array_1.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/c_array_tests/2pc_array_2.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/c_array_tests/2pc_array_3.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/c_array_tests/2pc_array_sum_c.c
|
||||
|
||||
# build function tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/function_tests/2pc_function_add.c
|
||||
|
||||
# build struct tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/struct_tests/2pc_struct_add.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/struct_tests/2pc_struct_array_add.c
|
||||
|
||||
# build matrix tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/matrix_tests/2pc_matrix_add.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/matrix_tests/2pc_matrix_assign_add.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/matrix_tests/2pc_matrix_ptr_add.c
|
||||
|
||||
# build ptr tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/ptr_tests/2pc_ptr_add.c
|
||||
|
||||
# build misc tests
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/misc_tests/2pc_millionaires.c
|
||||
mpc_test 2 ./examples/C/mpc/unit_tests/misc_tests/2pc_multi_var.c
|
||||
|
||||
# build hycc benchmarks
|
||||
mpc_test 2 ./examples/C/mpc/benchmarks/biomatch/2pc_biomatch.c
|
||||
mpc_test_2 2 ./examples/C/mpc/benchmarks/biomatch/biomatch.c
|
||||
# # # mpc_test 2 ./examples/C/mpc/benchmarks/kmeans/2pc_kmeans.c
|
||||
mpc_test 2 ./examples/C/mpc/benchmarks/kmeans/2pc_kmeans_.c
|
||||
# # # mpc_test 2 ./examples/C/mpc/benchmarks/kmeans/2pc_kmeans_og.c
|
||||
mpc_test_2 2 ./examples/C/mpc/benchmarks/gauss/2pc_gauss_inline.c
|
||||
mpc_test_2 2 ./examples/C/mpc/benchmarks/db/db_join.c
|
||||
|
||||
# # build mpc arithmetic tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_add.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_sub.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_mult.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_mult_add_pub.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_mod.c
|
||||
# # mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_add_unsigned.c
|
||||
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_int_equals.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_int_greater_than.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_int_greater_equals.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_int_less_than.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/arithmetic_tests/2pc_int_less_equals.c
|
||||
|
||||
# # build nary arithmetic tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/nary_arithmetic_tests/2pc_nary_arithmetic_add.c
|
||||
|
||||
# # build bitwise tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/bitwise_tests/2pc_bitwise_and.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/bitwise_tests/2pc_bitwise_or.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/bitwise_tests/2pc_bitwise_xor.c
|
||||
|
||||
# # build boolean tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/boolean_tests/2pc_boolean_and.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/boolean_tests/2pc_boolean_or.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/boolean_tests/2pc_boolean_equals.c
|
||||
|
||||
# # build nary boolean tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/nary_boolean_tests/2pc_nary_boolean_and.c
|
||||
|
||||
# # build const tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/const_tests/2pc_const_arith.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/const_tests/2pc_const_bool.c
|
||||
|
||||
# # build if statement tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/ite_tests/2pc_ite_ret_bool.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/ite_tests/2pc_ite_ret_int.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/ite_tests/2pc_ite_only_if.c
|
||||
|
||||
# # build shift tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/shift_tests/2pc_lhs.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/shift_tests/2pc_rhs.c
|
||||
|
||||
# # build div tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/div_tests/2pc_div.c
|
||||
|
||||
# # build array tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/array_tests/2pc_array_sum.c
|
||||
# # mpc_test 2 ./examples/C/mpc/unit_tests/array_tests/2pc_array_index.c
|
||||
# # mpc_test 2 ./examples/C/mpc/unit_tests/array_tests/2pc_array_index_2.c
|
||||
|
||||
# # build circ/compiler array tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/c_array_tests/2pc_array.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/c_array_tests/2pc_array_1.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/c_array_tests/2pc_array_2.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/c_array_tests/2pc_array_3.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/c_array_tests/2pc_array_sum_c.c
|
||||
|
||||
# # build function tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/function_tests/2pc_function_add.c
|
||||
|
||||
# # build struct tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/struct_tests/2pc_struct_add.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/struct_tests/2pc_struct_array_add.c
|
||||
|
||||
# # build matrix tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/matrix_tests/2pc_matrix_add.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/matrix_tests/2pc_matrix_assign_add.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/matrix_tests/2pc_matrix_ptr_add.c
|
||||
|
||||
# # build ptr tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/ptr_tests/2pc_ptr_add.c
|
||||
|
||||
# # build misc tests
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/misc_tests/2pc_millionaires.c
|
||||
# mpc_test 2 ./examples/C/mpc/unit_tests/misc_tests/2pc_multi_var.c
|
||||
|
||||
# # build hycc benchmarks
|
||||
# mpc_test 2 ./examples/C/mpc/benchmarks/biomatch/2pc_biomatch.c
|
||||
# mpc_test_2 2 ./examples/C/mpc/benchmarks/biomatch/biomatch.c
|
||||
# # # # mpc_test 2 ./examples/C/mpc/benchmarks/kmeans/2pc_kmeans.c
|
||||
# mpc_test 2 ./examples/C/mpc/benchmarks/kmeans/2pc_kmeans_.c
|
||||
# # # # mpc_test 2 ./examples/C/mpc/benchmarks/kmeans/2pc_kmeans_og.c
|
||||
# mpc_test_2 2 ./examples/C/mpc/benchmarks/gauss/2pc_gauss_inline.c
|
||||
# # # # mpc_test_2 2 ./examples/C/mpc/benchmarks/db/db_join.c
|
||||
# # # # mpc_test_2 2 ./examples/C/mpc/benchmarks/mnist/mnist.c
|
||||
|
||||
|
||||
|
||||
|
||||
# # ilp benchmarks
|
||||
# # mpc_test 2 ./examples/C/mpc/ilp_benchmarks/2pc_ilp_bench_1.c
|
||||
# # mpc_test 2 ./examples/C/mpc/ilp_benchmarks/2pc_ilp_bench_2.c
|
||||
|
||||
Reference in New Issue
Block a user