diff --git a/bin/f3fulltest b/bin/f3fulltest new file mode 100755 index 0000000..057cccf --- /dev/null +++ b/bin/f3fulltest @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +# This script assumes that the specified block device can be completely wiped + + +# exit when any command fails +set -e + +disk=$1 +mp=$(mktemp -d) + +# f3probe the block device for counterfeit flash memory +f3probe --destructive --time-ops $disk + +# f3write and f3read need a mounted fs +mkfs.ext4 -D -F -F $disk + +mount $disk $mp + +f3write $mp + +sync + +f3read $mp + +umount $mp