Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into...
[qemu.git] / tests / migration / initrd-stress.sh
1 #!/bin/sh
2
3 INITRD="$1"
4 STRESS="$2"
5
6 INITRD_DIR=$(mktemp -d -p '' "initrd-stress.XXXXXX")
7 trap 'rm -rf $INITRD_DIR' EXIT
8
9 cp "$STRESS" "$INITRD_DIR/init"
10 (cd "$INITRD_DIR" && (find | cpio --quiet -o -H newc | gzip -9)) > "$INITRD"