[SERVER-11462] smoke tests not handling windows-style data directory paths well Created: 29/Oct/13  Updated: 11/Jul/16  Resolved: 01/Nov/13

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: 2.5.4
Fix Version/s: 2.5.4

Type: Bug Priority: Major - P3
Reporter: Adinoyi Omuya Assignee: Benety Goh
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows


Issue Links:
Related
is related to SERVER-9579 Smoke tests should always use --smoke... Closed
Operating System: Windows
Participants:

 Description   

2 issues:

1) MongoRunner.toRealPath() is returning an invalid path under Windows because it is assuming all absolute filesystem paths start with forward slash '/'. This is not true under Windows where an absolute path could start with backslash '\' or drive letter.

2) A number of tests in disk and tool test suites are doing comparisons on the full path of files returned from listFiles(). listFiles() unfortunately converts all native path separators to a generic forward slash which makes comparing with Windows-style paths inconvenient.

Resolution:

1) MongoRunner.toRealPath() now recognizes Windows drive letters and backslashes at the beginning of any paths it is given.
2) listFiles() now returns an additional field baseName which allows tests to check filenames without being affected by the normalization behavior.

See http://mci.10gen.com/ui/build/mongodb_mongo_master_windows_64_97c3a3d2b487e9376d484d33ede2895e379a3033_13_10_29_18_31_29

Tests are failing across all windows-64 buildvariants



 Comments   
Comment by auto [ 01/Nov/13 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-11462 use base name in tests where verifying filenames. also added base name to listFiles() result
Branch: master
https://github.com/mongodb/mongo/commit/6b7d6962a9c8836c54e678d3dddb297c3c76089c

Comment by Benety Goh [ 30/Oct/13 ]

MongoRunner.dataDir and MongoRunner.dataPath now follow local OS convention. On our Windows MCI instances, this defaults to D:\data\db and D:\data\db/ respectively.

Comment by auto [ 30/Oct/13 ]

Author:

{u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}

Message: SERVER-11462 fixed relative path detection in MongoRunner.toRealPath to handle Windows paths and drive letters
Branch: master
https://github.com/mongodb/mongo/commit/d22a2f3e9541470deb294ab30e08dd0fc5d627df

Comment by Ernie Hershey [ 29/Oct/13 ]

I'm guessing this is due to https://github.com/mongodb/mongo/commit/2e10439eba106c1edd57522f6c549fccb245b1a0

Generated at Thu Feb 08 03:25:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.