aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/test_testbed_api_sd.c
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-08-23 15:34:50 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-08-23 15:34:50 +0000
commit8830d27022a4c303baab008ad5d4dfeef0c0ee8e (patch)
tree213aa70cf04e8131f198cdd8600806011851138a /src/testbed/test_testbed_api_sd.c
parentc60f24fa1d3db9f446d8cc6cc5606e4fd387529a (diff)
downloadgnunet-8830d27022a4c303baab008ad5d4dfeef0c0ee8e.tar.gz
gnunet-8830d27022a4c303baab008ad5d4dfeef0c0ee8e.zip
- negative deviation factor
Diffstat (limited to 'src/testbed/test_testbed_api_sd.c')
-rw-r--r--src/testbed/test_testbed_api_sd.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/testbed/test_testbed_api_sd.c b/src/testbed/test_testbed_api_sd.c
index 343d1650a..d4fa7af84 100644
--- a/src/testbed/test_testbed_api_sd.c
+++ b/src/testbed/test_testbed_api_sd.c
@@ -48,24 +48,26 @@ run (void *cls, char *const *args, const char *cfgfile,
48 const struct GNUNET_CONFIGURATION_Handle *config) 48 const struct GNUNET_CONFIGURATION_Handle *config)
49{ 49{
50 struct SDHandle *h = GNUNET_TESTBED_SD_init_ (20); 50 struct SDHandle *h = GNUNET_TESTBED_SD_init_ (20);
51 int sd;
51 52
52 ret = 0; 53 ret = 0;
53 GNUNET_TESTBED_SD_add_data_ (h, 40); 54 GNUNET_TESTBED_SD_add_data_ (h, 40);
54 if (GNUNET_SYSERR != GNUNET_TESTBED_SD_deviation_factor_ (h, 10)) 55 if (GNUNET_SYSERR != GNUNET_TESTBED_SD_deviation_factor_ (h, 10, &sd))
55 { 56 {
56 GNUNET_break (0); 57 GNUNET_break (0);
57 ret = 1; 58 ret = 1;
58 goto err; 59 goto err;
59 } 60 }
60 GNUNET_TESTBED_SD_add_data_ (h, 30); 61 GNUNET_TESTBED_SD_add_data_ (h, 30);
61 if (GNUNET_SYSERR == GNUNET_TESTBED_SD_deviation_factor_ (h, 80)) 62 if (GNUNET_SYSERR == GNUNET_TESTBED_SD_deviation_factor_ (h, 80, &sd))
62 { 63 {
63 GNUNET_break (0); 64 GNUNET_break (0);
64 ret = 1; 65 ret = 1;
65 goto err; 66 goto err;
66 } 67 }
67 GNUNET_TESTBED_SD_add_data_ (h, 40); 68 GNUNET_TESTBED_SD_add_data_ (h, 40);
68 if (0 != GNUNET_TESTBED_SD_deviation_factor_ (h, 10)) 69 if ((GNUNET_SYSERR == GNUNET_TESTBED_SD_deviation_factor_ (h, 30, &sd))
70 || (-2 != sd))
69 { 71 {
70 GNUNET_break (0); 72 GNUNET_break (0);
71 ret = 1; 73 ret = 1;
@@ -73,7 +75,8 @@ run (void *cls, char *const *args, const char *cfgfile,
73 } 75 }
74 GNUNET_TESTBED_SD_add_data_ (h, 10); 76 GNUNET_TESTBED_SD_add_data_ (h, 10);
75 GNUNET_TESTBED_SD_add_data_ (h, 30); 77 GNUNET_TESTBED_SD_add_data_ (h, 30);
76 if (3 != GNUNET_TESTBED_SD_deviation_factor_ (h, 60)) 78 if ((GNUNET_SYSERR == GNUNET_TESTBED_SD_deviation_factor_ (h, 60, &sd))
79 || (3 != sd))
77 { 80 {
78 GNUNET_break (0); 81 GNUNET_break (0);
79 ret = 1; 82 ret = 1;