From 20578e63cfbecd7ee0ed151df5601bc75cfda942 Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Wed, 13 Aug 2014 17:51:02 +0400 Subject: [PATCH] zdtm/ipc_namespaces: don't extra symbols in a sysctl file The kernel has a bug in handling auto_msgmni and if we send extra symbols, a new value isn't applied. Signed-off-by: Andrey Vagin Signed-off-by: Pavel Emelyanov --- test/zdtm/live/static/ipc_namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/zdtm/live/static/ipc_namespace.c b/test/zdtm/live/static/ipc_namespace.c index 872dea705..d54c38701 100644 --- a/test/zdtm/live/static/ipc_namespace.c +++ b/test/zdtm/live/static/ipc_namespace.c @@ -207,7 +207,7 @@ static int rand_ipc_sysctl(char *name, unsigned int val) return fd; } sprintf(buf, "%d\n", val); - ret = write(fd, buf, 32); + ret = write(fd, buf, strlen(buf)); if (ret < 0) { err("Can't write %u into %s\n", val, name); return -errno;