Index: /trunk/src/VBox/ValidationKit/utils/fs/FsPerf.cpp
===================================================================
--- /trunk/src/VBox/ValidationKit/utils/fs/FsPerf.cpp	(revision 78179)
+++ /trunk/src/VBox/ValidationKit/utils/fs/FsPerf.cpp	(revision 78180)
@@ -342,4 +342,5 @@
 {
     { "--dir",              'd', RTGETOPT_REQ_STRING  },
+    { "--relative-dir",     'r', RTGETOPT_REQ_NOTHING },
     { "--seconds",          's', RTGETOPT_REQ_UINT32  },
     { "--milliseconds",     'm', RTGETOPT_REQ_UINT64  },
@@ -496,4 +497,6 @@
 static bool         g_fIgnoreNoCache            = false;
 
+/** Set if g_szDir and friends are path relative to CWD rather than absolute. */
+static bool         g_fRelativeDir              = false;
 /** The length of g_szDir. */
 static size_t       g_cchDir;
@@ -4303,4 +4306,5 @@
         {
             case 'd':                           pszHelp = "The directory to use for testing.            default: CWD/fstestdir"; break;
+            case 'r':                           pszHelp = "Don't abspath test dir (good for deep dirs). default: disabled"; break;
             case 'e':                           pszHelp = "Enables all tests.                           default: -e"; break;
             case 'z':                           pszHelp = "Disables all tests.                          default: -e"; break;
@@ -4375,17 +4379,7 @@
      * Default values.
      */
-    rc = RTPathGetCurrent(g_szDir, sizeof(g_szDir) - FSPERF_MAX_NEEDED_PATH);
-    if (RT_SUCCESS(rc))
-        rc = RTPathAppend(g_szDir, sizeof(g_szDir) - FSPERF_MAX_NEEDED_PATH, "fstestdir-");
-    if (RT_SUCCESS(rc))
-    {
-        g_cchDir = strlen(g_szDir);
-        g_cchDir += RTStrPrintf(&g_szDir[g_cchDir], sizeof(g_szDir) - g_cchDir, "%u" RTPATH_SLASH_STR, RTProcSelf());
-    }
-    else
-    {
-        RTTestFailed(g_hTest, "RTPathGetCurrent (or RTPathAppend) failed: %Rrc\n", rc);
-        return RTTestSummaryAndDestroy(g_hTest);
-    }
+    char szDefaultDir[32];
+    const char *pszDir = szDefaultDir;
+    RTStrPrintf(szDefaultDir, sizeof(szDefaultDir), "fstestdir-%u" RTPATH_SLASH_STR, RTProcSelf());
 
     RTGETOPTUNION ValueUnion;
@@ -4397,13 +4391,10 @@
         {
             case 'd':
-                rc = RTPathAbs(ValueUnion.psz, g_szDir, sizeof(g_szDir) - FSPERF_MAX_NEEDED_PATH);
-                if (RT_SUCCESS(rc))
-                {
-                    RTPathEnsureTrailingSeparator(g_szDir, sizeof(g_szDir));
-                    g_cchDir = strlen(g_szDir);
-                    break;
-                }
-                RTTestFailed(g_hTest, "RTPathAbs(%s) failed: %Rrc\n", ValueUnion.psz, rc);
-                return RTTestSummaryAndDestroy(g_hTest);
+                pszDir = ValueUnion.psz;
+                break;
+
+            case 'r':
+                g_fRelativeDir = true;
+                break;
 
             case 's':
@@ -4617,4 +4608,19 @@
         }
     }
+
+    /*
+     * Populate g_szDir.
+     */
+    if (!g_fRelativeDir)
+        rc = RTPathAbs(pszDir, g_szDir, sizeof(g_szDir) - FSPERF_MAX_NEEDED_PATH);
+    else
+        rc = RTStrCopy(g_szDir, sizeof(g_szDir) - FSPERF_MAX_NEEDED_PATH, pszDir);
+    if (RT_FAILURE(rc))
+    {
+        RTTestFailed(g_hTest, "%s(%s) failed: %Rrc\n", g_fRelativeDir ? "RTStrCopy" : "RTAbsPath", pszDir, rc);
+        return RTTestSummaryAndDestroy(g_hTest);
+    }
+    RTPathEnsureTrailingSeparator(g_szDir, sizeof(g_szDir));
+    g_cchDir = strlen(g_szDir);
 
     /*
