sw_test.sh 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. # Creates a random Amiga ADF, writes the first three cylinders of a disk,
  3. # dumps those cylinders back, and checks against original ADF.
  4. dd if=/dev/urandom of=b.adf bs=512 count=1760
  5. disk-analyse -e 2 b.adf a.adf
  6. rm -f b.adf
  7. # Write and verify ADF, Read ADF
  8. ./gw --bt write --ecyl=2 a.adf
  9. ./gw --bt read --revs=1 --ecyl=2 b.adf
  10. disk-analyse -e 2 b.adf c.adf
  11. diff a.adf c.adf
  12. md5sum a.adf c.adf
  13. rm -f b.adf c.adf
  14. # Write SCP, Read SCP
  15. disk-analyse a.adf a.scp
  16. ./gw --bt write --ecyl=2 a.scp
  17. ./gw --bt read --revs=1 --ecyl=2 b.scp
  18. disk-analyse -e 2 b.scp b.adf
  19. diff a.adf b.adf
  20. md5sum a.adf b.adf
  21. rm -f b.adf a.scp b.scp
  22. # Write IPF, Read HFE
  23. disk-analyse a.adf a.ipf
  24. ./gw --bt write --ecyl=2 a.ipf
  25. ./gw --bt read --revs=1 --ecyl=2 b.hfe
  26. disk-analyse -e 2 b.hfe b.adf
  27. diff a.adf b.adf
  28. md5sum a.adf b.adf
  29. rm -f b.adf a.ipf b.hfe
  30. # Write HFE, Read HFE
  31. disk-analyse a.adf a.hfe
  32. ./gw --bt write --ecyl=2 a.hfe
  33. ./gw --bt read --revs=1 --ecyl=2 b.hfe
  34. disk-analyse -e 2 b.hfe b.adf
  35. diff a.adf b.adf
  36. md5sum a.adf b.adf
  37. rm -f b.adf c.adf a.hfe b.hfe
  38. rm -f a.adf