<div dir="ltr">Buna ziua!<div><br></div><div>Am descoperit un comportament neasteptat la rularea comenzii file, in sensul utilizarii acesteia in teste[1].</div><div>Desi fisierul este inexistent, comanda **file** intoarce codul de retur 0.</div><div><br></div><div>Experimentul facut a fost urmatorul:</div><div><br></div><div>root@qemux86:~/skels/assignments/4-stp# insmod af_stp.ko                       <br>root@qemux86:~/skels/assignments/4-stp# file /proc/net/stp_stats<br>/proc/net/stp_stats: empty                                                     <br>root@qemux86:~/skels/assignments/4-stp# echo $?                                <br>0                                                                              <br>root@qemux86:~/skels/assignments/4-stp# cat /proc/net/stp_stats                <br>RxPkts  HdrErr  CsumErr NoSock  NoBuffs TxPkts                                 <br>0       0       0       0       0       0                                      <br>root@qemux86:~/skels/assignments/4-stp# echo $?                                <br>0                                                                              <br>root@qemux86:~/skels/assignments/4-stp# rmmod af_stp                           <br>NET: Unregistered protocol family 19                                           <br>root@qemux86:~/skels/assignments/4-stp# file /proc/net/stp_stats               <br>/proc/net/stp_stats: cannot open `/proc/net/stp_stats' (No such file or direct)<br>root@qemux86:~/skels/assignments/4-stp# echo $?                                <br>0                                                                              <br>root@qemux86:~/skels/assignments/4-stp# cat /proc/net/stp_stats                <br>cat: can't open '/proc/net/stp_stats': No such file or directory               <br>root@qemux86:~/skels/assignments/4-stp# echo $?                                <br>1  <br></div><div><br></div><div>Ca urmare, testul test_proc_entry_inexistent_after_rmmod pica mereu, deoarece codul de retur este 0 mereu.</div><div><br></div><div><br></div><div>[1] <a href="https://github.com/linux-kernel-labs/linux/blob/master/tools/labs/templates/assignments/4-stp/checker/_test/stp_test.c#L145">https://github.com/linux-kernel-labs/linux/blob/master/tools/labs/templates/assignments/4-stp/checker/_test/stp_test.c#L145</a></div></div>