perf-with-kcore.sh: Always allow fix_buildid_cache_permissions
authorAdrian Hunter <adrian.hunter@intel.com>
Fri, 12 Apr 2019 11:38:28 +0000 (14:38 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 28 May 2019 21:37:42 +0000 (18:37 -0300)
The user's buildid cache may contain entries added by root even if root
has its own home directory (e.g. by using perfconfig to specify the same
buildid dir), so remove that validation.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20190412113830.4126-7-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/perf-with-kcore.sh

index 7e47a7c..2ad2fff 100644 (file)
@@ -111,11 +111,6 @@ fix_buildid_cache_permissions()
 
        USER_HOME=$(bash <<< "echo ~$SUDO_USER")
 
-       if [ "$HOME" != "$USER_HOME" ] ; then
-               echo "Fix unnecessary because root has a home: $HOME" >&2
-               exit 1
-       fi
-
        echo "Fixing buildid cache permissions"
 
        find "$USER_HOME/.debug" -xdev -type d          ! -user "$SUDO_USER" -ls -exec chown    "$SUDO_USER" \{\} \;