From 27a5ee06be8b4857e5f23f283bad35f2f296479d Mon Sep 17 00:00:00 2001
From: Alejandro Sanchez <alex@schedmd.com>
Date: Fri, 17 Mar 2017 14:33:17 -0600
Subject: [PATCH] Continuation of commit 03d100b01f85

---
 testsuite/expect/test17.64 | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/testsuite/expect/test17.64 b/testsuite/expect/test17.64
index e9529d373b3..f42ba2dfcbb 100755
--- a/testsuite/expect/test17.64
+++ b/testsuite/expect/test17.64
@@ -126,10 +126,10 @@ send_user "\n---Checking sbatch uses mcs-label only for some jobs (ondemand mode
 #
 # Change the slurm.conf MCSparameters and MCSPlugin
 #
-exec $bin_sed -i /MCSPlugin/d $config_path/slurm.conf
-exec $bin_sed -i /MCSParameters/d $config_path/slurm.conf
-exec $bin_sed -i /PrivateData/d $config_path/slurm.conf
-exec $bin_echo MCSPlugin=mcs/account >> $config_path/slurm.conf
+exec $bin_sed -i /^\[\t\s\]*MCSPlugin\[\t\s\]*=/Id $config_path/slurm.conf
+exec $bin_sed -i /^\[\t\s\]*MCSParameters\[\t\s\]*=/Id $config_path/slurm.conf
+exec $bin_sed -i /^\[\t\s\]*PrivateData\[\t\s\]*=/Id $config_path/slurm.conf
+exec $bin_echo -e "\nMCSPlugin=mcs/account" >> $config_path/slurm.conf
 exec $bin_echo MCSParameters=ondemand,select,privatedata >> $config_path/slurm.conf
 exec $bin_echo PrivateData=jobs,nodes >> $config_path/slurm.conf
 update_conf
@@ -358,10 +358,10 @@ cancel_job $job_id
 # test with enforced
 #
 send_user "\n---Checking sbatch uses mcs-label with all jobs (enforced mode)---\n"
-exec $bin_sed -i /MCSPlugin/d $config_path/slurm.conf
-exec $bin_sed -i /MCSParameters/d $config_path/slurm.conf
-exec $bin_sed -i /PrivateData/d $config_path/slurm.conf
-exec $bin_echo MCSPlugin=mcs/account >> $config_path/slurm.conf
+exec $bin_sed -i /^\[\t\s\]*MCSPlugin\[\t\s\]*=/Id $config_path/slurm.conf
+exec $bin_sed -i /^\[\t\s\]*MCSParameters\[\t\s\]*=/Id $config_path/slurm.conf
+exec $bin_sed -i /^\[\t\s\]*PrivateData\[\t\s\]*=/Id $config_path/slurm.conf
+exec $bin_echo -e "\nMCSPlugin=mcs/account" >> $config_path/slurm.conf
 exec $bin_echo MCSParameters=enforced,noselect,privatedata >> $config_path/slurm.conf
 exec $bin_echo PrivateData=jobs,nodes >> $config_path/slurm.conf
 update_conf
-- 
GitLab