From 5c793473273a18a8e44d4c7b83375e8df3f788bf Mon Sep 17 00:00:00 2001 From: Pavel Tikhomirov Date: Thu, 28 Apr 2016 19:38:59 +0300 Subject: 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 Reviewed-by: Andrew Vagin Signed-off-by: Pavel Emelyanov --- test/zdtm/static/netns-dev.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/zdtm/static/netns-dev.c') 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; } -- cgit v1.2.3