// printf(" -l, --loglevel <number>|<domain>=<number>,...\n");
// }
+int ret;
+frsh_contract_t contract[N];
+frsh_vres_id_t vres[N];
+frsh_rel_time_t budget, period, deadline;
+int i;
WVTEST_MAIN("basic negotiation")
{
- int ret;
- frsh_contract_t contract[N];
- frsh_vres_id_t vres[N];
- frsh_rel_time_t budget, period, deadline;
- int i;
// char opt;
// while ((opt = getopt_long(argc, argv, "l:", &long_opts[0], NULL)) != EOF) {
ret = WVFRSH(frsh_contract_negotiate(&contract[i], &vres[i]));
if (ret) exit(1);
}
+}
+
+WVTEST_MAIN("renegotiation")
+{
for (i=0; i<2 /*N*/; i++) {
// FIXME: There is a bug on the test - the 3rd renegotiation fails
budget = fosa_msec_to_rel_time(2*b[i]);
ret = WVFRSH(frsh_contract_renegotiate_sync(&contract[i], vres[i]));
if (ret) exit(1);
}
+}
+WVTEST_MAIN("cancelation")
+{
/* Cancel N contracts */
for (i=0; i<N; i++) {
ret = WVFRSH(frsh_contract_cancel(vres[i]));