The commit add shell script ofr regression testing function which will generate p w c report file from the trace fileseperately and compare them with the pre-loaded ones
usage: reg_check.sh <PLAT> eg: reg_check.sh juno --- test/juno/juno-c.out | 40 +++++ test/juno/juno-p.out | 41 ++++++ test/juno/juno-w.out | 10 ++ test/juno/juno.trace | 401 ++++++++++++++++++++++++++++++++++++++++++++++++++ test/reg_check.sh | 37 +++++ test/tests | 10 ++ 6 files changed, 539 insertions(+) create mode 100644 test/juno/juno-c.out create mode 100644 test/juno/juno-p.out create mode 100644 test/juno/juno-w.out create mode 100644 test/juno/juno.trace create mode 100755 test/reg_check.sh create mode 100644 test/tests
diff --git a/test/juno/juno-c.out b/test/juno/juno-c.out new file mode 100644 index 0000000..d4d7db2 --- /dev/null +++ b/test/juno/juno-c.out @@ -0,0 +1,40 @@ +-------------------------------------------------------------------------------- +| C-state | min | max | avg | total | hits | over | under | +-------------------------------------------------------------------------------- +| clusterA | +-------------------------------------------------------------------------------- +| cpu-sleep-0 | 8.08ms | 8.08ms | 8.08ms | 8.08ms | 1 | 0 | 0 | +| cluster-sleep-0 | 478us | 994.46ms | 497.47ms | 994.93ms | 2 | 0 | 0 | +-------------------------------------------------------------------------------- +| cpu1 | +-------------------------------------------------------------------------------- +| cluster-sleep-0 | 1.00s | 1.00s | 1.00s | 1.00s | 1 | 0 | 0 | +-------------------------------------------------------------------------------- +| cpu2 | +-------------------------------------------------------------------------------- +| cpu-sleep-0 | 8.08ms | 8.08ms | 8.08ms | 8.08ms | 1 | 0 | 0 | +| cluster-sleep-0 | 995.04ms | 995.04ms | 995.04ms | 995.04ms | 1 | 0 | 0 | +-------------------------------------------------------------------------------- +| clusterB | +-------------------------------------------------------------------------------- +| cpu-sleep-0 | 88us | 5.30ms | 3.54ms | 14.16ms | 4 | 0 | 0 | +| cluster-sleep-0 | 221us | 101.27ms | 18.94ms | 984.69ms | 52 | 0 | 0 | +-------------------------------------------------------------------------------- +| cpu0 | +-------------------------------------------------------------------------------- +| cpu-sleep-0 | 4.26ms | 5.30ms | 4.75ms | 14.24ms | 3 | 0 | 0 | +| cluster-sleep-0 | 321us | 101.27ms | 24.65ms | 985.86ms | 40 | 0 | 0 | +-------------------------------------------------------------------------------- +| cpu3 | +-------------------------------------------------------------------------------- +| cluster-sleep-0 | 481us | 523.07ms | 111.35ms | 1.00s | 9 | 0 | 0 | +-------------------------------------------------------------------------------- +| cpu4 | +-------------------------------------------------------------------------------- +| cluster-sleep-0 | 7.41ms | 515.70ms | 250.77ms | 1.00s | 4 | 0 | 0 | +-------------------------------------------------------------------------------- +| cpu5 | +-------------------------------------------------------------------------------- +| cluster-sleep-0 | 2.60ms | 521.31ms | 334.39ms | 1.00s | 3 | 0 | 0 | +-------------------------------------------------------------------------------- + diff --git a/test/juno/juno-p.out b/test/juno/juno-p.out new file mode 100644 index 0000000..54b020b --- /dev/null +++ b/test/juno/juno-p.out @@ -0,0 +1,41 @@ +---------------------------------------------------------------- +| P-state | min | max | avg | total | hits | +---------------------------------------------------------------- +| clusterA | +---------------------------------------------------------------- +| 450.00MHz | 10us | 1.88ms | 524us | 2.10ms | 4 | +---------------------------------------------------------------- +| cpu1 | +---------------------------------------------------------------- +| 450.00MHz | 101us | 1.30ms | 699us | 1.40ms | 2 | +---------------------------------------------------------------- +| cpu2 | +---------------------------------------------------------------- +| 450.00MHz | 10us | 1.88ms | 665us | 1.99ms | 3 | +---------------------------------------------------------------- +| clusterB | +---------------------------------------------------------------- +| 450.00MHz | 12us | 404us | 65us | 1.70ms | 26 | +| 575.00MHz | 6us | 2.96ms | 195us | 6.06ms | 31 | +---------------------------------------------------------------- +| cpu0 | +---------------------------------------------------------------- +| 450.00MHz | 12us | 266us | 46us | 962us | 21 | +| 575.00MHz | 6us | 922us | 129us | 3.09ms | 24 | +---------------------------------------------------------------- +| cpu3 | +---------------------------------------------------------------- +| 450.00MHz | 77us | 135us | 106us | 212us | 2 | +| 575.00MHz | 77us | 2.22ms | 392us | 3.13ms | 8 | +---------------------------------------------------------------- +| cpu4 | +---------------------------------------------------------------- +| 450.00MHz | 19us | 154us | 80us | 239us | 3 | +| 575.00MHz | 16us | 2.59ms | 1.30ms | 2.60ms | 2 | +---------------------------------------------------------------- +| cpu5 | +---------------------------------------------------------------- +| 450.00MHz | 19us | 404us | 157us | 470us | 3 | +| 575.00MHz | 2.96ms | 2.96ms | 2.96ms | 2.96ms | 1 | +---------------------------------------------------------------- + diff --git a/test/juno/juno-w.out b/test/juno/juno-w.out new file mode 100644 index 0000000..9e9c136 --- /dev/null +++ b/test/juno/juno-w.out @@ -0,0 +1,10 @@ +------------------------------------------------------- +| IRQ | Name | Count | early | late | +------------------------------------------------------- +| cpu0 | +------------------------------------------------------- +| 92 | arch_mem_timer | 33 | 0 | 0 | +| 68 | arm_mhu | 2 | 0 | 0 | +| 67 | arm_mhu | 1 | 0 | 0 | +------------------------------------------------------- + diff --git a/test/juno/juno.trace b/test/juno/juno.trace new file mode 100644 index 0000000..6b22d18 --- /dev/null +++ b/test/juno/juno.trace @@ -0,0 +1,401 @@ +idlestat version = 0.5 +cpus=6 +clusterA: + core0 + cpu1 + core1 + cpu2 +clusterB: + core0 + cpu0 + core1 + cpu3 + core2 + cpu4 + core3 + cpu5 +cpuid 0: + WFI + -1 + cpu-sleep-0 + -1 + cluster-sleep-0 + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 +cpuid 1: + WFI + -1 + cpu-sleep-0 + -1 + cluster-sleep-0 + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 +cpuid 2: + WFI + -1 + cpu-sleep-0 + -1 + cluster-sleep-0 + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 +cpuid 3: + WFI + -1 + cpu-sleep-0 + -1 + cluster-sleep-0 + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 +cpuid 4: + WFI + -1 + cpu-sleep-0 + -1 + cluster-sleep-0 + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 +cpuid 5: + WFI + -1 + cpu-sleep-0 + -1 + cluster-sleep-0 + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + (null) + -1 + idlestat-26701 [000] .... 532764.758856: cpu_frequency: state=575000 cpu_id=0 + idlestat-26701 [001] .... 532764.758856: cpu_frequency: state=450000 cpu_id=1 + idlestat-26701 [002] .... 532764.758856: cpu_frequency: state=450000 cpu_id=2 + idlestat-26701 [003] .... 532764.758856: cpu_frequency: state=575000 cpu_id=3 + idlestat-26701 [004] .... 532764.758856: cpu_frequency: state=575000 cpu_id=4 + idlestat-26701 [005] .... 532764.758856: cpu_frequency: state=575000 cpu_id=5 + <idle>-0 [000] d... 532764.759778: cpu_idle: state=2 cpu_id=0 + <idle>-0 [001] .N.. 532764.760055: cpu_idle: state=4294967295 cpu_id=1 + <idle>-0 [001] d... 532764.760153: cpu_idle: state=2 cpu_id=1 + <idle>-0 [002] .N.. 532764.760634: cpu_idle: state=4294967295 cpu_id=2 + <idle>-0 [002] d... 532764.760739: cpu_idle: state=1 cpu_id=2 + <idle>-0 [003] .N.. 532764.760963: cpu_idle: state=4294967295 cpu_id=3 + <idle>-0 [003] d... 532764.761077: cpu_idle: state=2 cpu_id=3 + <idle>-0 [004] .N.. 532764.761316: cpu_idle: state=4294967295 cpu_id=4 + <idle>-0 [004] d... 532764.761442: cpu_idle: state=2 cpu_id=4 + <idle>-0 [005] .N.. 532764.761677: cpu_idle: state=4294967295 cpu_id=5 + <idle>-0 [005] d... 532764.761818: cpu_idle: state=2 cpu_id=5 + <idle>-0 [000] d.h. 532764.768460: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532764.768523: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532764.768534: cpu_idle: state=2 cpu_id=0 + <idle>-0 [002] .... 532764.768820: cpu_idle: state=4294967295 cpu_id=2 + <idle>-0 [002] d... 532764.768830: cpu_idle: state=2 cpu_id=2 + <idle>-0 [004] .... 532764.768849: cpu_idle: state=4294967295 cpu_id=4 + <idle>-0 [004] d... 532764.768865: cpu_idle: state=2 cpu_id=4 + <idle>-0 [000] d.h. 532764.778461: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .N.. 532764.778549: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532764.778609: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532764.788460: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .N.. 532764.788549: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532764.788606: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532764.798461: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532764.798526: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532764.798537: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532764.808461: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .N.. 532764.808540: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532764.808603: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532764.818461: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532764.818538: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532764.818549: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532764.828113: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532764.828164: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532764.828174: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532764.929380: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532764.929431: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532764.929441: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.030648: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.030697: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.030709: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.131914: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.131962: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.131973: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.218474: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .N.. 532765.218563: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [003] .N.. 532765.218744: cpu_idle: state=4294967295 cpu_id=3 + <idle>-0 [000] d... 532765.218815: cpu_idle: state=2 cpu_id=0 + <idle>-0 [003] d... 532765.218915: cpu_idle: state=2 cpu_id=3 + <idle>-0 [000] .N.. 532765.219136: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.219306: cpu_idle: state=2 cpu_id=0 + <idle>-0 [003] .N.. 532765.219546: cpu_idle: state=4294967295 cpu_id=3 + <idle>-0 [003] d... 532765.219692: cpu_idle: state=2 cpu_id=3 + <idle>-0 [000] .N.. 532765.219929: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.220039: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.220493: irq_handler_entry: irq=68 name=arm_mhu + <idle>-0 [000] .N.. 532765.220528: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.220620: cpu_idle: state=2 cpu_id=0 + <idle>-0 [003] .N.. 532765.220868: cpu_idle: state=4294967295 cpu_id=3 + <idle>-0 [003] d... 532765.220978: cpu_idle: state=2 cpu_id=3 + <idle>-0 [000] .N.. 532765.221224: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.221377: cpu_idle: state=2 cpu_id=0 + <idle>-0 [003] .N.. 532765.221605: cpu_idle: state=4294967295 cpu_id=3 + <idle>-0 [003] d... 532765.221749: cpu_idle: state=2 cpu_id=3 + <idle>-0 [000] .N.. 532765.221993: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.222151: cpu_idle: state=2 cpu_id=0 + <idle>-0 [003] .N.. 532765.222389: cpu_idle: state=4294967295 cpu_id=3 + <idle>-0 [003] d... 532765.222539: cpu_idle: state=2 cpu_id=3 + <idle>-0 [000] .N.. 532765.222780: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.222872: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.223339: irq_handler_entry: irq=68 name=arm_mhu + <idle>-0 [000] .N.. 532765.223375: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.223453: cpu_idle: state=2 cpu_id=0 + <idle>-0 [003] .N.. 532765.223683: cpu_idle: state=4294967295 cpu_id=3 + <idle>-0 [003] d... 532765.223797: cpu_idle: state=2 cpu_id=3 + <idle>-0 [000] .N.. 532765.224043: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.224190: cpu_idle: state=1 cpu_id=0 + <idle>-0 [003] .N.. 532765.224278: cpu_idle: state=4294967295 cpu_id=3 + <idle>-0 [003] d... 532765.224355: cpu_idle: state=2 cpu_id=3 + <idle>-0 [000] d.h. 532765.228402: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.228450: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.228456: cpu_idle: state=1 cpu_id=0 + <idle>-0 [000] d.h. 532765.233109: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.233132: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.233139: cpu_idle: state=1 cpu_id=0 + <idle>-0 [000] d.h. 532765.238396: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .N.. 532765.238444: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.238671: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.240168: irq_handler_entry: irq=67 name=arm_mhu + <idle>-0 [000] .N.. 532765.240208: cpu_idle: state=4294967295 cpu_id=0 + irq/67-arm_mhu-26712 [000] d.h. 532765.240553: irq_handler_entry: irq=67 name=arm_mhu + kworker/0:0-27133 [000] .... 532765.240628: cpu_frequency: state=450000 cpu_id=0 + kworker/0:0-27133 [000] .... 532765.240635: cpu_frequency: state=450000 cpu_id=3 + kworker/0:0-27133 [000] .... 532765.240638: cpu_frequency: state=450000 cpu_id=4 + kworker/0:0-27133 [000] .... 532765.240641: cpu_frequency: state=450000 cpu_id=5 + <idle>-0 [000] d... 532765.240701: cpu_idle: state=2 cpu_id=0 + <idle>-0 [003] .N.. 532765.241058: cpu_idle: state=4294967295 cpu_id=3 + <idle>-0 [004] .N.. 532765.241069: cpu_idle: state=4294967295 cpu_id=4 + <idle>-0 [005] .N.. 532765.241093: cpu_idle: state=4294967295 cpu_id=5 + <idle>-0 [003] d... 532765.241135: cpu_idle: state=2 cpu_id=3 + <idle>-0 [004] d... 532765.241135: cpu_idle: state=2 cpu_id=4 + <idle>-0 [005] d... 532765.241140: cpu_idle: state=2 cpu_id=5 + <idle>-0 [000] d.h. 532765.248468: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .N.. 532765.248568: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.248634: cpu_idle: state=2 cpu_id=0 + <idle>-0 [004] .... 532765.248916: cpu_idle: state=4294967295 cpu_id=4 + <idle>-0 [004] d... 532765.248935: cpu_idle: state=2 cpu_id=4 + <idle>-0 [000] d.h. 532765.258469: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.258560: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.258574: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.268469: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .N.. 532765.268557: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.268635: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.278468: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.278567: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.278580: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.288468: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.288538: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.288551: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.298469: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .N.. 532765.298558: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.298636: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.308469: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.308566: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.308581: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.318468: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .N.. 532765.318562: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.318641: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.328468: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .N.. 532765.328558: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.328634: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.334366: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.334420: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.334432: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.338468: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.338557: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.338571: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.348469: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.348537: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.348551: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.358469: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .N.. 532765.358556: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.358626: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.368469: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.368562: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.368576: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.435646: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.435705: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.435718: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.536925: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.536983: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.536997: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.638203: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.638260: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.638274: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.739486: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.739543: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.739556: cpu_idle: state=2 cpu_id=0 + <idle>-0 [000] d.h. 532765.762073: irq_handler_entry: irq=92 name=arch_mem_timer + <idle>-0 [000] .... 532765.762117: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.762130: cpu_idle: state=2 cpu_id=0 + <idle>-0 [005] .... 532765.762454: cpu_idle: state=4294967295 cpu_id=5 + <idle>-0 [005] d... 532765.762473: cpu_idle: state=2 cpu_id=5 + <idle>-0 [000] .N.. 532765.762747: cpu_idle: state=4294967295 cpu_id=0 + <idle>-0 [000] d... 532765.763013: cpu_idle: state=2 cpu_id=0 + <idle>-0 [001] .N.. 532765.763286: cpu_idle: state=4294967295 cpu_id=1 + <idle>-0 [001] d... 532765.763387: cpu_idle: state=2 cpu_id=1 + <idle>-0 [002] .N.. 532765.763865: cpu_idle: state=4294967295 cpu_id=2 + <idle>-0 [002] d... 532765.763966: cpu_idle: state=2 cpu_id=2 + <idle>-0 [003] .N.. 532765.764204: cpu_idle: state=4294967295 cpu_id=3 + <idle>-0 [003] d... 532765.764339: cpu_idle: state=2 cpu_id=3 + <idle>-0 [004] .N.. 532765.764631: cpu_idle: state=4294967295 cpu_id=4 + <idle>-0 [004] d... 532765.764785: cpu_idle: state=2 cpu_id=4 + <idle>-0 [005] .N.. 532765.765069: cpu_idle: state=4294967295 cpu_id=5 + idlestat-26701 [000] .... 532765.765473: cpu_frequency: state=0 cpu_id=0 + idlestat-26701 [001] .... 532765.765473: cpu_frequency: state=0 cpu_id=1 + idlestat-26701 [002] .... 532765.765473: cpu_frequency: state=0 cpu_id=2 + idlestat-26701 [003] .... 532765.765473: cpu_frequency: state=0 cpu_id=3 + idlestat-26701 [004] .... 532765.765473: cpu_frequency: state=0 cpu_id=4 + idlestat-26701 [005] .... 532765.765473: cpu_frequency: state=0 cpu_id=5 diff --git a/test/reg_check.sh b/test/reg_check.sh new file mode 100755 index 0000000..7c5d8ca --- /dev/null +++ b/test/reg_check.sh @@ -0,0 +1,37 @@ +#!/bin/sh +regression_test(){ + TEST_DEF_FILES=$(find tests -type f -print0|xargs -0 grep -l "^#TESTS:") + echo $TEST_DEF_FILES + sed -e "s/foo/$PLAT/g" $TEST_DEF_FILES > ./tmp + for TD_FILE in ./tmp + do + echo "start testing...$TD_FILE" + TESTS_NAMES=$(grep "^#TESTS:" $TD_FILE|cut -f 2 -d:) + echo "tests are $TESTS_NAMES" + for TESTNAME in $TESTS_NAMES + do + CMDLINE=$(grep "^#${TESTNAME}-CMDLINE" $TD_FILE | cut -f 2- -d:) + COMPARE=$(grep "^#${TESTNAME}-COMPARE" $TD_FILE | cut -f 2- -d:) + DELETE_LIST=$(grep "^#${TESTNAME}-DELETE" $TD_FILE | cut -f 2- -d:) + # Run test + if ! $CMDLINE ; then + echo "import function have regression!" + rm -f $DELETE_LIST + exit 1 + else + echo "$CMDLINE test success!" + fi + if ! diff -u $COMPARE ; then + echo "result compare different, please check!" + rm -f $DELETE_LIST + exit 1 + else + echo "result of $COMPARE is ok!" + fi + rm -f $DELETE_LIST + done + done + rm ./tmp +} +PLAT=$1 +regression_test diff --git a/test/tests b/test/tests new file mode 100644 index 0000000..d011eec --- /dev/null +++ b/test/tests @@ -0,0 +1,10 @@ +#TESTS: pTEST wTEST cTEST +#pTEST-CMDLINE: ../idlestat --import -f foo/foo.trace -p -o p-out +#wTEST-CMDLINE: ../idlestat --import -f foo/foo.trace -w -o w-out +#cTEST-CMDLINE: ../idlestat --import -f foo/foo.trace -c -o c-out +#pTEST-COMPARE: p-out foo/foo-p.out +#wTEST-COMPARE: w-out foo/foo-w.out +#cTEST-COMPARE: c-out foo/foo-c.out +#pTEST-DELETE: p-out +#wTEST-DELETE: w-out +#cTEST-DELETE: c-out