Whamcloud - gitweb
LU-11407 tgt: cleanup job_stats output printing 64/37764/24
authorAndreas Dilger <adilger@whamcloud.com>
Fri, 10 Jan 2020 21:18:53 +0000 (14:18 -0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 26 Jul 2022 04:53:27 +0000 (04:53 +0000)
commit338381574b643da064e90e44d75be85d1be3a93c
treed52a9ae716d8f82b9ea8b40cff52665a56900a35
parent45291b8c06eebf33d3654db3a7d3cfc5836004a6
LU-11407 tgt: cleanup job_stats output printing

Escape non-printable and other special characters in the JobID
name, which may be passed from the client environment, to avoid
breaking YAML format parsing.  We can't use the kernel "%*pE"
escape format, because that doesn't have any option to escape
printable characters like quotes or regular spaces.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: If6a0bc4276fae03305f94e8c85d8f109913ebbe5
Reviewed-on: https://review.whamcloud.com/37764
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Ben Evans <beevans@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/obdclass/lprocfs_jobstats.c
lustre/tests/sanity.sh