sw_test.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 --tracks="c=0-2" a.adf
  9. ./gw --bt read --revs=1 --tracks="c=0-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 --tracks="c=0-2" a.scp
  17. ./gw --bt read --revs=1 --tracks="c=0-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 --tracks="c=0-2" a.ipf
  25. ./gw --bt read --revs=1 --tracks="c=0-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 --tracks="c=0-2" a.hfe
  33. ./gw --bt read --revs=1 --tracks="c=0-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. # Read Kryoflux
  38. mkdir a
  39. ./gw --bt read --revs=1 --tracks="c=0-2" a/
  40. disk-analyse -e 2 a/ b.adf
  41. diff a.adf b.adf
  42. md5sum a.adf b.adf
  43. rm -f b.adf c.adf a.hfe b.hfe
  44. rm -rf a
  45. rm -f a.adf