[PATCH 4/4] rt-tests: cyclictest warn of interaction between '-a', '--smp', and '--numa'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The '-a' option is always ignored if --smp or --numa is specified.  Fix the
warning message to not depend on --smp or --numa occuring first.

Signed-off-by: Frank Rowand <frank.rowand@xxxxxxxxxxx>
---
 src/cyclictest/cyclictest.c |   14 	11 +	3 -	0 !
 1 file changed, 11 insertions(+), 3 deletions(-)

Index: b/src/cyclictest/cyclictest.c
===================================================================
--- a/src/cyclictest/cyclictest.c
+++ b/src/cyclictest/cyclictest.c
@@ -949,6 +949,7 @@ static char *policyname(int policy)
 static void process_options (int argc, char *argv[])
 {
 	int error = 0;
+	int option_affinity = 0;
 	int max_cpus = sysconf(_SC_NPROCESSORS_CONF);
 	struct rlimit rlim;
 
@@ -1000,10 +1001,9 @@ static void process_options (int argc, c
 			break;
 		switch (c) {
 		case 'a':
-			if (smp) {
-				warn("-a ignored due to --smp\n");
+			option_affinity = 1;
+			if (smp || numa)
 				break;
-			}
 			if (optarg != NULL) {
 				affinity = atoi(optarg);
 				setaffinity = AFFINITY_SPECIFIED;
@@ -1112,6 +1112,14 @@ static void process_options (int argc, c
 		}
 	}
 
+	if (option_affinity) {
+		if (smp) {
+			warn("-a ignored due to --smp\n");
+		} else if (numa) {
+			warn("-a ignored due to --numa\n");
+		}
+	}
+
 	if (setaffinity == AFFINITY_SPECIFIED) {
 		if (affinity < 0)
 			error = 1;

--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux