[cs631apue] tcp Failure test failed [tcp file file2]

Runxi Ding rding6 at stevens.edu
Sat Sep 17 08:30:10 EDT 2016


Dear Professor Jan,

Thanks for your Friday night  replay.

The problem remains when I test my code on linux-lab.

the detailed information is as the following:

rding6 at rainman:~/cs631$ ./testcp.sh -v -p a.out
=> Checking usage...
===> Checking '/home/rding6/cs631/a.out'...
===> Checking '/home/rding6/cs631/a.out one'...
===> Checking '/home/rding6/cs631/a.out one two three'...
=> Checking copying...
==> Checking copy failures...
===> Checking '/home/rding6/cs631/a.out . file'...
===> Checking '/home/rding6/cs631/a.out / .'...
===> Checking '/home/rding6/cs631/a.out /etc/passwd ./sub/dir'...
*===> Checking '/home/rding6/cs631/a.out file file2'...*
*Expected failure, but command returned 0:*
  /home/rding6/cs631/a.out file file2
*===> Comparing '/etc/passwd' to 'file'...*
*Files '/etc/passwd' and 'file' differ.*
==> Checking copy successes...
===> Prepping test directory...
====> Removing anything already in the directory...
====> Creating a zero-length file...
====> Creating a large file...
*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*
====> Creating a small file...
cp: cannot create regular file `/tmp/f': Permission denied
===> Test case: ro_file_to_file...
===> Checking '/home/rding6/cs631/a.out /etc/passwd file'...
===> Comparing '/etc/passwd' to 'file'...
===> Test case: rw_file_to_file...
===> Checking '/home/rding6/cs631/a.out /tmp/f file'...
===> Comparing '/tmp/f' to 'file'...
===> Test case: abs_file_to_dir...
===> Checking '/home/rding6/cs631/a.out /etc/passwd .'...
===> Comparing '/etc/passwd' to './passwd'...
===> Test case: rel_file_to_dir...
===> Checking '/home/rding6/cs631/a.out g ./sub/dir/.'...
===> Comparing 'g' to './sub/dir/./g'...
===> Test case: abs_file_to_subdir...
===> Checking '/home/rding6/cs631/a.out /etc/passwd ./sub/dir/.'...
===> Comparing '/etc/passwd' to './sub/dir/./passwd'...
===> Test case: file_to_existing...
===> Checking '/home/rding6/cs631/a.out /etc/passwd /tmp/f'...
Expected success, but command failed:
*  /home/rding6/cs631/a.out /etc/passwd /tmp/f // -rw-r--r-- 1 bzhang41
student 2.0K Sep 16 18:20 /tmp/f*
===> Test case: zero...
===> Checking '/home/rding6/cs631/a.out zero file'...
===> Comparing 'zero' to 'file'...
===> Test case: big...
===> Checking '/home/rding6/cs631/a.out big file'...
Expected success, but command failed:
  /home/rding6/cs631/a.out big file
===> Checking '/home/rding6/cs631/a.out small existing'...
===> Comparing 'small' to 'existing'...
./testcp.sh: 4/23 tests failed.


rding6 at rainman:~/cs631$ /home/rding6/cs631/a.out file file2
Unable to open file: No such file or directory
rding6 at rainman:~/cs631$ echo $?
1
rding6 at rainman:~/cs631$ /home/rding6/cs631/a.out /etc/passwd file
rding6 at rainman:~/cs631$ echo $?
0
rding6 at rainman:~/cs631$ cmp -s /etc/passwd file
rding6 at rainman:~/cs631$ echo $?
0

On Fri, Sep 16, 2016 at 9:22 PM, Jan Schaumann <jschauma at stevens.edu> wrote:

> Runxi Ding <rding6 at stevens.edu> wrote:
> >
> > when I use the testcp.sh to test my tcp.c. I got the following errors:
>
> Make sure to develop, test, and run your program on linux-lab.  Errors
> reported on other systems may be misleading.
>
> If the same problem persists on linux-lab, post again with the details
> of the command you ran and the output.
>
> -Jan
> _______________________________________________
> cs631apue mailing list
> cs631apue at lists.stevens.edu
> https://lists.stevens.edu/mailman/listinfo/cs631apue
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20160917/64259abc/attachment.html>


More information about the cs631apue mailing list