]> xenbits.xensource.com Git - xentesttools/bootstrap.git/commitdiff
contrib: Add test-scripts and a README explaing how to use it.
authorKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 2 May 2012 15:11:00 +0000 (11:11 -0400)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 2 May 2012 15:11:22 +0000 (11:11 -0400)
27 files changed:
contrib/README [new file with mode: 0644]
contrib/create_csv.sh [new file with mode: 0755]
contrib/create_guest_configs.sh [new file with mode: 0755]
contrib/result_wget.sh [new file with mode: 0755]
contrib/stanza-pv.cfg [new file with mode: 0644]
contrib/stanza.cfg [new file with mode: 0644]
contrib/start.sh [new file with mode: 0755]
contrib/tiny1 [new file with mode: 0644]
contrib/tiny10 [new file with mode: 0644]
contrib/tiny11 [new file with mode: 0644]
contrib/tiny12 [new file with mode: 0644]
contrib/tiny13 [new file with mode: 0644]
contrib/tiny14 [new file with mode: 0644]
contrib/tiny15 [new file with mode: 0644]
contrib/tiny16 [new file with mode: 0644]
contrib/tiny17 [new file with mode: 0644]
contrib/tiny18 [new file with mode: 0644]
contrib/tiny19 [new file with mode: 0644]
contrib/tiny2 [new file with mode: 0644]
contrib/tiny20 [new file with mode: 0644]
contrib/tiny3 [new file with mode: 0644]
contrib/tiny4 [new file with mode: 0644]
contrib/tiny5 [new file with mode: 0644]
contrib/tiny6 [new file with mode: 0644]
contrib/tiny7 [new file with mode: 0644]
contrib/tiny8 [new file with mode: 0644]
contrib/tiny9 [new file with mode: 0644]

diff --git a/contrib/README b/contrib/README
new file mode 100644 (file)
index 0000000..d9293ee
--- /dev/null
@@ -0,0 +1,38 @@
+
+1). Edit stanza.cfg with the appropiate guest options.
+2). Run create_guest_configs.sh to create them.
+
+3). Create  ../root_image/debugspace/init.pre_custom with something
+along these lines for your dom0 build:
+
+#!/bin/bash
+
+FILE=/etc/sysconfig/network-scripts/ifcfg-xenbr0
+
+echo "DEVICE=xenbr0" > $FILE
+echo "TYPE=Bridge" >> $FILE
+echo "IPADDR=10.0.0.200" >> $FILE
+echo "NETMASK=255.255.255.0" >> $FILE
+echo "ONBOOT=yes" >> $FILE
+echo "DELAY=0" >> $FILE
+echo "USERCTL=no" >> $FILE
+echo "NM_CONTROLLED=no" >> $FILE
+
+which will automatically create the xenbr0 at startup.
+
+4). Create your PXE for dom0, run: make xtt-iso
+
+5). Copy the output (dist/root-image.pxe to your PXE directory or
+    dist/root_image.iso on your CD, etc).
+
+6). Boot up your machine..
+
+7). On the machine, verify that 'xenbr0' is up, and then start
+    the guests:
+
+       ./start.sh 20
+   (to start 20 guests)
+
+8). Once they are up and you can ping them: ping 10.0.0.1, ping 10.0.0.20
+   run the 'create_csv.sh'. The output will be in /tmp/result.csv
+   of the aggregate netperf results between the guests.
diff --git a/contrib/create_csv.sh b/contrib/create_csv.sh
new file mode 100755 (executable)
index 0000000..3708219
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+FILE=/tmp/result.csv
+echo "Guests, Sum, Avg, Min, Max" >$FILE
+for i in `seq $1`
+do
+   ./result_wget.sh ${i} >> $FILE
+done
+cat /tmp/result.csv
+cat /tmp/result.csv  | awk ' {print $2}' | sed s/,//
diff --git a/contrib/create_guest_configs.sh b/contrib/create_guest_configs.sh
new file mode 100755 (executable)
index 0000000..4a2f838
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+rm tiny*
+
+for i in `seq $1`
+do
+  cp stanza.cfg tiny${i}
+  #echo "memory = '$2'" >> tiny${i}
+  echo "name = 'tiny${i}'" >> tiny${i}
+  #j=$[i+1]
+  #printf "vif = [\'type=netfront,mac=00:16:3e:09:%02x:%02x,bridge=xenbr%d\']\n" $[(j&1)+10] $[j>>1] $[j&1] >> tiny${i}
+  printf "vif = [\'type=netfront,mac=00:16:3e:09:0a:%02x,bridge=xenbr0\']\n"  $[i]  >> tiny${i}
+done
+
diff --git a/contrib/result_wget.sh b/contrib/result_wget.sh
new file mode 100755 (executable)
index 0000000..8822b2a
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+GUESTS=$1
+
+SOURCE=(0 1 3 5 7 9 11 13 15 17 19)
+TARGET=(0 2 4 6 8 10 12 14 16 18 20)
+
+rm /tmp/netrr.*
+
+for i in `seq $GUESTS`
+do
+ #echo "$i:Asking ${SOURCE[$i]} to poke ${TARGET[$i]}"
+ wget -q -O /tmp/netrr.$i http://10.0.0.${SOURCE[$i]}/cgi-bin/netperf?H=10.0.0.${TARGET[$i]}\;L=60 &
+done
+
+wait 
+for i in `seq $GUESTS`; 
+do
+ tail -n +7 /tmp/netrr.${i} | awk '{print $5}' | head -n 1  
+done | sort -n > /tmp/summary
+
+SUM=$(awk '{t += $1 } END {print t}' < /tmp/summary)
+AVG=$(awk '{t += $1; l++ } END {print t/l}' < /tmp/summary)
+MIN=$(head -n 1 < /tmp/summary)
+MAX=$(tail -n 1 < /tmp/summary)
+#MED=$(tail -n $[$1/2] < /tmp/summary | head -n 1)
+
+printf "%2s,%9s,%9s,%9s,%9s\n" $1 $SUM $AVG $MIN $MAX
diff --git a/contrib/stanza-pv.cfg b/contrib/stanza-pv.cfg
new file mode 100644 (file)
index 0000000..8846c86
--- /dev/null
@@ -0,0 +1,7 @@
+extra="console=hvc0 test=netstatic"
+kernel="/mnt/lab/10gb/vmlinuz"
+ramdisk="/mnt/lab/10gb/initramfs.cpio.gz"
+memory=1024
+vcpus=1
+on_crash="preserve"
+vfb = [ 'vnc=1, vnclisten=0.0.0.0,vncunused=1']
diff --git a/contrib/stanza.cfg b/contrib/stanza.cfg
new file mode 100644 (file)
index 0000000..448aab7
--- /dev/null
@@ -0,0 +1,18 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
diff --git a/contrib/start.sh b/contrib/start.sh
new file mode 100755 (executable)
index 0000000..cadfd0b
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+for i in `seq $1`
+do
+  xm create ./tiny${i}
+done
diff --git a/contrib/tiny1 b/contrib/tiny1
new file mode 100644 (file)
index 0000000..a9f9dd2
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny1'
+vif = ['type=netfront,mac=00:16:3e:09:0a:01,bridge=xenbr0']
diff --git a/contrib/tiny10 b/contrib/tiny10
new file mode 100644 (file)
index 0000000..0115c43
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny10'
+vif = ['type=netfront,mac=00:16:3e:09:0a:0a,bridge=xenbr0']
diff --git a/contrib/tiny11 b/contrib/tiny11
new file mode 100644 (file)
index 0000000..133273c
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny11'
+vif = ['type=netfront,mac=00:16:3e:09:0a:0b,bridge=xenbr0']
diff --git a/contrib/tiny12 b/contrib/tiny12
new file mode 100644 (file)
index 0000000..107f035
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny12'
+vif = ['type=netfront,mac=00:16:3e:09:0a:0c,bridge=xenbr0']
diff --git a/contrib/tiny13 b/contrib/tiny13
new file mode 100644 (file)
index 0000000..4820ca0
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny13'
+vif = ['type=netfront,mac=00:16:3e:09:0a:0d,bridge=xenbr0']
diff --git a/contrib/tiny14 b/contrib/tiny14
new file mode 100644 (file)
index 0000000..4502a28
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny14'
+vif = ['type=netfront,mac=00:16:3e:09:0a:0e,bridge=xenbr0']
diff --git a/contrib/tiny15 b/contrib/tiny15
new file mode 100644 (file)
index 0000000..516bf70
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny15'
+vif = ['type=netfront,mac=00:16:3e:09:0a:0f,bridge=xenbr0']
diff --git a/contrib/tiny16 b/contrib/tiny16
new file mode 100644 (file)
index 0000000..75369c7
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny16'
+vif = ['type=netfront,mac=00:16:3e:09:0a:10,bridge=xenbr0']
diff --git a/contrib/tiny17 b/contrib/tiny17
new file mode 100644 (file)
index 0000000..eef53e4
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny17'
+vif = ['type=netfront,mac=00:16:3e:09:0a:11,bridge=xenbr0']
diff --git a/contrib/tiny18 b/contrib/tiny18
new file mode 100644 (file)
index 0000000..854905b
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny18'
+vif = ['type=netfront,mac=00:16:3e:09:0a:12,bridge=xenbr0']
diff --git a/contrib/tiny19 b/contrib/tiny19
new file mode 100644 (file)
index 0000000..fab83fb
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny19'
+vif = ['type=netfront,mac=00:16:3e:09:0a:13,bridge=xenbr0']
diff --git a/contrib/tiny2 b/contrib/tiny2
new file mode 100644 (file)
index 0000000..1acb49a
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny2'
+vif = ['type=netfront,mac=00:16:3e:09:0a:02,bridge=xenbr0']
diff --git a/contrib/tiny20 b/contrib/tiny20
new file mode 100644 (file)
index 0000000..b82f5b1
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny20'
+vif = ['type=netfront,mac=00:16:3e:09:0a:14,bridge=xenbr0']
diff --git a/contrib/tiny3 b/contrib/tiny3
new file mode 100644 (file)
index 0000000..fb780b9
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny3'
+vif = ['type=netfront,mac=00:16:3e:09:0a:03,bridge=xenbr0']
diff --git a/contrib/tiny4 b/contrib/tiny4
new file mode 100644 (file)
index 0000000..8a9b7bf
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny4'
+vif = ['type=netfront,mac=00:16:3e:09:0a:04,bridge=xenbr0']
diff --git a/contrib/tiny5 b/contrib/tiny5
new file mode 100644 (file)
index 0000000..99fa948
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny5'
+vif = ['type=netfront,mac=00:16:3e:09:0a:05,bridge=xenbr0']
diff --git a/contrib/tiny6 b/contrib/tiny6
new file mode 100644 (file)
index 0000000..1a4a251
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny6'
+vif = ['type=netfront,mac=00:16:3e:09:0a:06,bridge=xenbr0']
diff --git a/contrib/tiny7 b/contrib/tiny7
new file mode 100644 (file)
index 0000000..db3de32
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny7'
+vif = ['type=netfront,mac=00:16:3e:09:0a:07,bridge=xenbr0']
diff --git a/contrib/tiny8 b/contrib/tiny8
new file mode 100644 (file)
index 0000000..49fb074
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny8'
+vif = ['type=netfront,mac=00:16:3e:09:0a:08,bridge=xenbr0']
diff --git a/contrib/tiny9 b/contrib/tiny9
new file mode 100644 (file)
index 0000000..908f627
--- /dev/null
@@ -0,0 +1,20 @@
+hap = 1
+acpi = 1
+apic = 1
+pae = 1
+kernel = "/usr/lib/xen/boot/hvmloader"
+builder='hvm'
+memory=1024
+maxvcpus = 1
+serial='pty'
+vcpus = 1
+disk = [ 'file://root_image.iso,hdc:cdrom,r']
+boot="dn"
+#disk = [ 'file:/mnt/lab/Andrew.img,hda,r']
+vnc=2
+vnclisten="0.0.0.0"
+#usb=1
+timer_mode = 2
+
+name = 'tiny9'
+vif = ['type=netfront,mac=00:16:3e:09:0a:09,bridge=xenbr0']