From 1ec2a4ae07357d2f7f47ffe0868aabd613ff7c0a Mon Sep 17 00:00:00 2001
From: Alejandro Sanchez <alex@schedmd.com>
Date: Fri, 9 Sep 2016 10:49:58 -0400
Subject: [PATCH] Fix issue filtering licenses for output with squeue.

Bug 3063.
---
 NEWS               | 1 +
 src/squeue/print.c | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index 18eb7b61451..b4eafc31d95 100644
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,7 @@ documents those changes that are of interest to users and administrators.
     reservations ends.
  -- Restructure srun command locking for task_exit processing logic for improved
     parallelism.
+ -- Fix issue filtering licenses for output with squeue.
 
 * Changes in Slurm 16.05.4
 ==========================
diff --git a/src/squeue/print.c b/src/squeue/print.c
index 6f1def1be24..f540e6dea0c 100644
--- a/src/squeue/print.c
+++ b/src/squeue/print.c
@@ -2413,7 +2413,7 @@ static int _filter_job(job_info_t * job)
 		while (token && filter) {
 			iterator = list_iterator_create(params.licenses_list);
 			while ((license = list_next(iterator))) {
-				if (strstr(token, license)) {
+				if (xstrcmp(token, license) == 0) {
 					filter = 0;
 					break;
 				}
-- 
GitLab