====================== TestAlternatingClients ====================== [Input: ASDF] [Expect: 'CUFH\n'] CUFH [Input: QWERTY] [Expect: 'HNVIKP\n'] HNVIKP [Input: HEYHO] [Expect: 'JGAJQ\n'] JGAJQ [Input: BENOIT] [Expect: 'SVEFZK\n'] SVEFZK [Input: DERNIER] [Expect: 'UVIEZVI\n'] UVIEZVI [Input: AQUARIUM] [Expect: 'CSWCTKWO\n'] CSWCTKWO ================================== TestClientExitCodeOnConnectionLoss ================================== Expect the client's return code to be -1 (or equivalent bin representation):Network error; abort. 255 ==================== TestInteractiveShell ==================== [Input: echo 'Hello world!'] [Expect: 'Hello world!\n'] Hello world! [Input: pwd] [Expect: '/home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/serveur\n'] /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/hamelin/serveur [Input: cat reshd] [Expect: '#!/bin/bash\nexec python `dirname $0`/reshd.py $@\n\n'] #!/bin/bash exec python `dirname $0`/reshd.py $@ Expect return code: 0 Obtain return code: 0 ================ TestLateExitCode ================ [Should get no output -- wait for exit code for ~20 seconds.] Expect exit code: 37 Obtain exit code: 37 =============== TestLcatAndLtee =============== *** Expected data from /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/s0 -- 131072 bytes *** 'ABHRAEEXNIPINPJHHZJBDMYAOQWSOS' ... 'JQUBIMTNNVOGGDDJEHLIKRQNFAHPZW' *** Obtained data in /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/r0 -- 131072 bytes *** 'ABHRAEEXNIPINPJHHZJBDMYAOQWSOS' ... 'JQUBIMTNNVOGGDDJEHLIKRQNFAHPZW' ================ TestLcatRedirect ================ [Input: ./lcat resh reshd | tee remote_code] [Expect: '#!/bin/bash\nexec python `dirname $0`/resh.py $@\n\n#!/bin/bash\nexec python `dirname $0`/reshd.py $@\n\n'] #!/bin/bash exec python `dirname $0`/resh.py $@ #!/bin/bash exec python `dirname $0`/reshd.py $@ *** Expect remote_code -- 99 bytes *** '#!/bin/bash\nexec python `dirname $0`/resh.py $@\n\n#!/bin/bash\nexec python `dirname $0`/reshd.py $@\n\n' *** Obtain remote_code -- 99 bytes *** '#!/bin/bash\nexec python `dirname $0`/resh.py $@\n\n#!/bin/bash\nexec python `dirname $0`/reshd.py $@\n\n' ============== TestLcatUpload ============== [Input: ./lcat resh reshd >remote_code echo $?] [Expect: '0\n'] 0 *** Expect remote_code -- 99 bytes *** '#!/bin/bash\nexec python `dirname $0`/resh.py $@\n\n#!/bin/bash\nexec python `dirname $0`/reshd.py $@\n\n' *** Obtain remote_code -- 99 bytes *** '#!/bin/bash\nexec python `dirname $0`/resh.py $@\n\n#!/bin/bash\nexec python `dirname $0`/reshd.py $@\n\n' ================ TestLteeDownload ================ [Input: ./ltee local_reshd /dev/null echo $?] [Expect: '0\n'] 0 *** Expect local_reshd -- 50 bytes *** '#!/bin/bash\nexec python `dirname $0`/reshd.py $@\n\n' *** Obtain local_reshd -- 50 bytes *** '#!/bin/bash\nexec python `dirname $0`/reshd.py $@\n\n' ============================ TestLteeEndProgBeforeEndXfer ============================ *** Expected data from /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/serveur/s0 -- 1048576 bytes *** 'ABHRAEEXNIPINPJHHZJBDMYAOQWSOS' ... 'IJDBSQODHMBCFPYWMFDNAZJXBZLSEN' *** Obtained data in /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/r0 -- 1048576 bytes *** 'ABHRAEEXNIPINPJHHZJBDMYAOQWSOS' ... 'IJDBSQODHMBCFPYWMFDNAZJXBZLSEN' ================ TestLteeRedirect ================ [Input: cat reshd | ./ltee local_reshd] [Expect: '#!/bin/bash\nexec python `dirname $0`/reshd.py $@\n\n'] #!/bin/bash exec python `dirname $0`/reshd.py $@ *** Expect local_reshd -- 50 bytes *** '#!/bin/bash\nexec python `dirname $0`/reshd.py $@\n\n' *** Obtain local_reshd -- 50 bytes *** '#!/bin/bash\nexec python `dirname $0`/reshd.py $@\n\n' ============================ TestManyLcatsManyConnections ============================ *** Expected data from /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/s0 -- 131072 bytes *** 'ABHRAEEXNIPINPJHHZJBDMYAOQWSOS' ... 'JQUBIMTNNVOGGDDJEHLIKRQNFAHPZW' *** Obtained data in /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/serveur/r0 -- 131072 bytes *** 'ABHRAEEXNIPINPJHHZJBDMYAOQWSOS' ... 'JQUBIMTNNVOGGDDJEHLIKRQNFAHPZW' *** Expected data from /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/s1 -- 131072 bytes *** 'FOTZVSYRQDWWQHJICYNGNXULFCYJJU' ... 'IEFBGLLQLITJDMYOUERAZBDELDBSNH' *** Obtained data in /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/serveur/r1 -- 131072 bytes *** 'FOTZVSYRQDWWQHJICYNGNXULFCYJJU' ... 'IEFBGLLQLITJDMYOUERAZBDELDBSNH' Client 0 (output file /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/out-0): *** Expected -- 131072 bytes *** 'ABHRAEEXNIPINPJHHZJBDMYAOQWSOS' ... 'JQUBIMTNNVOGGDDJEHLIKRQNFAHPZW' *** Obtained -- 131072 bytes *** 'ABHRAEEXNIPINPJHHZJBDMYAOQWSOS' ... 'JQUBIMTNNVOGGDDJEHLIKRQNFAHPZW' Client 1 (output file /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/out-1): *** Expected -- 131072 bytes *** 'FOTZVSYRQDWWQHJICYNGNXULFCYJJU' ... 'IEFBGLLQLITJDMYOUERAZBDELDBSNH' *** Obtained -- 131072 bytes *** 'FOTZVSYRQDWWQHJICYNGNXULFCYJJU' ... 'IEFBGLLQLITJDMYOUERAZBDELDBSNH' ========================== TestManyLcatsOneConnection ========================== *** Expected data from /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/s0 -- 131072 bytes *** 'PQWGPTTMCXEXCEYWWOYQSBNPDFLHDH' ... 'YFJQXBICCKDVVSSYTWAXZGFCUPWEOL' *** Obtained data in /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/serveur/r0 -- 131072 bytes *** 'PQWGPTTMCXEXCEYWWOYQSBNPDFLHDH' ... 'YFJQXBICCKDVVSSYTWAXZGFCUPWEOL' *** Expected data from /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/s1 -- 131072 bytes *** 'AJOUQNTMLYRRLCEDXTIBISPGAXTEEP' ... 'DZAWBGGLGDOEYHTJPZMVUWYZGYWNIC' *** Obtained data in /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/serveur/r1 -- 131072 bytes *** 'AJOUQNTMLYRRLCEDXTIBISPGAXTEEP' ... 'DZAWBGGLGDOEYHTJPZMVUWYZGYWNIC' *** Expected data from /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/s2 -- 131072 bytes *** 'JZRNQPTIDSIWWLBXMLDBIAKWBRTCWY' ... 'DXGAGBTCFGATQOYZAQHKXDSLHDBSZS' *** Obtained data in /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/serveur/r2 -- 131072 bytes *** 'JZRNQPTIDSIWWLBXMLDBIAKWBRTCWY' ... 'DXGAGBTCFGATQOYZAQHKXDSLHDBSZS' ============================ TestManyLteesManyConnections ============================ *** Expected data from /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/serveur/s0 -- 131072 bytes *** 'ABHRAEEXNIPINPJHHZJBDMYAOQWSOS' ... 'JQUBIMTNNVOGGDDJEHLIKRQNFAHPZW' *** Obtained data in /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/r0 -- 131072 bytes *** 'ABHRAEEXNIPINPJHHZJBDMYAOQWSOS' ... 'JQUBIMTNNVOGGDDJEHLIKRQNFAHPZW' *** Expected data from /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/serveur/s1 -- 131072 bytes *** 'FOTZVSYRQDWWQHJICYNGNXULFCYJJU' ... 'IEFBGLLQLITJDMYOUERAZBDELDBSNH' *** Obtained data in /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/r1 -- 131072 bytes *** 'FOTZVSYRQDWWQHJICYNGNXULFCYJJU' ... 'IEFBGLLQLITJDMYOUERAZBDELDBSNH' Client 0 (output file /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/out-0): *** Expected -- 131072 bytes *** 'ABHRAEEXNIPINPJHHZJBDMYAOQWSOS' ... 'JQUBIMTNNVOGGDDJEHLIKRQNFAHPZW' *** Obtained -- 131072 bytes *** 'ABHRAEEXNIPINPJHHZJBDMYAOQWSOS' ... 'JQUBIMTNNVOGGDDJEHLIKRQNFAHPZW' Client 1 (output file /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/out-1): *** Expected -- 131072 bytes *** 'FOTZVSYRQDWWQHJICYNGNXULFCYJJU' ... 'IEFBGLLQLITJDMYOUERAZBDELDBSNH' *** Obtained -- 131072 bytes *** 'FOTZVSYRQDWWQHJICYNGNXULFCYJJU' ... 'IEFBGLLQLITJDMYOUERAZBDELDBSNH' ========================== TestManyLteesOneConnection ========================== *** Expected data from /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/serveur/s0 -- 131072 bytes *** 'PQWGPTTMCXEXCEYWWOYQSBNPDFLHDH' ... 'YFJQXBICCKDVVSSYTWAXZGFCUPWEOL' *** Obtained data in /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/r0 -- 131072 bytes *** 'PQWGPTTMCXEXCEYWWOYQSBNPDFLHDH' ... 'YFJQXBICCKDVVSSYTWAXZGFCUPWEOL' *** Expected data from /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/serveur/s1 -- 131072 bytes *** 'AJOUQNTMLYRRLCEDXTIBISPGAXTEEP' ... 'DZAWBGGLGDOEYHTJPZMVUWYZGYWNIC' *** Obtained data in /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/r1 -- 131072 bytes *** 'AJOUQNTMLYRRLCEDXTIBISPGAXTEEP' ... 'DZAWBGGLGDOEYHTJPZMVUWYZGYWNIC' *** Expected data from /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/serveur/s2 -- 131072 bytes *** 'JZRNQPTIDSIWWLBXMLDBIAKWBRTCWY' ... 'DXGAGBTCFGATQOYZAQHKXDSLHDBSZS' *** Obtained data in /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/client/r2 -- 131072 bytes *** 'JZRNQPTIDSIWWLBXMLDBIAKWBRTCWY' ... 'DXGAGBTCFGATQOYZAQHKXDSLHDBSZS' ================== TestNonInteractive ================== Non-interactive program. [Expected output: "Non-interactive program.\n"] Expect exit code: 4 Obtain exit code: 4 ===================== TestPythonInteractive ===================== Python 2.7.5+ (default, Sep 17 2013, 15:31:50) [GCC 4.8.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> [Should have got the Python banner by now, with >>> prompt.] [Input: print 'Hello world!'] [Expect: 'Hello world!\n'] Hello world! >>> [Input: [n**2 for n in xrange(0,4)]] [Expect: '[0, 1, 4, 9]\n'] [0, 1, 4, 9] >>> ============================== TestServerKillOnConnectionLoss ============================== Expect the server to have 1 child; it actually has 1 Expect the server to have remained alive; it is True Expect the server's child to have died; it is True ======================= TestSimultaneousClients ======================= Client 0 (output file /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/out-0): *** Expected -- 65536 bytes *** 'JZNYRCIDFJETZKOPSPZRWVYFNNQQBY' ... 'YEGTCGHLNKFDBIIYAVXLLGTLNTLTKA' *** Obtained -- 65536 bytes *** 'JZNYRCIDFJETZKOPSPZRWVYFNNQQBY' ... 'YEGTCGHLNKFDBIIYAVXLLGTLNTLTKA' Client 1 (output file /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/out-1): *** Expected -- 65536 bytes *** 'QVVXXFRXYRMWDLLUWMHBBLYYPWVSSS' ... 'MPYDYIXVGIJKBJYQNRNXEKLDVPWMOE' *** Obtained -- 65536 bytes *** 'QVVXXFRXYRMWDLLUWMHBBLYYPWVSSS' ... 'MPYDYIXVGIJKBJYQNRNXEKLDVPWMOE' Client 2 (output file /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/out-2): *** Expected -- 65536 bytes *** 'HPXUKHIUKXCWNWIXGJTDCJEJKWYPZJ' ... 'TCNOZOZPLOXTHDNGDAUZDMZOGFCIGW' *** Obtained -- 65536 bytes *** 'HPXUKHIUKXCWNWIXGJTDCJEJKWYPZJ' ... 'TCNOZOZPLOXTHDNGDAUZDMZOGFCIGW' Client 3 (output file /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/out-3): *** Expected -- 65536 bytes *** 'IGWFWLCTJTBRDTYWIUDPIUARTTWCPI' ... 'TATIZNNKTZMBUNOIQPAZDXBQKVXOKU' *** Obtained -- 65536 bytes *** 'IGWFWLCTJTBRDTYWIUDPIUARTTWCPI' ... 'TATIZNNKTZMBUNOIQPAZDXBQKVXOKU' Client 4 (output file /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/out-4): *** Expected -- 65536 bytes *** 'PGHLQVMXHPQXPPIWFXNGWXAMCLMJDG' ... 'KSOUNYGSFDAVBYMQXFDCIWRBSJZHHI' *** Obtained -- 65536 bytes *** 'PGHLQVMXHPQXPPIWFXNGWXAMCLMJDG' ... 'KSOUNYGSFDAVBYMQXFDCIWRBSJZHHI' Client 5 (output file /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/out-5): *** Expected -- 65536 bytes *** 'MTYFMDWDMLLRDRWURIDRBSVTUVBFQD' ... 'CILNLQUMFHVGNFGBHRGSNECBWOVGGL' *** Obtained -- 65536 bytes *** 'MTYFMDWDMLLRDRWURIDRBSVTUVBFQD' ... 'CILNLQUMFHVGNFGBHRGSNECBWOVGGL' Client 6 (output file /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/out-6): *** Expected -- 65536 bytes *** 'ZKGILNBZUUISEHUYYMXOBQAWDGENAQ' ... 'HRKGMHVDOAPPQFPIPGHQWCUZNCIJNE' *** Obtained -- 65536 bytes *** 'ZKGILNBZUUISEHUYYMXOBQAWDGENAQ' ... 'HRKGMHVDOAPPQFPIPGHQWCUZNCIJNE' Client 7 (output file /home/hamelin/Desktop/ift585/2014_ete/tp/1/etudiants/../etudiants/hamelin/out-7): *** Expected -- 65536 bytes *** 'CFXKIOLMQQHAITHIWIXASVXBKSUWTD' ... 'JTOQPTOGPBPMGIKFTJSXFOQYJXCAUB' *** Obtained -- 65536 bytes *** 'CFXKIOLMQQHAITHIWIXASVXBKSUWTD' ... 'JTOQPTOGPBPMGIKFTJSXFOQYJXCAUB'