nextcloud-desktop/test/scripts
Christian Kamm 22f71ce17e t9.pl: Make more reliable
Sometimes the 'touch' didn't change the mtime since too little time had
passed!
2017-10-05 14:13:10 +02:00
..
references Add torture scripts + standard layout files 2013-06-05 21:36:55 +02:00
txpl t9.pl: Make more reliable 2017-10-05 14:13:10 +02:00
README.rst Minor typos in client test section 2015-09-10 18:11:44 +05:45
torture_create_files.pl License: Adjust license of GPLv2 source files to GPLv2+ 2016-10-25 11:06:54 +02:00
torture_gen_layout.pl License: Adjust license of GPLv2 source files to GPLv2+ 2016-10-25 11:06:54 +02:00

Torture for ownCloud Client

This is a set of scripts comprising of two parts:

  • torture_gen_layout.pl: Generation of layout files (random)
  • torture_create_files.pl: Generation of a real file tree based on the layout files (deterministic)

These scripts allow a data set to be produced with the following criteria:

  • realistic in naming
  • realistic in file size
  • realistic in structural size

without checking in the actual data. Instead, a layout file that gets generated once (reference.lay) is checked in. This makes it possible to produce standardized benchmarks for mirall. It allows checking for files gone missing in action and other kinds of corruption produced during sync runs.

torture_create_files.pl can be fine tuned via variables in the script header. It sources its file names from dict wordlist, file extensions and other parameters can be added as needed. The defaults should be reasonable in terms of size.

The references/ directory contains default folder layouts.

Usage

In order to create a reference layout and create a tree from it:

./torture_gen_layout.pl > reference.lay
./torture_create_files.pl reference.lay <targetdir>

TODO

  • Based on the layout file, write a validator that checks files for existence and size without requiring a full reference tree to be created via ./torture_gen_layout.pl.
  • The current file naming is fairly tame (i.e. almost within ASCII range). Extending it randomly is dangerous, we first need to filter all characters forbidden by various OSes. Or maybe not, because we want to see what happens? :-). Anyway, you have been warned.