Project

General

Profile

Actions

Bug #81997

open
VS VS

qa/mount: compare_trees does not compare trees

Bug #81997: qa/mount: compare_trees does not compare trees

Added by Venky Shankar about 1 month ago. Updated about 1 month ago.

Status:
Fix Under Review
Priority:
Normal
Assignee:
Category:
Testing
Target version:
Due date:
% Done:

0%

Source:
Development
Backport:
umbrella
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
qa
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:

Description

qa/tasks/cephfs/mount.py::compare_trees() has:

                                                                                                                                                                          
exists = os.path.exists(dst_file)                                                                                                                                                                
lexists = os.path.lexists(dst_file)                                                                                                                                                              
if not exists and not lexists:                                                                                                                                                                   
     log.debug('path_dne:=' + dst_file)                                                                                                                                                           
     raise                                                                                                                                                                                        

if os.path.islink('{src}'):                                                                                                                                                                      
    #do link check                                                                                                                                                                               
    if os.readlink(src_file) != os.readlink(dst_file):                                                                                                                                           
        raise                                                                                                                                                                                    
elif os.path.isfile('{src}'):                                                                                                                                                                    
    #check reported size                                                                                                                                                                         
    rsize_match = os.path.getsize(src_file) == os.path.getsize(dst_file)                                                                                                                         
    if not rsize_match:                                                                                                                                                                          
        raise    

"src" is the passed in directory. The loop still checks that each name from os.listdir('{src}') exists in the destination. A copied tree with the right filenames and the wrong bytes passes.

VS Updated by Venky Shankar about 1 month ago Actions #1

  • Labels (FS) qa added

VS Updated by Venky Shankar about 1 month ago Actions #2

  • Status changed from In Progress to Fix Under Review
  • Pull request ID set to 72998

VS Updated by Venky Shankar about 1 month ago Actions #3

  • Description updated (diff)

VS Updated by Venky Shankar about 1 month ago Actions #4

  • Backport set to umbrella
Actions

Also available in: PDF Atom