<div dir="ltr"><div>Dear Professor Jan,</div><div><br></div><div>Thanks for your Friday night replay.</div><div><br></div>The problem remains when I test my code on linux-lab.<div><br></div><div>the detailed information is as the following:</div><div><br></div><div><div>rding6@rainman:~/cs631$ ./testcp.sh -v -p a.out</div><div>=> Checking usage...</div><div>===> Checking '/home/rding6/cs631/a.out'...</div><div>===> Checking '/home/rding6/cs631/a.out one'...</div><div>===> Checking '/home/rding6/cs631/a.out one two three'...</div><div>=> Checking copying...</div><div>==> Checking copy failures...</div><div>===> Checking '/home/rding6/cs631/a.out . file'...</div><div>===> Checking '/home/rding6/cs631/a.out / .'...</div><div>===> Checking '/home/rding6/cs631/a.out /etc/passwd ./sub/dir'...</div><div><b>===> Checking '/home/rding6/cs631/a.out file file2'...</b></div><div><b>Expected failure, but command returned 0:</b></div><div> /home/rding6/cs631/a.out file file2</div><div><b>===> Comparing '/etc/passwd' to 'file'...</b></div><div><b>Files '/etc/passwd' and 'file' differ.</b></div><div>==> Checking copy successes...</div><div>===> Prepping test directory...</div><div>====> Removing anything already in the directory...</div><div>====> Creating a zero-length file...</div><div>====> Creating a large file...</div><div><b>ln: failed to create hard link `big' => `/tmp/big': Operation not permitted //-rw-r--r-- 1 bzhang41 student 1.1G Sep 16 03:37 /tmp/big let's skip this error, because this file belongs to bzhang41</b></div><div>====> Creating a small file...</div><div>cp: cannot create regular file `/tmp/f': Permission denied</div><div>===> Test case: ro_file_to_file...</div><div>===> Checking '/home/rding6/cs631/a.out /etc/passwd file'...</div><div>===> Comparing '/etc/passwd' to 'file'...</div><div>===> Test case: rw_file_to_file...</div><div>===> Checking '/home/rding6/cs631/a.out /tmp/f file'...</div><div>===> Comparing '/tmp/f' to 'file'...</div><div>===> Test case: abs_file_to_dir...</div><div>===> Checking '/home/rding6/cs631/a.out /etc/passwd .'...</div><div>===> Comparing '/etc/passwd' to './passwd'...</div><div>===> Test case: rel_file_to_dir...</div><div>===> Checking '/home/rding6/cs631/a.out g ./sub/dir/.'...</div><div>===> Comparing 'g' to './sub/dir/./g'...</div><div>===> Test case: abs_file_to_subdir...</div><div>===> Checking '/home/rding6/cs631/a.out /etc/passwd ./sub/dir/.'...</div><div>===> Comparing '/etc/passwd' to './sub/dir/./passwd'...</div><div>===> Test case: file_to_existing...</div><div>===> Checking '/home/rding6/cs631/a.out /etc/passwd /tmp/f'...</div><div>Expected success, but command failed:</div><div><b> /home/rding6/cs631/a.out /etc/passwd /tmp/f // -rw-r--r-- 1 bzhang41 student 2.0K Sep 16 18:20 /tmp/f</b></div><div>===> Test case: zero...</div><div>===> Checking '/home/rding6/cs631/a.out zero file'...</div><div>===> Comparing 'zero' to 'file'...</div><div>===> Test case: big...</div><div>===> Checking '/home/rding6/cs631/a.out big file'...</div><div>Expected success, but command failed:</div><div> /home/rding6/cs631/a.out big file</div><div>===> Checking '/home/rding6/cs631/a.out small existing'...</div><div>===> Comparing 'small' to 'existing'...</div><div>./testcp.sh: 4/23 tests failed.</div><div><br></div><div><br></div><div>rding6@rainman:~/cs631$ /home/rding6/cs631/a.out file file2</div><div>Unable to open file: No such file or directory</div><div>rding6@rainman:~/cs631$ echo $?</div><div>1</div><div>rding6@rainman:~/cs631$ /home/rding6/cs631/a.out /etc/passwd file</div><div>rding6@rainman:~/cs631$ echo $?</div><div>0</div><div>rding6@rainman:~/cs631$ cmp -s /etc/passwd file</div><div>rding6@rainman:~/cs631$ echo $?</div><div>0</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 16, 2016 at 9:22 PM, Jan Schaumann <span dir="ltr"><<a href="mailto:jschauma@stevens.edu" target="_blank">jschauma@stevens.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Runxi Ding <<a href="mailto:rding6@stevens.edu">rding6@stevens.edu</a>> wrote:<br>
><br>
> when I use the testcp.sh to test my tcp.c. I got the following errors:<br>
<br>
</span>Make sure to develop, test, and run your program on linux-lab. Errors<br>
reported on other systems may be misleading.<br>
<br>
If the same problem persists on linux-lab, post again with the details<br>
of the command you ran and the output.<br>
<br>
-Jan<br>
______________________________<wbr>_________________<br>
cs631apue mailing list<br>
<a href="mailto:cs631apue@lists.stevens.edu">cs631apue@lists.stevens.edu</a><br>
<a href="https://lists.stevens.edu/mailman/listinfo/cs631apue" rel="noreferrer" target="_blank">https://lists.stevens.edu/<wbr>mailman/listinfo/cs631apue</a><br>
</blockquote></div><br></div>