How to set up bee git repo and using lkp

来源:互联网 发布:淘宝后台装修教程视频 编辑:程序博客网 时间:2024/06/08 10:54

1. ssh chenyu@bee.sh.intel.com

2.

under your git path, do 'git clone --bare ...' to

clone bared repo, or setup the git repo as bare with 'git config --local core.bare true'.


chenyu@bee:/git/chenyu/test$ git clone --bare https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


3.Just make sure your whole git directory can be accessed by 'others', e.g use 'chmod -R o+rx'.

4.

Config 'core.sharedRepository=all'. You can do like 'git config --local core.sharedRepository all' in your git directory. Or change .git/config file directly.

Public can check out your git and if you want to only allow your self or a group as committer, just set properly write permission for group, e.g 'chmod -R g+rwx', etc.

5.Setup group owner properly for your repo, e.g 'chgrp ...' to set your group

Run 'chmod -R g+rwxs' to grant group all access

Config 'core.sharedRepository=group'. Do like 'git config --local core.sharedRepository group'. Or change .git/config file directly.

5.

export your repo on http://bee.sh.intel.com/gitweb

Just "touch gitweb-export-ok" within your repo directory.


6. Notification mail for git commits

If you want to get auto mail notification for any change made by group users,

refer /home/zhen/update script. Copy it to your git 'hooks' directory. Change 'project', 'basedir' and 'recipients' address for your repo. That's it.


7. later if you want the LKP auto compile system to monitor this repo, send an email to Philip, I guess we were done.



8. local dev machine:

git clone git://bee.sh.intel.com/git/chenyu/linux.git

git remote add upstreamhttps://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch upstream

chenyu@sharon:~/src/bee/linux$ git branch
* master
chenyu@sharon:~/src/bee/linux$ git branch upstream upstream/master
Branch upstream set up to track remote branch master from upstream.
chenyu@sharon:~/src/bee/linux$ git branch
* master
  upstream
9.

git checkout upstream

but if you try to git push -f origin upstream:master,

which is to push upstream branch to origin:master branch, you might get

error saying that, the service is not enabled. This is because you use

git protocol as a push protocol, actually you should use ssh instead:

git remote set-url origin ssh://chenyu@bee.sh.intel.com/git/chenyu/linux.git

then finally git push -f origin upstream:master

works as expected.



10.  set up lkp

git clone git://bee.sh.intel.com/git/lkp/lkp-core.git

git clone git://bee.sh.intel.com/git/lkp/lkp-tests.git

check lkp-test/README.md and first test locally:

## Getting started

```
        git clone git://git.kernel.org/pub/scm/linux/kernel/git/wfg/lkp-tests.git

        cd lkp-tests
        export LKP_SRC=$PWD
        export PATH=$PATH:$LKP_SRC/bin

        lkp help
```

## Install packages for a job

```
        # browse and select a job you want to run, for example, jobs/hackbench.yaml
        ls $LKP_SRC/jobs
        lkp install $LKP_SRC/jobs/hackbench.yaml
```

## Run one atomic job

```
        lkp split-job $LKP_SRC/jobs/hackbench.yaml
        # output is:
        # jobs/hackbench.yaml => ./hackbench-1600%-process-pipe.yaml
        # jobs/hackbench.yaml => ./hackbench-1600%-process-socket.yaml
        # jobs/hackbench.yaml => ./hackbench-1600%-threads-pipe.yaml
        # jobs/hackbench.yaml => ./hackbench-1600%-threads-socket.yaml
        # jobs/hackbench.yaml => ./hackbench-50%-process-pipe.yaml
        # jobs/hackbench.yaml => ./hackbench-50%-process-socket.yaml
        # jobs/hackbench.yaml => ./hackbench-50%-threads-pipe.yaml
        # jobs/hackbench.yaml => ./hackbench-50%-threads-socket.yaml

        lkp run ./hackbench-50%-threads-socket.yaml
```

## Check result
```
        lkp result hackbench


Then try to test remotely, that is, to leverage lkp server to do some testings for us.

we need to check lkp-core(for internal use), first it is env-setup.md:

#### Introduction

Intel kernel developers can apply for SSH account in the LKP server to
queue test jobs and analyze results.


#### Create Account

Ask the admin([Ying](mailto: ying.huang@intel.com), or [Fengguang](fengguang.wu@intel.com))
to create a user account (e.g. aaron) for you on the servers bee and inn, then there will be a `/lkp/aaron/` dir for you, with `g+w` set.


#### ssh setup

After account has been created, you can login to the main LKP server "inn" by this way:

        ssh -p 22000 bee.sh.intel.com

To make it easier to SSH to the server, it's recommended to create an entry in your
local linux desktop's ~/.ssh/config:

```bash
    Host inn
        User <your user name on inn>
        HostName bee.sh.intel.com
        Port 22000
```
This will allow you to login conveniently with

        ssh inn

To directly ssh into more test boxes, run this in your own laptop/desktop:

        ssh inn /c/kernel-tests/create-ssh-hosts.rb >> ~/.ssh/config

You may need setup passwordless login so that you don't have to enter password
every time you update your code(will describe soon), or ssh to `inn`.


#### Clone code

You should run git clone in your own linux desktop/laptop.
Then you can edit files locally and run the below "update" script
to re-sync the source code to inn.

Run following commands on your develop box:

```bash
$ git clone git://bee.sh.intel.com/git/lkp/lkp-core.git
$ git clone git://bee.sh.intel.com/git/lkp/lkp-tests.git
```

#### Manage your code

Go to lkp-core dir and update lkp-core:
```bash
$ cd lkp-core
$ ./update
```

Go to lkp-test dir, link "update" script and update lkp-test:
```
$ cd lkp-test
$ ln -s ../lkp-core/update .
$ ./update
```
The update script will

The update script will

- create inn:/lkp/$USER/.src-$(date +%Y%m%d-%H%M%S) and symlink it to inn:/lkp/$USER/src
  which will be your own version of the scripts to run in inn

- create files inn:~/public_html/lkp-src.tgz and inn:/lkp/$USER/lkp-x86_64.cgz
  for the test boxes to download and run

```

#### Env setup

Put the following in your .bashrc on `inn`

```bash
export LKP_USER=<your user name on inn>
export LKP_HOME=/lkp/$LKP_USER
export LKP_SRC_DIR=$LKP_HOME/src
export PATH=$HOME/bin:$PATH
. /lkp/env.sh
```

11. customize lkp

since I have a repo on bee.sh.intel.com/git/chenyu/linux.git,

whenever I submit a patch to it, I want the lkp to test a hackbench to verify if there is any performance regression.

For example, I have submit a patch which change the lowlevel implemenatation of cpu offline,

thus I want to test hackbench with all CPUs online Vs a few CPUs offline.

This requires us to customize our lkp testing. Before that, I want to show how to test specific commit id on hackbench.

After login into inn, check if lkp has monitored our branch:

cd /c/repo/linux
git remote
check the machine info for testing machine, say:

ls hosts/
cat hosts/ivb41
check what is current job running on this machine:

lkp lq ivb41

check the status for this machine:

lkp wtmp lkp-bdw01



queue the job:

queue -b yhuang/dev -k sha1 -t lkp-bdw01 -q 'vip' -e"xxx@intel.com" jobs/hackbench.yaml 
check the status(result output dir) of hackbench testing

 lkp rt -d 1d hackbench

Then if you want to customize your test case, you can either

add script in setup/monitor/test directory in lkp/src, then

./update to inn, and finally inn can use our test case to create

jobs, for example:

If it is only for debug test purpose, you can hack "run_for_time
function in tests/hachbench file, to add you own logic of cpu-hotplug.
Then, you need to update your own souce code to inn by "update" command.

wzsun@Ubuntu:~/git/lkp-tests$ ./update

Then, you need to log onto inn server and queue the job again, but
with a modified command line.

wzsun@inn:~$  queue -t lkp-bdw01 -b chenyu/master -k xxxx -q vip -e
"xxx@intel.com" -s 'user: chenyu' hackbench.yaml


-s 'user: chenyu' is to let tbox use your own copy of lkp source code
for test execution.


If one day the lkp has reported a performance regression on your commit,

such as:

FYI, we noticed a -15.6% regression of unixbench.score due to commit:commit 8c82d5a94b754b6015f8cf8ea1fde15821fc6611 ("x86 tsc_msr: Extend to include Intel Core Architecture")https://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git releasein testcase: unixbenchon test machine: lkp-bdw-de1: 16 threads Broadwell-DE with 8G memorywith following parameters: cpufreq_governor=performance/nr_task=1/runtime=300s/test=whetstone-doubleDetails are as below:-------------------------------------------------------------------------------------------------->To reproduce:        git clone git://git.kernel.org/pub/scm/linux/kernel/git/wfg/lkp-tests.git        cd lkp-tests        bin/lkp install job.yaml  # job file is attached in this email        bin/lkp run     job.yaml=========================================================================================compiler/cpufreq_governor/kconfig/nr_task/rootfs/runtime/tbox_group/test/testcase:  gcc-4.9/performance/x86_64-rhel/1/debian-x86_64-2015-02-07.cgz/300s/lkp-bdw-de1/whetstone-double/unixbenchcommit:  abc6a0f4b18281410da1a3f26e2819d8e03e144f  8c82d5a94b754b6015f8cf8ea1fde15821fc6611

then you want to occupy the test box for a long time for reproducing, you can queue a

borrow.yaml job on this machine, and then if you do not reboot

the text box, this machine will keep idle for you.

Then you can run test case manually on this machine, such as unixbench:

1. check what a typical unixbench test command is, on inn:

chenyu@inn:~$ lkp rt -d 1d unixbench

choose one of the whetstone-double,

/result/unixbench/powersave-300s-1-whetstone-double/lituya/debian-x86_64-2015-02-07.cgz/x86_64-rhel/gcc-4.9/ffb0bf39dff8530ca3f64694b5eb64082725fc28/0/

reproduce.sh:

2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu10/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu11/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu12/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu13/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu14/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu15/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu5/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu7/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu8/cpufreq/scaling_governor2016-07-04 02:37:57 echo powersave > /sys/devices/system/cpu/cpu9/cpufreq/scaling_governor2016-07-04 02:37:58 ./Run whetstone-double -c 1 -i 30

2. scp /lkp/benchmarks/unixbench.cgz to lkp-bdw-de1

3.

ssh root@lkp-bdw-de1


exttact it:

gzip -dc unixbench.cgz | cpio -imud

then the unixbench will be extracted to /lkp/benchmarks/unixbench

on lkp-bdw-de1, then you can change the cpufreq policy, and run the unixbench, -c means nr_task = 1, -i=30 means runtime=30s

according to lkp report, it should be ./Run whetstone-double -c 1 -i 300

FYI, we noticed a -15.6% regression of unixbench.score due to commit:commit 8c82d5a94b754b6015f8cf8ea1fde15821fc6611 ("x86 tsc_msr: Extend to include Intel Core Architecture")https://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git releasein testcase: unixbenchon test machine: lkp-bdw-de1: 16 threads Broadwell-DE with 8G memorywith following parameters: cpufreq_governor=performance/nr_task=1/runtime=300s/test=whetstone-double



summary:

bad commit

queue -t lkp-bdw-de1 -b chenyu/master -k 8c82d5a94b754b6015f8cf8ea1fde15821fc6611 -q vip -e "yu.c.chen@intel.com" -s 'user: chenyu' jobs/borrow-2h.yaml

lkp wtmp lkp-bdw-de1

lkp lq lkp-bdw-de1

lkp power_reboot lkp-bdw-de1

ssh root@lkp-bdw-de1

good commit:

queue -t lkp-bdw-de1 -b chenyu/master -k abc6a0f4b18281410da1a3f26e2819d8e03e144f -q vip -e "yu.c.chen@intel.com" -s 'user: chenyu' jobs/borrow-2h.yaml

lkp wtmp lkp-bdw-de1



bad commit 8c82d5a:

x86 tsc_msr: Extend to include Intel Core Architecture

Sat Jan  1 22:29:24 2000  -0.922621 seconds
Thu Jul  7 16:00:29 CST 2016
 16:01:22 up 11 min,  1 user,  load average: 0.00, 0.00, 0.00


Sat Jan  1 23:29:17 2000  -0.063191 seconds
Thu Jul  7 17:00:27 CST 2016
 17:00:38 up  1:10,  1 user,  load average: 0.00, 0.00, 0.00






good commit abc6a0f4b1828:

x86 tsc_msr: Add Airmont reference clock values

Sun Jan  2 16:59:35 2000  -0.703813 seconds
Fri Jul  8 10:30:41 CST 2016
 10:30:45 up 23 min,  1 user,  load average: 0.00, 0.00, 0.00


Sun Jan  2 18:02:22 2000  -0.547539 seconds
Fri Jul  8 11:33:28 CST 2016
 11:33:33 up  1:26,  1 user,  load average: 0.01, 0.01, 0.00



1 0
原创粉丝点击