All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/2] [PATCH] cpuset_hotplug: fix cpuset_list_compute
@ 2018-11-14 14:21 Cristian Marussi
  2018-11-14 14:21 ` [LTP] [PATCH 2/2] [PATCH] cpuset_list_compute fix exit value Cristian Marussi
  2018-11-14 14:32 ` [LTP] [PATCH 1/2] [PATCH] cpuset_hotplug: fix cpuset_list_compute Cyril Hrubis
  0 siblings, 2 replies; 5+ messages in thread
From: Cristian Marussi @ 2018-11-14 14:21 UTC (permalink / raw)
  To: ltp

cpuset_hotplug failed with:

Usage : cpuset_list_compute [-a|s] list1 [list2]

        -a|s   list1 add/subtract list2.[default: -a]

        -h     Help.
cpuset_hotplug 1 TFAIL: root group's cpus isn't expected(Result: 0,2-5, Expect: ).

It turned out that helper cpuset_list_compute was always failing because it was
improperly handling getopt retval.

Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
---
 .../cpuset/cpuset_hotplug_test/cpuset_list_compute.c           | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_list_compute.c b/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_list_compute.c
index 1b55f4b30..b9f176af4 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_list_compute.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_hotplug_test/cpuset_list_compute.c
@@ -29,8 +29,7 @@ static void usage(char *prog_name, int status)
 
 static void checkopt(int argc, char **argv)
 {
-	char c = '\0';
-	int optc = 0;
+	int c, optc = 0;
 
 	while ((c = getopt(argc, argv, "ahs")) != -1) {
 		switch (c) {
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-11-14 14:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-14 14:21 [LTP] [PATCH 1/2] [PATCH] cpuset_hotplug: fix cpuset_list_compute Cristian Marussi
2018-11-14 14:21 ` [LTP] [PATCH 2/2] [PATCH] cpuset_list_compute fix exit value Cristian Marussi
2018-11-14 14:34   ` Cyril Hrubis
2018-11-14 14:32 ` [LTP] [PATCH 1/2] [PATCH] cpuset_hotplug: fix cpuset_list_compute Cyril Hrubis
2018-11-14 14:39   ` Cristian Marussi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.