|
| 1 | + |
| 2 | +set -x |
| 3 | + |
| 4 | +cd shim_dirA |
| 5 | +which bash |
| 6 | + |
| 7 | +echo "FIXME: KNOWN ISSUE redirection close does not get posted!" |
| 8 | +echo "#test 1 sha512 000 capturing stdout" |
| 9 | +bash -c 'echo "hoho" >> ./hoho' |
| 10 | + |
| 11 | +echo "#test 0 comment 010 shim copy posting start" |
| 12 | +echo "#test 1 sha512 c program run." |
| 13 | +truncate --size=2 ./hoho |
| 14 | + |
| 15 | +echo "#test 1 sha512 020 python program run" |
| 16 | +/usr/bin/python3 ../pyiotest |
| 17 | + |
| 18 | +grep lovely pyiotest |
| 19 | + |
| 20 | +echo "#test 1 sha512 030 cp command" |
| 21 | +cp ../libsr3shim.c hoho_my_darling.txt |
| 22 | + |
| 23 | +echo "#test 1 sha512 040 cp command2" |
| 24 | +cp ../libsr3shim.c file_to_delete |
| 25 | +echo "#test 1 sha512 050 touch command" |
| 26 | +touch hihi |
| 27 | + |
| 28 | +echo "#test 1 link 060 symlink command" |
| 29 | +ln -s hoho haha |
| 30 | + |
| 31 | + |
| 32 | +echo lovely day eh |
| 33 | + |
| 34 | +echo "#test 1 rename 070 moving a symlink" |
| 35 | +mv haha hihi |
| 36 | + |
| 37 | +# the testing framework cannot handle expecting two links of different types for one event. |
| 38 | +# uncomment if you want to manually test this use case. |
| 39 | +echo "#test 1,1 link,rename symlink -f to existing file... creates two posts: symlink to tmp name, and subsquent rename" |
| 40 | +ln -sf ../libsr3shim.c file_to_delete |
| 41 | + |
| 42 | +#echo "#test 1 rename hardlink to a symlink" |
| 43 | +#ln hihi hoohoo |
| 44 | +echo "#test 1,1 link,rename symlink -f absolute existing file... creates two posts: symlink to tmp name, and subsquent rename" |
| 45 | +ln -sf `pwd`/../libsr3shim.c `pwd`/2nd_file_to_delete |
| 46 | + |
| 47 | +echo "#test 1 rename 080 moving a file. " |
| 48 | +mv hoho_my_darling.txt hoho2.log |
| 49 | + |
| 50 | +echo "#test 1 remove 090 removing a file." |
| 51 | +rm hoho2.log |
| 52 | + |
| 53 | + |
| 54 | +echo "#test 1 directory 100 mkdir 1" |
| 55 | +mkdir dirone |
| 56 | + |
| 57 | +echo "#test 1 link 110 symlink to directory" |
| 58 | +ln -s dirone link_to_dirone |
| 59 | + |
| 60 | +echo "#test 1 sha512 120 stdout redirection in a subdir" |
| 61 | +echo "fileone" >>link_to_dirone/fileone |
| 62 | + |
| 63 | +echo "#test 1 sha512 120 2nd stdout redirection in a subdir" |
| 64 | +echo "lovely" >>link_to_dirone/filefive |
| 65 | + |
| 66 | +echo "#test 1 directory 130 mkdir 2" |
| 67 | +mkdir dirone/dirtwo |
| 68 | + |
| 69 | +echo "#test 1,1 link,rename 135 symlink in a sub-dir" |
| 70 | +ln -sf `pwd`/link_to_dirone/fileone dirone/link_to_fileone |
| 71 | + |
| 72 | +echo "#test 1 sha512 140 stdout redirection in a subsubdir" |
| 73 | +echo "filetwo" >>dirone/dirtwo/filetwo |
| 74 | + |
| 75 | +echo "#test 1 rename 145 rename in a sub-dir" |
| 76 | +mv dirone/dirtwo/filetwo dirone/dirtwo/filefour |
| 77 | + |
| 78 | +# sleep to allow copies to happen before renaming directory... |
| 79 | +sleep 15 |
| 80 | +echo "#test 1 rename 150 renaming subdirs should cause file rename events." |
| 81 | +mv dirone dirthree |
| 82 | + |
| 83 | +echo "#test 1 link 135 symlink in a sub-dir" |
| 84 | +ln -sf `pwd`/dirthree/dirtwo/filefour dirthree/dirtwo/link2four |
| 85 | + |
| 86 | +echo "#test 1 sha512 create test_file" |
| 87 | +echo 1 >test_file |
| 88 | +echo "#test 1 sha512 update test_file" |
| 89 | +touch test_file |
| 90 | + |
| 91 | +echo "#test 1 rename move test_file into dirthree subdir" |
| 92 | +mv test_file dirthree |
| 93 | +echo "#test 1 sha512 create test_file (again)" |
| 94 | +echo 2 >test_file |
| 95 | +echo "#no post from touch, refused as repeat" |
| 96 | +touch test_file |
| 97 | +echo "#test 1 rename move test_file into dirthree subdir (new name)" |
| 98 | +mv test_file dirthree/new_test_file |
| 99 | + |
| 100 | + |
| 101 | +echo "#test 1 remove 165 symlink in a non sub-dir" |
| 102 | +cd ../shim_dirC/thedir |
| 103 | +rm filefive |
| 104 | + |
| 105 | +echo "#test 0 comment 160 shim copy posting end" |
0 commit comments