Index: /trunk/src/VBox/Storage/testcase/vbox-img.cpp
===================================================================
--- /trunk/src/VBox/Storage/testcase/vbox-img.cpp	(revision 46519)
+++ /trunk/src/VBox/Storage/testcase/vbox-img.cpp	(revision 46520)
@@ -262,6 +262,6 @@
         return errorRuntime("Cannot create the virtual disk container: %Rrc\n", rc);
 
-
-    rc = VDOpen(pVD, pszFormat, pszFilename, VD_OPEN_FLAGS_NORMAL, NULL);
+    /* Open in info mode to be able to open diff images without their parent. */
+    rc = VDOpen(pVD, pszFormat, pszFilename, VD_OPEN_FLAGS_INFO, NULL);
     if (RT_FAILURE(rc))
         return errorRuntime("Cannot open the virtual disk image \"%s\": %Rrc\n",
@@ -956,5 +956,5 @@
 
     /* Open the image */
-    rc = VDOpen(pDisk, pszFormat, pszFilename, VD_OPEN_FLAGS_INFO, NULL);
+    rc = VDOpen(pDisk, pszFormat, pszFilename, VD_OPEN_FLAGS_INFO | VD_OPEN_FLAGS_READONLY, NULL);
     if (RT_FAILURE(rc))
         return errorRuntime("Error while opening the image: %Rrc\n", rc);
