mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Taeung Song <treeze.taeung@gmail.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Taeung Song <treeze.taeung@gmail.com>
Subject: [TEST REPORT][PATCH] perf config: Introduce perf_config_set class
Date: Thu, 10 Mar 2016 23:04:37 +0900	[thread overview]
Message-ID: <1457618677-19962-1-git-send-email-treeze.taeung@gmail.com> (raw)

Tested-by: Taeung Song <treeze.taeung@gmail.com>
Test-Date: 2016-03-10
Version: perf version 4.5.rc2.g8c497f
Kernel: 4.5.0-rc4+
Distro: Ubuntu 15.10 wily

Test Environment:

    1. Perf PATH

        # whereis perf
        perf: /usr/local/bin/perf /usr/local/share/man/man1/perf.1.gz

    2. User config file

        # cat ~/.perfconfig
        [report]
                queue-size = 1
        [call-graph]
                threshold = 2.0
        [test]
                location = user
        [top]
                children = false

    3. System config file

        # cat /usr/local/etc/perfconfig
        [ui]
            show-headers = false
        [test]
            location = system
	[top]
	    children = true

Test Results:

 Case 0) BASIC: perf_config() function work normally
 
    # cat ~/.perfconfig
    [colors]
        top = blue, white

    # perf top
    (omitted output, there isn't any problem)

 Case 1) BASIC: List functionality without a specific file
                  (equal with user + system config,
                   but user config has order of priority)

    # cat ~/.perfconfig
    [report]
        queue-size = 1
    [call-graph]
        threshold = 2.0
    [test]
        location = user
    [top]
        children = false

    # perf config --list
    ui.show-headers=false
    call-graph.threshold=2.0
    report.queue-size=1
    top.children=false
    test.location=user

 Case 2) BASIC: List functionality with user config file

    # perf config --user --list
    call-graph.threshold=2.0
    report.queue-size=1
    top.children=false
    test.location=user
    
 Case 3) BASIC: List functionality with system config file

    # perf config --system --list
    ui.show-headers=false
    top.children=true
    test.location=system

 Case 4) EXCEP HANDLING: If using two config file at a time

    # perf config --user --system --list
    Error: only one config file at a time

     Usage: perf config [<file-option>] [options]

            --user            use user config file-
            --system          use system config file

 Case 5) EXCEP HANDLING: user config file : don't exist || permission denied || empty
                           (user wide ~/.perfconfig)

    # perf config --user --list
    Nothing configured, please check your /home/taeung/.perfconfig

 Case 6) EXCEP HANDLING: system config file : don't exist || permission denied || empty
                           (system wide /usr/local/etc/perfconfig depending on perf PATH)

    # perf config --system --list
    Nothing configured, please check your /usr/local/etc/perfconfig

Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/builtin-config.c |  61 +++++++---
 tools/perf/util/cache.h     |   2 -
 tools/perf/util/config.c    | 268 +++++++++++++++++++++++++++++++++++++++++---
 tools/perf/util/config.h    | 138 +++++++++++++++++++++++
 4 files changed, 433 insertions(+), 36 deletions(-)
 create mode 100644 tools/perf/util/config.h

                 reply	other threads:[~2016-03-10 14:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457618677-19962-1-git-send-email-treeze.taeung@gmail.com \
    --to=treeze.taeung@gmail.com \
    --cc=acme@kernel.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®