<div dir="ltr">Buna, <div><br></div><div>Da, spre exemplu, pentru testul 10: am luat fiecare comanda in mini-shell, pe rand, iar output-ul obtinut este cel asteptat.</div><div><br></div><div>Multumesc<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-04-04 12:33 GMT+03:00 Razvan Crainea <span dir="ltr"><<a href="mailto:razvan.crainea@gmail.com" target="_blank">razvan.crainea@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Bună, Andreea!<div><br></div><div>În toate cele 3 teste care pică este folosit operatorul pipe '|'. Ai încercat să rulezi o comandă care folosește pipe în mini-shell-ul tău? Funcționează corect?</div><div><br></div><div>Numai bine,</div><div>Răzvan<div><div class="h5"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Apr 4, 2017 at 10:56 AM Andreea Dobroteanu <<a href="mailto:andreea.dobroteanu@gmail.com" target="_blank">andreea.dobroteanu@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_-7093241344757114859gmail_msg"><div class="m_-7093241344757114859gmail_msg">Buna, </div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg">Spre exemplu, output-ul pentru testul 10, ruland checker-ul, este:</div><div class="m_-7093241344757114859gmail_msg">128</div><div class="m_-7093241344757114859gmail_msg">1</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">1</div><div class="m_-7093241344757114859gmail_msg">1</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">1</div><div class="m_-7093241344757114859gmail_msg">1</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">1</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">1</div><div class="m_-7093241344757114859gmail_msg">3</div><div class="m_-7093241344757114859gmail_msg">3</div><div class="m_-7093241344757114859gmail_msg">1</div><div class="m_-7093241344757114859gmail_msg">3</div><div class="m_-7093241344757114859gmail_msg">3</div><div class="m_-7093241344757114859gmail_msg">1</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">1</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">1</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">1</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg">2</div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg">"Checker-ul" improvizat de mine arata cam asa: </div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg"><div class="m_-7093241344757114859gmail_msg">#!/bin/bash</div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg">rm -rf "test_outputs"</div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg">MAIN_TEST_DIR="test_outputs"</div><div class="m_-7093241344757114859gmail_msg">INPUT_DIR="_test/inputs"</div><div class="m_-7093241344757114859gmail_msg">TEST_TIMEOUT=30</div><div class="m_-7093241344757114859gmail_msg">BUFFERING_WRAPPER=""</div><div class="m_-7093241344757114859gmail_msg">LOG_FILE="/dev/null"</div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg">function execute_cmd {</div><div class="m_-7093241344757114859gmail_msg"> EXEC=$1</div><div class="m_-7093241344757114859gmail_msg"> INPUT=$2</div><div class="m_-7093241344757114859gmail_msg"> OUTPUT=$3</div><div class="m_-7093241344757114859gmail_msg"> mkdir -p "$MAIN_TEST_DIR/$OUTPUT" && cd "$MAIN_TEST_DIR/$OUTPUT" &> $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg"> timeout $TEST_TIMEOUT $BUFFERING_WRAPPER $EXEC < "${INPUT}"</div><div class="m_-7093241344757114859gmail_msg"> sync</div><div class="m_-7093241344757114859gmail_msg"> cd - &> $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">}</div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_01.<wbr>lin.txt" "test_01_out" > $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_02.<wbr>lin.txt" "test_02_out" > $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_03.<wbr>txt" "test_03_out" > $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_04.<wbr>lin.txt" "test_04_out" > $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_05.<wbr>txt" "test_05_out" > $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_06.<wbr>txt" "test_06_out" > $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_07.<wbr>lin.txt" "test_07_out" > $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_08.<wbr>txt" "test_08_out" > $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_09.<wbr>txt" "test_09_out" > $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_10.<wbr>txt" "test_10_out" > $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_11.<wbr>txt" "test_11_out" > $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_12.<wbr>txt" "test_12_out" > $LOG_FILE</div><div class="m_-7093241344757114859gmail_msg">execute_cmd "../../mini-shell" "../../_test/inputs/test_13.<wbr>txt" "test_13_out" > $LOG_FILE</div></div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg">Iar cu asta, output-ul obtinut in "test_outputs/test_10_out" este <b class="m_-7093241344757114859gmail_msg">3 </b>(rezultatul difera din cauza contextului diferit in care am rulat).</div><div class="m_-7093241344757114859gmail_msg">Daca rulez <b class="m_-7093241344757114859gmail_msg">../../../mini-shell < ../../inputs/test_10.txt</b> in <b class="m_-7093241344757114859gmail_msg">_test/outputs/test_10_out, </b>obtin <b class="m_-7093241344757114859gmail_msg">4</b>, rezultatul din ref.</div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg">Practic, inca nu imi trec testele cu checker-ul default (<a href="http://run_all.sh/run_test.sh" class="m_-7093241344757114859gmail_msg" target="_blank">run_all.sh/run_test.sh</a>); nu am incercat sa il modific, doar am creat bash-ul de mai sus, pentru testare (am pus pana la 13, pentru ca celelate teste imi trec cu checker-ul, deci pana aici ma interesau diferentele).</div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg">Multumesc</div></div><div class="gmail_extra m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"><div class="gmail_quote m_-7093241344757114859gmail_msg">2017-04-04 10:18 GMT+03:00 Razvan Crainea <span dir="ltr" class="m_-7093241344757114859gmail_msg"><<a href="mailto:razvan.crainea@gmail.com" class="m_-7093241344757114859gmail_msg" target="_blank">razvan.crainea@gmail.com</a>></span>:<br class="m_-7093241344757114859gmail_msg"><blockquote class="gmail_quote m_-7093241344757114859gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_-7093241344757114859gmail_msg">Bună, Andreea!<div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg">Definește, te rog, "output dubios". Ce anume obții?</div><div class="m_-7093241344757114859gmail_msg">De asemenea, ce anume ai modificat astfel încât să treacă toate testele până la testul 13?</div><div class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859gmail_msg">Numai bine,</div><div class="m_-7093241344757114859gmail_msg">Răzvan<br class="m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859gmail_msg"><div class="gmail_quote m_-7093241344757114859gmail_msg"><div class="m_-7093241344757114859gmail_msg"><div class="m_-7093241344757114859m_7635318343954197435h5 m_-7093241344757114859gmail_msg"><div dir="ltr" class="m_-7093241344757114859gmail_msg">On Mon, Apr 3, 2017 at 11:53 PM Andreea Metalbrain via so <<a href="mailto:so@cursuri.cs.pub.ro" class="m_-7093241344757114859gmail_msg" target="_blank">so@cursuri.cs.pub.ro</a>> wrote:<br class="m_-7093241344757114859gmail_msg"></div></div></div><blockquote class="gmail_quote m_-7093241344757114859gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-7093241344757114859gmail_msg"><div class="m_-7093241344757114859m_7635318343954197435h5 m_-7093241344757114859gmail_msg"><div dir="ltr" class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg">Sunt Andreea Dobroteanu, 331CA (imi cer scuze, nu mi-am mai dat seama ca am avut alt nume pe contul de gmail).</div><div class="gmail_extra m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><div class="gmail_quote m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg">2017-04-03 23:49 GMT+03:00 Andreea Metalbrain <span dir="ltr" class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><<a href="mailto:andreea.dobroteanu@gmail.com" class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg" target="_blank">andreea.dobroteanu@gmail.com</a>></span><wbr>:<br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><blockquote class="gmail_quote m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg">Buna, <div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg">Am o problema cu checker-ul: daca rulez testele cu ./run_all.sh (checker-ul), obtin un output dubios pentru testele 9, 10 si 13.</div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg">Insa daca rulez testele "de mana", output-ul este la fel cu cel din ref.</div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg">Am incercat sa fac un micut script (inspirat din functia execute_cmd din run_test.sh), sa rulez toate testele pana la 13, iar rezultatul este corect.</div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg">Am incarcat codul pe gitlab. (insa nu stiu cui ar trebui sa ii dau acces).</div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg">Nu reusesc deloc sa imi dau seama de unde poate aparea problema :(</div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg">Ma poate ajuta cineva?</div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"><br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"></div><div class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg">Multumesc</div></div>
</blockquote></div><br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg"></div></div></div>
______________________________<wbr>_________________<br class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg">
<a href="http://ocw.cs.pub.ro/courses/so/info/lista-discutii" rel="noreferrer" class="m_-7093241344757114859m_7635318343954197435m_-8357708465002089376gmail_msg m_-7093241344757114859gmail_msg" target="_blank">http://ocw.cs.pub.ro/courses/<wbr>so/info/lista-discutii</a></blockquote></div></div></div>
</blockquote></div><br class="m_-7093241344757114859gmail_msg"></div>
</blockquote></div></div></div></div></div>
</blockquote></div><br></div>