__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!/bin/bash # SPDX-License-Identifier: GPL-2.0+ # # Transform a qemu-cmd file to allow reuse. # # Usage: kvm-transform.sh bzImage console.log jitter_dir seconds [ bootargs ] < qemu-cmd-in > qemu-cmd-out # # bzImage: Kernel and initrd from the same prior kvm.sh run. # console.log: File into which to place console output. # jitter_dir: Jitter directory for TORTURE_JITTER_START and # TORTURE_JITTER_STOP environment variables. # seconds: Run duaration for *.shutdown_secs module parameter. # bootargs: New kernel boot parameters. Beware of Robert Tables. # # The original qemu-cmd file is provided on standard input. # The transformed qemu-cmd file is on standard output. # The transformation assumes that the qemu command is confined to a # single line. It also assumes no whitespace in filenames. # # Copyright (C) 2020 Facebook, Inc. # # Authors: Paul E. McKenney <[email protected]> T=`mktemp -d /tmp/kvm-transform.sh.XXXXXXXXXX` trap 'rm -rf $T' 0 2 image="$1" if test -z "$image" then echo Need kernel image file. exit 1 fi consolelog="$2" if test -z "$consolelog" then echo "Need console log file name." exit 1 fi jitter_dir="$3" if test -z "$jitter_dir" || ! test -d "$jitter_dir" then echo "Need valid jitter directory: '$jitter_dir'" exit 1 fi seconds="$4" if test -n "$seconds" && echo $seconds | grep -q '[^0-9]' then echo "Invalid duration, should be numeric in seconds: '$seconds'" exit 1 fi bootargs="$5" # Build awk program. echo "BEGIN {" > $T/bootarg.awk echo $bootargs | tr -s ' ' '\012' | awk -v dq='"' '/./ { print "\tbootarg[" NR "] = " dq $1 dq ";" }' >> $T/bootarg.awk echo $bootargs | tr -s ' ' '\012' | sed -e 's/=.*$//' | awk -v dq='"' '/./ { print "\tbootpar[" NR "] = " dq $1 dq ";" }' >> $T/bootarg.awk cat >> $T/bootarg.awk << '___EOF___' } /^# seconds=/ { if (seconds == "") print $0; else print "# seconds=" seconds; next; } /^# TORTURE_JITTER_START=/ { print "# TORTURE_JITTER_START=\". jitterstart.sh " $4 " " jitter_dir " " $6 " " $7; next; } /^# TORTURE_JITTER_STOP=/ { print "# TORTURE_JITTER_STOP=\". jitterstop.sh " " " jitter_dir " " $5; next; } /^#/ { print $0; next; } { line = ""; for (i = 1; i <= NF; i++) { if (line == "") { line = $i; } else { line = line " " $i; } if ($i == "-serial") { i++; line = line " file:" consolelog; } else if ($i == "-kernel") { i++; line = line " " image; } else if ($i == "-append") { for (i++; i <= NF; i++) { arg = $i; lq = ""; rq = ""; if ("" seconds != "" && $i ~ /\.shutdown_secs=[0-9]*$/) sub(/[0-9]*$/, seconds, arg); if (arg ~ /^"/) { lq = substr(arg, 1, 1); arg = substr(arg, 2); } if (arg ~ /"$/) { rq = substr(arg, length($i), 1); arg = substr(arg, 1, length($i) - 1); } par = arg; gsub(/=.*$/, "", par); j = 1; while (bootpar[j] != "") { if (bootpar[j] == par) { arg = ""; break; } j++; } if (line == "") line = lq arg; else line = line " " lq arg; } for (j in bootarg) line = line " " bootarg[j]; line = line rq; } } print line; } ___EOF___ awk -v image="$image" -v consolelog="$consolelog" -v jitter_dir="$jitter_dir" \ -v seconds="$seconds" -f $T/bootarg.awk
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| config2csv.sh | File | 1.81 KB | 0755 |
|
| configNR_CPUS.sh | File | 688 B | 0755 |
|
| config_override.sh | File | 823 B | 0755 |
|
| configcheck.sh | File | 1.05 KB | 0755 |
|
| configinit.sh | File | 1.29 KB | 0755 |
|
| console-badness.sh | File | 798 B | 0755 |
|
| cpus2use.sh | File | 829 B | 0755 |
|
| functions.sh | File | 7.97 KB | 0755 |
|
| jitter.sh | File | 2.19 KB | 0755 |
|
| jitterstart.sh | File | 994 B | 0644 |
|
| jitterstop.sh | File | 520 B | 0644 |
|
| kcsan-collapse.sh | File | 484 B | 0755 |
|
| kvm-again.sh | File | 4.83 KB | 0755 |
|
| kvm-assign-cpus.sh | File | 1.97 KB | 0755 |
|
| kvm-build.sh | File | 1.3 KB | 0755 |
|
| kvm-check-branches.sh | File | 3.23 KB | 0755 |
|
| kvm-end-run-stats.sh | File | 1.09 KB | 0755 |
|
| kvm-find-errors.sh | File | 1.94 KB | 0755 |
|
| kvm-get-cpus-script.sh | File | 2.27 KB | 0755 |
|
| kvm-recheck-lock.sh | File | 884 B | 0755 |
|
| kvm-recheck-rcu.sh | File | 2.09 KB | 0755 |
|
| kvm-recheck-rcuscale-ftrace.sh | File | 2.62 KB | 0755 |
|
| kvm-recheck-rcuscale.sh | File | 2.03 KB | 0755 |
|
| kvm-recheck-refscale.sh | File | 1.53 KB | 0755 |
|
| kvm-recheck-scf.sh | File | 930 B | 0755 |
|
| kvm-recheck.sh | File | 3.61 KB | 0755 |
|
| kvm-remote-noreap.sh | File | 629 B | 0755 |
|
| kvm-remote.sh | File | 8.42 KB | 0755 |
|
| kvm-test-1-run-batch.sh | File | 2.64 KB | 0755 |
|
| kvm-test-1-run-qemu.sh | File | 5.28 KB | 0755 |
|
| kvm-test-1-run.sh | File | 8.64 KB | 0755 |
|
| kvm-transform.sh | File | 3.19 KB | 0755 |
|
| kvm.sh | File | 19.36 KB | 0755 |
|
| mkinitrd.sh | File | 2.27 KB | 0755 |
|
| parse-build.sh | File | 1.1 KB | 0755 |
|
| parse-console.sh | File | 4.35 KB | 0755 |
|
| srcu_lockdep.sh | File | 1.77 KB | 0755 |
|
| torture.sh | File | 23.21 KB | 0755 |
|