]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Add SnowMotion-specific SuperFGets logging
authorOliver Kurth <okurth@vmware.com>
Fri, 6 Jul 2018 22:02:36 +0000 (15:02 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 6 Jul 2018 22:02:36 +0000 (15:02 -0700)
Prior logging suggests vmx-side corruption prior to VM powerOn, so add
logging closer to the source to try to isolate the cause.

This includes a toggle that will be triggered in main and unset on VM
powerOn.

open-vm-tools/lib/include/vmstdio.h
open-vm-tools/lib/misc/vmstdio.c

index 944ddebb76b6d592338b3605d9ff2200a3de8d4e..84131e87b96cf52c1a7e0596be0efd29eeacfd24 100644 (file)
@@ -37,6 +37,8 @@ typedef enum {
    StdIO_Success,
 } StdIO_Status;
 
+void
+StdIO_ToggleSnowMotionLogging(Bool setting);
 
 StdIO_Status
 StdIO_ReadNextLine(FILE *stream,         // IN
index 5a04d7397db3eed22338df2a979c6d3948beaaf1..86af54771b4e53a666dddff20d73f5048bfd93aa 100644 (file)
 #include "vmware.h"
 #include "dynbuf.h"
 #include "vmstdio.h"
+#include "posixInt.h"
+
+
+static Bool SnowMotionLogging;
+
+/*
+ *-----------------------------------------------------------------------------
+ *
+ * StdIO_ToggleSnowMotionLogging --
+ *
+ *    SnowMotion-specific log toggling - as per PR#2121674 and 2108730, vmx
+ *    corruption appears to occur at some arbitrary point prior to VM powerOn,
+ *    but only in CAT - it has not been reproducible locally or via manually
+ *    triggered Nimbus testruns.
+ *
+ *    To try to isolate the corruption point, add a toggled logging mechanism
+ *    that will dump the results of SuperFGets for the interval between
+ *    main initializing and VM powerOn.
+ *
+ *    This is a strictly temporary mechanism to provide the necessary logging
+ *    to debug this issue.
+ *
+ *-----------------------------------------------------------------------------
+ */
+
+void
+StdIO_ToggleSnowMotionLogging(Bool setting)   // IN:
+{
+   SnowMotionLogging = setting;
+}
 
 
 /*
@@ -135,6 +165,10 @@ SuperFgets(FILE *stream,   // IN:
 
    *count = size;
 
+   if (SnowMotionLogging) {
+      Log("%s: Parsed line %s", __FUNCTION__, buf);
+   }
+
    return buf;
 }