fjfs is FUSE module that implements virtual joining of multiple files as one. https://georgi.unixsol.org/programs/fjfs/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test.sh 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. #!/bin/sh
  2. mount1_fjfs() {
  3. echo "Using filelist.txt as input."
  4. ../fjfs --file mount-point filelist.txt
  5. }
  6. mount2_fjfs() {
  7. echo "Using glob 'test?' as input."
  8. ../fjfs --glob mount-point 'test?'
  9. }
  10. mount3_fjfs() {
  11. echo "Using args 'test1 test2 test3' as input."
  12. ../fjfs --args mount-point test1 test2 test3
  13. }
  14. umount_fjfs() {
  15. fusermount -u mount-point && rm mount-point
  16. echo
  17. }
  18. do_tests() {
  19. # Direct compare
  20. diff -u expect_1 mount-point
  21. if [ $? = 0 ]
  22. then
  23. echo "test 1: OK"
  24. else
  25. echo "test 1: FAIL!"
  26. fi
  27. head -n2 mount-point | tail -n1 > result_2
  28. diff -u expect_2 result_2
  29. if [ $? = 0 ]
  30. then
  31. echo "test 2: OK"
  32. else
  33. echo "test 2: FAIL!"
  34. fi
  35. rm result_2
  36. head -c 120 mount-point > result_3
  37. diff -u expect_3 result_3
  38. if [ $? = 0 ]
  39. then
  40. echo "test 3: OK"
  41. else
  42. echo "test 3: FAIL!"
  43. fi
  44. rm result_3
  45. tail -c 120 mount-point > result_4
  46. diff -u expect_4 result_4
  47. if [ $? = 0 ]
  48. then
  49. echo "test 4: OK"
  50. else
  51. echo "test 4: FAIL!"
  52. fi
  53. rm result_4
  54. }
  55. mount1_fjfs
  56. do_tests
  57. umount_fjfs
  58. mount2_fjfs
  59. do_tests
  60. umount_fjfs
  61. mount3_fjfs
  62. do_tests
  63. umount_fjfs