testcase rename seems incorrect

Dmitry V. Levin ldv at altlinux.org
Thu Mar 24 03:01:54 UTC 2016


On Thu, Mar 24, 2016 at 10:40:39AM +0800, Wei Yulan wrote:
> 
> > 在 2016年3月23日,下午11:51,Dmitry V. Levin <ldv at altlinux.org> 写道:
> > 
> > On Wed, Mar 23, 2016 at 08:17:07PM +0800, 魏宇蓝 wrote:
> >> Hi all,
> >> 
> >> I am new to here, and I am reading the codebase today. Here is something I found made me confused.
> >> 
> >> After built all test cases, I run this commands following:
> >> 
> >> [vagrant at localhost:~/strace-code/tests ]$ touch rename_old
> > 
> > What do you mean by creating this file?
> > 
> Thanks for your reply.
> 
> As we known, it can be divided into two situations when calling rename. One is rename a exist file. Another is rename a non-exist file.
> 
> I try to create a empty file to test the former situation, but the real output is not same as expected output. In rename.test, it test the latter situation only. Should we consider the former situation for rename.test?

rename.test assumes that file named rename_old does not exist because
nothing in the test suite creates a file with this name.
Why do you create a file with the name that is expected not to exist?


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20160324/243a3bc3/attachment.bin>


More information about the Strace-devel mailing list