Commit Graph

2 Commits

Author SHA1 Message Date
Yaroslav Halchenko 6da37d013a btrfs-progs: run codespell throughout fixing typos automagically
Spell checking can now run in automated mode.

=== Do not change lines below ===
{
 "chain": [],
 "cmd": "codespell -w",
 "exit": 0,
 "extra_inputs": [],
 "inputs": [],
 "outputs": [],
 "pwd": "."
}
^^^ Do not change lines above ^^^

Author: Yaroslav Halchenko <debian@onerussian.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2024-07-18 16:19:05 +02:00
David Sterba 6f05548661 btrfs-progs: add error injection helper script
Add a convenience script for adding new injection cookies and filter for
actual testing.

- ./inject-error new - return new unique cookie
- ./inject-error file tune/change-csum.c - show all cookies in the given
  file (takes regexp)

Example usage:

  for i in $(./inject-error file tune/change-csum.c | awk '{print $1}') ; do
	  echo "Inject $i"
	  export INJECT="$i"
	  rm img
	  cp --reflink img.filled img
	  ./btrfstune --csum blake2 img
	  btrfs check img
  done

Where 'img' is a filesystem with sample files and directories.

Signed-off-by: David Sterba <dsterba@suse.com>
2023-07-27 14:45:29 +02:00