Index: test/pyregfi-smoketest.py
===================================================================
--- test/pyregfi-smoketest.py	(revision 219)
+++ test/pyregfi-smoketest.py	(revision 220)
@@ -8,4 +8,36 @@
 def usage():
     sys.stderr.write("USAGE: pyregfi-smoketest.py hive1 [hive2 ...]\n")
+
+
+
+
+# Uses the HiveIterator to walk all keys
+# Gathers various (meaningless) statistics to exercise simple attribute access
+# and to hopefully smoke out any bugs that can be identified by changing stats
+def iterTallyNames(hive):
+    key_count = 0
+    key_lens = 0
+    key_rawlens = 0
+    value_count = 0
+    value_lens = 0
+    value_rawlens = 0
+
+    for k in hive:
+        key_count += 1
+        if k.name != None:
+            key_lens += len(k.name)
+        if k.name_raw != None:
+            key_rawlens += len(k.name_raw)
+
+        for v in k.values:
+            value_count += 1
+            if v.name != None:
+                value_lens += len(v.name)
+            if v.name_raw != None:
+                value_rawlens += len(v.name_raw)
+
+    print("  Counts: keys=%d, values=%d" % (key_count, value_count))
+    print("  Total name length: keys=%d, values=%d" % (key_lens, value_lens))
+    print("  Total raw name lengths: keys=%d, values=%d" % (key_rawlens, value_rawlens))
 
 
@@ -23,35 +55,4 @@
 
     return path
-
-
-# Uses the HiveIterator to walk all keys
-# Gathers various (meaningless) statistics to exercise simple attribute access
-# and to hopefully smoke out any bugs that can be identified by changing stats
-def iterTallyNames(hive):
-    key_count = 0
-    key_lens = 0
-    key_rawlens = 0
-    value_count = 0
-    value_lens = 0
-    value_rawlens = 0
-
-    for k in hive:
-        key_count += 1
-        if k.name != None:
-            key_lens += len(k.name)
-        if k.name_raw != None:
-            key_rawlens += len(k.name_raw)
-
-        for v in k.values:
-            value_count += 1
-            if v.name != None:
-                value_lens += len(v.name)
-            if v.name_raw != None:
-                value_rawlens += len(v.name_raw)
-
-    print("  Counts: keys=%d, values=%d" % (key_count, value_count))
-    print("  Total name length: keys=%d, values=%d" % (key_lens, value_lens))
-    print("  Total raw name lengths: keys=%d, values=%d" % (key_rawlens, value_rawlens))
-
 
 # For each key in the hive, this traverses the parent links up to the root, 
@@ -154,4 +155,33 @@
     print("  Modified stat: %f" % modified_stat)
 
+
+
+def iterIterWalk(hive):
+    sk_stat = 0.0
+    v_stat = 0.0
+    iter = pyregfi.HiveIterator(hive)
+    for k in iter:
+        path = getCurrentPath(k)
+        try:
+            hive_iter = hive.subtree(path)
+            sk = hive_iter.first_subkey()
+            while sk != None:
+                ssk = hive_iter.find_subkey(sk.name)
+                sk_stat += len(ssk.name)
+                sk = hive_iter.next_subkey()
+
+            v = hive_iter.first_value()
+            while v != None:
+                vv = hive_iter.find_value(v.name)
+                v_stat += len(vv.name)
+                v = hive_iter.next_value()
+
+        except Exception as e:
+            print("WARNING: Could not decend to path '%s'.\nError:\n %s\n%s" % (path,e.args,e))
+    print("   Subkey stat: %f" % sk_stat)
+    print("   Value stat: %f" % v_stat)
+
+
+
 if len(sys.argv) < 2:
     usage()
@@ -159,6 +189,13 @@
 
 
-#tests = [("iterTallyNames",iterTallyNames),("iterParentWalk",iterParentWalk),("iterTallyData",iterTallyData),("recurseKeyTally",recurseKeyTally),("iterFetchRelated",iterFetchRelated),]
-tests = [("iterFetchRelated",iterFetchRelated),]
+tests = [("iterTallyNames",iterTallyNames),
+         ("iterParentWalk",iterParentWalk),
+         ("iterTallyData",iterTallyData),
+         ("recurseKeyTally",recurseKeyTally),
+         ("iterFetchRelated",iterFetchRelated),
+         ("iterIterWalk",iterIterWalk),]
+
+tests = [("iterIterWalk",iterIterWalk),]
+
 
 files = []
