Skip to content

Instantly share code, notes, and snippets.

@jigpu
Created September 13, 2017 21:54
Show Gist options
  • Select an option

  • Save jigpu/126d22e5fbb977b83fbc16f82bcace0a to your computer and use it in GitHub Desktop.

Select an option

Save jigpu/126d22e5fbb977b83fbc16f82bcace0a to your computer and use it in GitHub Desktop.
Repeatedly loads and unloads the 'wacom' kernel module to find transient bugs
#!/bin/bash
rsleep () { sleep $(awk -vM=$1 -vN=4 'BEGIN{"od -N"N" -tu"N" -A none /dev/urandom"|getline;print M*$0/(2^(8*N)-1)}'); }
WAIT=2
while :; do
rsleep $WAIT
echo -n .
rmmod wacom
echo -n v
rsleep $WAIT
echo -n .
modprobe wacom
echo -n ^
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment