aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-11-19 17:34:33 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-11-19 17:34:33 -0400
commit7736fb804a708512409020b0f06352ece154cb67 (patch)
tree1c2d70207af48b87d4a11d6219284e49bd880193
parent6931c9ac16d21a64a3bf5f08a40e72416b4ca0f1 (diff)
devblog
-rw-r--r--doc/devblog/day_60__damage_driven_development.mdwn36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/devblog/day_60__damage_driven_development.mdwn b/doc/devblog/day_60__damage_driven_development.mdwn
new file mode 100644
index 000000000..64460e86a
--- /dev/null
+++ b/doc/devblog/day_60__damage_driven_development.mdwn
@@ -0,0 +1,36 @@
+Wrote some evil code you don't want to run today. Git.Destroyer randomly
+generates Damage, and applies it to a git repository, in a way that is
+reproducible -- applying the same Damage to clones of the same git repo
+will always yeild the same result.
+
+This let me build a test harness for git-repair, which repeatedly clones,
+damages, and repairs a repository. And when it fails, I can just ask it to
+retry after fixing the bug and it'll re-run every attempt it's logged.
+
+This is already yeilding improvements to the git-repair code.
+The first randomly constructed Damage that it failed to recover
+turned out to be a truncated index file that hid some other
+corrupted object files from being repaired.
+
+ [Damage Empty (FileSelector 1),
+ Damage Empty (FileSelector 2),
+ Damage Empty (FileSelector 3),
+ Damage Reverse (FileSelector 3),
+ Damage (ScrambleFileMode 3) (FileSelector 5),
+ Damage Delete (FileSelector 9),
+ Damage (PrependGarbage "¥SOH¥STX¥ENQ¥f¥a¥ACK¥b¥DLE¥n") (FileSelector 9),
+ Damage Empty (FileSelector 12),
+ Damage (CorruptByte 11 25) (FileSelector 6),
+ Damage Empty (FileSelector 5),
+ Damage (ScrambleFileMode 4294967281) (FileSelector 14)
+ ]
+
+I need to improve the ranges of files that it damages -- currently QuickCheck
+seems to only be selecting one of the first 20 or so files. Also, it's quite
+common that it will damage `.git/config` so badly that git thinks it's not
+a git repository anymore. I am not sure if that is something `git-repair`
+should try to deal with.
+
+---
+
+Today's work was sponsored by the WikiMedia Foundation.