[CRIU] [PATCH v8 11/15] zdtm/net/ipv6: allow inacurate match for mldvX_unsolicited_report_interval

Pavel Tikhomirov ptikhomirov at virtuozzo.com
Thu Apr 28 09:38:59 PDT 2016


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.

https://jira.sw.ru/browse/PSBM-30942

Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
 test/zdtm/static/netns-dev.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/test/zdtm/static/netns-dev.c b/test/zdtm/static/netns-dev.c
index 3f909e6..2196f01 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;
 	}
 
-- 
2.5.5



More information about the CRIU mailing list