diff options
author | Pavel Tikhomirov <ptikhomirov@virtuozzo.com> | 2016-04-28 19:38:59 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@virtuozzo.com> | 2016-05-27 13:32:05 +0300 |
commit | 5c793473273a18a8e44d4c7b83375e8df3f788bf (patch) | |
tree | b304760eef37246dadc714fa3a15df2268b1d101 | |
parent | cde72cabbd8450bcc9f7ddc99b1cdf295cdd7079 (diff) |
zdtm/net/ipv6: allow inacurate match for mldvX_unsolicited_report_interval
mldv1_unsolicited_report_interval and mldv2_unsolicited_report_interval
are rounded up to (MSEC_PER_SEC / HZ)*k when set as in kernel they are
saved in jiffies. As min HZ is 100, 10 is MAX_MSEC_GRANULARITY.
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Reviewed-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
-rw-r--r-- | test/zdtm/static/netns-dev.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/zdtm/static/netns-dev.c b/test/zdtm/static/netns-dev.c index 3f909e6c6..2196f0199 100644 --- a/test/zdtm/static/netns-dev.c +++ b/test/zdtm/static/netns-dev.c @@ -146,6 +146,8 @@ static int gen_conf(FILE *fp, int *conf, int *conf_rand, return 0; } +#define MAX_MSEC_GRANULARITY 10 + static int check_conf(FILE *fp, int *conf, int *conf_rand, struct range *range, char *path) { int ret; @@ -163,6 +165,10 @@ static int check_conf(FILE *fp, int *conf, int *conf_rand, if (val != *conf_rand) { fail("Option \"%s\" changed from %d to %d", path, *conf_rand, val); + if ((strstr(path, "mldv1_unsolicited_report_interval") + || strstr(path, "mldv2_unsolicited_report_interval")) + && val - *conf_rand < MAX_MSEC_GRANULARITY) + return 0; return -1; } |