Bug #78291 mysys_my_symlink-t fails on OS X
Submitted: 31 Aug 2015 13:28 Modified: 8 Sep 2015 9:38
Reporter: Dag Wanvik Email Updates:
Status: Closed Impact on me:
Category:Tests: Server Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any

[31 Aug 2015 13:28] Dag Wanvik
This unit test fails on OS X with the following assert

# Run 197 Mysys.MysysMySymlink
/Users/dwanvik/git/mysql/unittest/gunit/mysys_my_symlink-t.cc:43: FailureValue of: filename
  Actual: "/var/folders/j5/vp96xd9x5pg13hwpvyjrj6100000gn/T/gunit_mysys_symlinkWlZdXn"
Expected: resolvedname
Which is: "/private/var/folders/j5/vp96xd9x5pg13hwpvyjrj6100000gn/T/gunit_mysys_symlinkWlZdXn"
not ok 197

How to repeat:
CMake with -DMERGE_UNITTESTS=0 on OS X and run test:

  cd <build>/unittest/gunit

or if unit tests are merged:

  cd <build>/unittest/gunit
  ctest -R small

Suggested fix:
The test fails on OS X because it fails to consider that a filename
handed back by create_temp_file may be based on a symbolic link. In
this case, /var -> /private/var.

Adding an extra call to my_realpath before comparing with the resolved
symbolic link created by the test itself will solve the problem.
[8 Sep 2015 9:38] Jon Stephens
Fixed in trunk, currently tagged 5.8.0.

Affects testing only; no changelog entry needed.
[8 Sep 2015 9:39] Jon Stephens
Also fixed in 5.7.9.