* [PATCH] xfstests: fix 251's cp -axT problem
@ 2012-01-10 11:39 Liu Bo
2012-01-11 11:45 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Liu Bo @ 2012-01-10 11:39 UTC (permalink / raw)
To: linux-btrfs; +Cc: hch, xfs
When I ran xfstests, 251 got failed cause "cp -axT" did not work as wish:
cp: cannot overwrite directory `/mnt/scratch/1' with non-directory
With this patch, 251 has passed.
Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
---
251 | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/251 b/251
index fa3d74a..b54e4c3 100755
--- a/251
+++ b/251
@@ -130,7 +130,7 @@ function run_process() {
# Copy content -> partition.
mkdir $SCRATCH_MNT/$p
- cp -axT $content $SCRATCH_MNT/$p
+ cp -axT $content/ $SCRATCH_MNT/$p/
export chpid=$! && wait $chpid &> /dev/null
check_sums
--
1.6.5.2
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] xfstests: fix 251's cp -axT problem
2012-01-10 11:39 [PATCH] xfstests: fix 251's cp -axT problem Liu Bo
@ 2012-01-11 11:45 ` Christoph Hellwig
2012-01-11 12:14 ` Lukas Czerner
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2012-01-11 11:45 UTC (permalink / raw)
To: Liu Bo; +Cc: Lukas Czerner, linux-btrfs, xfs
On Tue, Jan 10, 2012 at 07:39:20PM +0800, Liu Bo wrote:
> When I ran xfstests, 251 got failed cause "cp -axT" did not work as wish:
> cp: cannot overwrite directory `/mnt/scratch/1' with non-directory
>
> With this patch, 251 has passed.
Why would cp give that message with a missing /?
I'm not against putting this in, but I'd like to understand what's going
on.
Lukas, any idea?
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xfstests: fix 251's cp -axT problem
2012-01-11 11:45 ` Christoph Hellwig
@ 2012-01-11 12:14 ` Lukas Czerner
2012-01-12 1:16 ` Liu Bo
0 siblings, 1 reply; 4+ messages in thread
From: Lukas Czerner @ 2012-01-11 12:14 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Liu Bo, Lukas Czerner, linux-btrfs, xfs
On Wed, 11 Jan 2012, Christoph Hellwig wrote:
> On Tue, Jan 10, 2012 at 07:39:20PM +0800, Liu Bo wrote:
> > When I ran xfstests, 251 got failed cause "cp -axT" did not work as wish:
> > cp: cannot overwrite directory `/mnt/scratch/1' with non-directory
> >
> > With this patch, 251 has passed.
>
> Why would cp give that message with a missing /?
>
> I'm not against putting this in, but I'd like to understand what's going
> on.
>
> Lukas, any idea?
>
Hi Christoph,
the only reason I can think of is probably that Liu is accessing the
xfstests directory via symbolic link, hence the '$content' addresses the
symbolic link and cp is trying to overwrite the directory with
non-directory (symlink).
The fix is fine for both cases (xfstests as symlink and directory), confirmed
with a simple test.
Thanks!
-Lukas
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xfstests: fix 251's cp -axT problem
2012-01-11 12:14 ` Lukas Czerner
@ 2012-01-12 1:16 ` Liu Bo
0 siblings, 0 replies; 4+ messages in thread
From: Liu Bo @ 2012-01-12 1:16 UTC (permalink / raw)
To: Lukas Czerner; +Cc: Christoph Hellwig, linux-btrfs, xfs
On 01/11/2012 08:14 PM, Lukas Czerner wrote:
> On Wed, 11 Jan 2012, Christoph Hellwig wrote:
>
>> On Tue, Jan 10, 2012 at 07:39:20PM +0800, Liu Bo wrote:
>>> When I ran xfstests, 251 got failed cause "cp -axT" did not work as wish:
>>> cp: cannot overwrite directory `/mnt/scratch/1' with non-directory
>>>
>>> With this patch, 251 has passed.
>> Why would cp give that message with a missing /?
>>
>> I'm not against putting this in, but I'd like to understand what's going
>> on.
>>
>> Lukas, any idea?
>>
>
> Hi Christoph,
>
> the only reason I can think of is probably that Liu is accessing the
> xfstests directory via symbolic link, hence the '$content' addresses the
> symbolic link and cp is trying to overwrite the directory with
> non-directory (symlink).
>
> The fix is fine for both cases (xfstests as symlink and directory), confirmed
> with a simple test.
>
Sorry for not showing the full story in changelog, but symbolic link is the point:
[root@kvm tmp]# ll XFStests
lrwxrwxrwx 1 root root 32 Jan 1 09:48 XFStests -> /home/kvm_img/liub/xfstests-dev/
thanks,
liubo
> Thanks!
> -Lukas
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-12 1:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 11:39 [PATCH] xfstests: fix 251's cp -axT problem Liu Bo
2012-01-11 11:45 ` Christoph Hellwig
2012-01-11 12:14 ` Lukas Czerner
2012-01-12 1:16 ` Liu Bo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox