mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-29 04:54:27 +01:00
rr test
This commit is contained in:
2
qemu
2
qemu
Submodule qemu updated: 8dbff6d372...08e173f294
24
rec
Executable file
24
rec
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
cmd="\
|
||||||
|
time \
|
||||||
|
./out/x86_64/buildroot/host/usr/bin/qemu-system-x86_64 \
|
||||||
|
-M pc \
|
||||||
|
-append 'root=/dev/sda console=ttyS0 nokaslr printk.time=y - lkmc_eval=\"/rand_check.out;/sbin/ifup -a;wget -S google.com;/poweroff.out;\"' \
|
||||||
|
-kernel 'out/x86_64/buildroot/images/bzImage' \
|
||||||
|
-nographic \
|
||||||
|
\
|
||||||
|
-drive file=out/x86_64/buildroot/images/rootfs.ext2.qcow2,if=none,id=img-direct,format=qcow2 \
|
||||||
|
-drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay \
|
||||||
|
-device ide-hd,drive=img-blkreplay \
|
||||||
|
\
|
||||||
|
-netdev user,id=net1 \
|
||||||
|
-device rtl8139,netdev=net1 \
|
||||||
|
-object filter-replay,id=replay,netdev=net1 \
|
||||||
|
"
|
||||||
|
echo "$cmd"
|
||||||
|
#eval "$cmd -icount 'shift=7,rr=record,rrfile=replay.bin'"
|
||||||
|
# Different than previous.
|
||||||
|
eval "$cmd -icount 'shift=7,rr=record,rrfile=replay.bin'"
|
||||||
|
# Same as previous.
|
||||||
|
eval "$cmd -icount 'shift=7,rr=replay,rrfile=replay.bin'"
|
||||||
|
#eval "$cmd -icount 'shift=7,rr=replay,rrfile=replay.bin' -S -s"
|
||||||
25
recaarch64
Executable file
25
recaarch64
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
# TODO has not network but replays fine
|
||||||
|
# -device rtl8139,netdev=net1 \
|
||||||
|
|
||||||
|
# Has network, but replay hangs.
|
||||||
|
#-device virtio-net-device,netdev=net1 \
|
||||||
|
|
||||||
|
cmd="\
|
||||||
|
time \
|
||||||
|
./buildroot/output.aarch64~/host/usr/bin/qemu-system-aarch64 \
|
||||||
|
-M virt \
|
||||||
|
-cpu cortex-a57 \
|
||||||
|
-append 'root=/dev/sda nokaslr norandmaps printk.devkmsg=on printk.time=y - lkmc_eval=\"/rand_check.out;wget -S google.com;/poweroff.out;\"' \
|
||||||
|
-kernel ./buildroot/output.aarch64~/images/Image \
|
||||||
|
-nographic \
|
||||||
|
\
|
||||||
|
-device virtio-net-device,netdev=net1 \
|
||||||
|
-netdev user,id=net1 \
|
||||||
|
-object filter-replay,id=replay,netdev=net1 \
|
||||||
|
"
|
||||||
|
echo "$cmd"
|
||||||
|
eval "$cmd -icount 'shift=7,rr=record,rrfile=replay.bin'"
|
||||||
|
eval "$cmd -icount 'shift=7,rr=replay,rrfile=replay.bin'"
|
||||||
28
recarm
Executable file
28
recarm
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
# TODO try to use disk image instead of initrd, fails if I add any of:
|
||||||
|
#-device lsi,id=scsi0
|
||||||
|
#-device scsi-hd,drive=img-blkreplay
|
||||||
|
# Without either, super slow:
|
||||||
|
#-drive file=./buildroot/output.arm~/images/rootfs.ext2,if=scsi,id=img-direct,format=raw \
|
||||||
|
#-drive driver=blkreplay,if=none,image=img-direct,id=img-blkreplay \
|
||||||
|
|
||||||
|
cmd="\
|
||||||
|
time \
|
||||||
|
./buildroot/output.arm~/host/usr/bin/qemu-system-arm \
|
||||||
|
-M versatilepb \
|
||||||
|
-append 'root=/dev/sda nokaslr norandmaps printk.devkmsg=on printk.time=y - lkmc_eval=\"/rand_check.out;wget -S google.com;/poweroff.out;\"' \
|
||||||
|
-kernel ./buildroot/output.arm~/images/zImage \
|
||||||
|
-dtb ./buildroot/output.arm~/images/versatile-pb.dtb \
|
||||||
|
-serial stdio \
|
||||||
|
\
|
||||||
|
-initrd ./buildroot/output.arm~/images/rootfs.cpio \
|
||||||
|
\
|
||||||
|
-netdev user,id=net1 \
|
||||||
|
-device rtl8139,netdev=net1 \
|
||||||
|
-object filter-replay,id=replay,netdev=net1 \
|
||||||
|
"
|
||||||
|
echo "$cmd"
|
||||||
|
eval "$cmd -icount 'shift=7,rr=record,rrfile=replay.bin'"
|
||||||
|
eval "$cmd -icount 'shift=7,rr=replay,rrfile=replay.bin'"
|
||||||
1
run
1
run
@@ -208,7 +208,6 @@ ${qemu_common} \
|
|||||||
-M pc \
|
-M pc \
|
||||||
-append '${root} nopat ${extra_append}' \
|
-append '${root} nopat ${extra_append}' \
|
||||||
-device edu \
|
-device edu \
|
||||||
-device lkmc_pci_min \
|
|
||||||
-device virtio-net-pci,netdev=net0 \
|
-device virtio-net-pci,netdev=net0 \
|
||||||
-kernel '${images_dir}/bzImage' \
|
-kernel '${images_dir}/bzImage' \
|
||||||
${extra_flags} \
|
${extra_flags} \
|
||||||
|
|||||||
Reference in New Issue
Block a user