Skip to content

Instantly share code, notes, and snippets.

@alex-pat
Created March 12, 2018 14:56
Show Gist options
  • Save alex-pat/4c2fd9bc02b741e74fd7943fcc09cccd to your computer and use it in GitHub Desktop.
Save alex-pat/4c2fd9bc02b741e74fd7943fcc09cccd to your computer and use it in GitHub Desktop.
update tests in image
#!/bin/bash
IMG=qemu-image.img
SRC=~/linux-cc
MNTPOINT=mnt
sudo mount "$IMG" -o loop "$MNTPOINT" || exit 1
sudo mkdir -p "$MNTPOINT/root/tests" || exit 1
for i in \
pidmap/pidmap \
fdmap/fdmap_test \
pidfdinfo/pidfdinfo \
; do
echo -n $(basename "$i")...
sudo cp "$SRC/tools/testing/selftests/$i" "$MNTPOINT/root/tests/$(basename "$i")" || exit 1
echo OK
done
sudo umount "$MNTPOINT" || exit 1
echo Done.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment