6 years agodfsm: Redefine arithmetic to saturate rather than overflow
Philip Withnall [Sun, 26 Feb 2012 10:58:34 +0000 (10:58 +0000)]
dfsm: Redefine arithmetic to saturate rather than overflow

This also redefines the behaviour of the modulus operator, and tidies up some
implementations which relied on undefined behaviour in C.

6 years agodfsm: Fix lexing of negative numbers
Philip Withnall [Sat, 25 Feb 2012 22:10:05 +0000 (22:10 +0000)]
dfsm: Fix lexing of negative numbers

6 years agobuild: Add some missing files to EXTRA_DIST
Philip Withnall [Sat, 25 Feb 2012 17:56:51 +0000 (17:56 +0000)]
build: Add some missing files to EXTRA_DIST

6 years agodfsm: Add tests of the scheduling algorithm
Philip Withnall [Sat, 25 Feb 2012 17:55:28 +0000 (17:55 +0000)]
dfsm: Add tests of the scheduling algorithm

6 years agodfsm: Add fuzzing test suite
Philip Withnall [Sat, 25 Feb 2012 17:04:50 +0000 (17:04 +0000)]
dfsm: Add fuzzing test suite

6 years agodfsm: Implement proper fuzzing for object paths and type signatures
Philip Withnall [Sat, 25 Feb 2012 17:04:15 +0000 (17:04 +0000)]
dfsm: Implement proper fuzzing for object paths and type signatures

6 years agodfsm: Fix dfsm_ast_transition_get_preconditions() in the documentation
Philip Withnall [Sat, 25 Feb 2012 17:03:36 +0000 (17:03 +0000)]
dfsm: Fix dfsm_ast_transition_get_preconditions() in the documentation

6 years agodfsm: Add a getter method for the statements in a DfsmAstTransition
Philip Withnall [Sat, 25 Feb 2012 17:02:55 +0000 (17:02 +0000)]
dfsm: Add a getter method for the statements in a DfsmAstTransition

6 years agodfsm: Add getter methods for children of DfsmAstStatementAssignment
Philip Withnall [Sat, 25 Feb 2012 17:02:11 +0000 (17:02 +0000)]
dfsm: Add getter methods for children of DfsmAstStatementAssignment

6 years agodfsm: Factor out some common testing code into a new test-utils.c file
Philip Withnall [Sat, 25 Feb 2012 12:08:42 +0000 (12:08 +0000)]
dfsm: Factor out some common testing code into a new test-utils.c file

6 years agodfsm: Add tests for DfsmOutputSequence usage in AST execution
Philip Withnall [Sat, 25 Feb 2012 11:58:43 +0000 (11:58 +0000)]
dfsm: Add tests for DfsmOutputSequence usage in AST execution

6 years agodfsm: Add tests for parser error handling
Philip Withnall [Sat, 25 Feb 2012 10:52:09 +0000 (10:52 +0000)]
dfsm: Add tests for parser error handling

6 years agodfsm: Disallow ‘throwing’ clauses on non-method-triggered preconditions
Philip Withnall [Sat, 25 Feb 2012 10:51:17 +0000 (10:51 +0000)]
dfsm: Disallow ‘throwing’ clauses on non-method-triggered preconditions

For the same reason we disallow ‘throw’ statements in those transitions too.

6 years agodfsm: Move parser-test.machine into ast.c
Philip Withnall [Sat, 25 Feb 2012 10:08:25 +0000 (10:08 +0000)]
dfsm: Move parser-test.machine into ast.c

This makes the tests a little more fine-grained.

6 years agodoc: Mention the interim location for the manual in the README
Philip Withnall [Sun, 19 Feb 2012 23:07:16 +0000 (23:07 +0000)]
doc: Mention the interim location for the manual in the README

6 years agobuild: Add to the build
Philip Withnall [Sun, 19 Feb 2012 21:04:32 +0000 (21:04 +0000)]
build: Add to the build

6 years agobendy-bus: Expand and improve the bendy-bus user manual
Philip Withnall [Sun, 19 Feb 2012 21:02:34 +0000 (21:02 +0000)]
bendy-bus: Expand and improve the bendy-bus user manual

6 years agomachines: Add support for SetAliases and SetContactInfo to Telepathy machines
Philip Withnall [Sun, 19 Feb 2012 15:06:13 +0000 (15:06 +0000)]
machines: Add support for SetAliases and SetContactInfo to Telepathy machines

6 years agomachines: Add support for RequestHandles and AddMembers to Telepathy machines
Philip Withnall [Sun, 19 Feb 2012 15:04:57 +0000 (15:04 +0000)]
machines: Add support for RequestHandles and AddMembers to Telepathy machines

6 years agomachines: s/cmname/cm/ and s/proto/protocol/ in the Telepathy machines
Philip Withnall [Sun, 19 Feb 2012 14:55:54 +0000 (14:55 +0000)]
machines: s/cmname/cm/ and s/proto/protocol/ in the Telepathy machines

This is for consistency with the libfolks test suite, so that we can re-use
as much of the Telepathy machines between bendy-bus and the test suite as

6 years agodfsm: Fix dependency loop with DfsmEnvironment/DfsmAstExpression better
Philip Withnall [Sun, 19 Feb 2012 13:27:43 +0000 (13:27 +0000)]
dfsm: Fix dependency loop with DfsmEnvironment/DfsmAstExpression better

…by splitting DfsmEnvironment’s function handling methods out into a separate
header file.

6 years agobendy-bus: Expand the Bendy Bus manual
Philip Withnall [Sun, 19 Feb 2012 13:08:05 +0000 (13:08 +0000)]
bendy-bus: Expand the Bendy Bus manual

The pages describing the simulation language are mostly complete, excluding
sections on data structures, built-in functions, D-Bus interfaces and

This also includes some additions to the Makefile to allow the documentation
to be compiled to HTML if yelp-tools are installed.

6 years agobuild: Add Mallard support to bendy-bus
Philip Withnall [Sun, 19 Feb 2012 00:15:31 +0000 (00:15 +0000)]
build: Add Mallard support to bendy-bus

This includes the beginnings of a user manual, including language

6 years agodocs: Add missing documentation comments to libdfsm
Philip Withnall [Sat, 18 Feb 2012 23:10:31 +0000 (23:10 +0000)]
docs: Add missing documentation comments to libdfsm

6 years agodocs: Various minor fixes to the libdfsm documentation
Philip Withnall [Sat, 18 Feb 2012 22:31:36 +0000 (22:31 +0000)]
docs: Various minor fixes to the libdfsm documentation

6 years agodfsm: Manually expand out DFSM_CONSTRUCTOR function attribute
Philip Withnall [Sat, 18 Feb 2012 22:24:29 +0000 (22:24 +0000)]
dfsm: Manually expand out DFSM_CONSTRUCTOR function attribute

gtk-doc was choking on it, so we manually expand it out in all headers and
remove the original definition of it.

6 years agodfsm: Add a missing symbol to dfsm.symbols
Philip Withnall [Sat, 18 Feb 2012 22:07:51 +0000 (22:07 +0000)]
dfsm: Add a missing symbol to dfsm.symbols

6 years agobuild: Add gtk-doc support to libdfsm
Philip Withnall [Sat, 18 Feb 2012 22:07:36 +0000 (22:07 +0000)]
build: Add gtk-doc support to libdfsm

6 years agodfsm: Fix handling of already-owned well-known names on the bus
Philip Withnall [Sat, 18 Feb 2012 13:49:58 +0000 (13:49 +0000)]
dfsm: Fix handling of already-owned well-known names on the bus

We previously didn't handle failure to grab a well-known name, which caused
problems when registering/unregistering objects in a tight loop (and leaking
some of the registrations).

6 years agodfsm: Add signals to DfsmObject and DfsmMachine for control over transitions
Philip Withnall [Sat, 18 Feb 2012 13:48:35 +0000 (13:48 +0000)]
dfsm: Add signals to DfsmObject and DfsmMachine for control over transitions

This allows client applications (such as unit tests) to programmatically
control which transitions are made by the simulation, or to selectively
override certain transitions with their own implementation.

6 years agodfsm: Add a dictToTupleArray() built-in function
Philip Withnall [Sat, 18 Feb 2012 13:39:30 +0000 (13:39 +0000)]
dfsm: Add a dictToTupleArray() built-in function

6 years agodfsm: Add a pkgconfig file
Philip Withnall [Thu, 16 Feb 2012 15:41:47 +0000 (15:41 +0000)]
dfsm: Add a pkgconfig file

6 years agomachines: Delete some unreachable states found by bendy-bus-lint
Philip Withnall [Mon, 6 Feb 2012 22:40:47 +0000 (22:40 +0000)]
machines: Delete some unreachable states found by bendy-bus-lint

6 years agobendy-bus-lint: Check for and error on unreachable states in any object
Philip Withnall [Mon, 6 Feb 2012 22:40:22 +0000 (22:40 +0000)]
bendy-bus-lint: Check for and error on unreachable states in any object

6 years agodfsm: Comment out debug code
Philip Withnall [Mon, 6 Feb 2012 22:39:57 +0000 (22:39 +0000)]
dfsm: Comment out debug code

6 years agodfsm: Implement state reachability checking for DfsmMachines
Philip Withnall [Sun, 5 Feb 2012 18:23:15 +0000 (18:23 +0000)]
dfsm: Implement state reachability checking for DfsmMachines

This allows the reachability of the various states in the DfsmMachine to
be statically checked. This is implemented using a modified form of
Dijkstra's algorithm.

6 years agodfsm: Fix a comment
Philip Withnall [Sun, 5 Feb 2012 14:51:20 +0000 (14:51 +0000)]
dfsm: Fix a comment

6 years agodfsm: Add some parser/lexer tests
Philip Withnall [Sun, 5 Feb 2012 13:34:14 +0000 (13:34 +0000)]
dfsm: Add some parser/lexer tests

6 years agodfsm: Fix lexing of non-ASCII strings
Philip Withnall [Sun, 5 Feb 2012 13:03:50 +0000 (13:03 +0000)]
dfsm: Fix lexing of non-ASCII strings

6 years agodfsm: Remove unused lines from dfsm-flex.l
Philip Withnall [Sun, 5 Feb 2012 12:48:27 +0000 (12:48 +0000)]
dfsm: Remove unused lines from dfsm-flex.l

6 years agodfsm: Use a normal distribution for transition timeouts
Philip Withnall [Sun, 5 Feb 2012 12:41:15 +0000 (12:41 +0000)]
dfsm: Use a normal distribution for transition timeouts

This tightens the peak around 100ms timeouts which should reduce the number
of times we pointlessly wait longer periods between transitions.

This uses the Box–Muller method to generate values from a normal
distribution, and adds a dependency on libm.

6 years agobendy-bus: Really fix stop_simulation()
Philip Withnall [Thu, 2 Feb 2012 22:59:23 +0000 (22:59 +0000)]
bendy-bus: Really fix stop_simulation()

6 years agobendy-bus: Fix stop_simulation() if it’s called multiple times
Philip Withnall [Tue, 31 Jan 2012 18:11:32 +0000 (18:11 +0000)]
bendy-bus: Fix stop_simulation() if it’s called multiple times

6 years agobendy-bus: Fix test program working directory
Philip Withnall [Sun, 29 Jan 2012 13:29:45 +0000 (13:29 +0000)]
bendy-bus: Fix test program working directory

6 years agomachines: Update Telepathy machines to work a little better
Philip Withnall [Sat, 28 Jan 2012 23:27:56 +0000 (23:27 +0000)]
machines: Update Telepathy machines to work a little better

6 years agodfsm: Fix a GVariant ref-counting problem
Philip Withnall [Sat, 28 Jan 2012 23:27:34 +0000 (23:27 +0000)]
dfsm: Fix a GVariant ref-counting problem

6 years agodfsm: Fix string fuzzing for Unicode strings
Philip Withnall [Sat, 28 Jan 2012 23:26:50 +0000 (23:26 +0000)]
dfsm: Fix string fuzzing for Unicode strings

I completely messed up the block separation character replacement mode the
first time round. Let’s have another go.

6 years agomachines: Tidy up machines and formalise normal and full variants
Philip Withnall [Sat, 28 Jan 2012 22:22:32 +0000 (22:22 +0000)]
machines: Tidy up machines and formalise normal and full variants

The full variants have all the error-throwing transitions, whereas the normal
variants don’t.

6 years agobendy-bus: Add a --unfuzzed-transition-limit parameter
Philip Withnall [Sat, 28 Jan 2012 21:37:10 +0000 (21:37 +0000)]
bendy-bus: Add a --unfuzzed-transition-limit parameter

See the previous commit.

6 years agodfsm: Add support for enabling fuzzing after a certain number of transitions
Philip Withnall [Sat, 28 Jan 2012 21:35:29 +0000 (21:35 +0000)]
dfsm: Add support for enabling fuzzing after a certain number of transitions

Before fuzzing is enabled, no data structure fuzzing takes place, and no
error-throwing transitions are executed (if at all possible; if they're the
only option, then they will be executed). This should allow for experiments
into the depth of the test program's state space which we can reach.

6 years agodfsm: Fix string length in the string fuzzer
Philip Withnall [Sat, 28 Jan 2012 16:04:32 +0000 (16:04 +0000)]
dfsm: Fix string length in the string fuzzer

6 years agodfsm: Add a string fuzzing mode which replaces letters with block separators
Philip Withnall [Sat, 28 Jan 2012 12:57:09 +0000 (12:57 +0000)]
dfsm: Add a string fuzzing mode which replaces letters with block separators

This might provoke some bugs in EDS’ vCard parsing code, specifically in its
handling of quoted-printable line encodings.

6 years agodfsm: Fix floating point comparison in dfsm-probabilities.h
Philip Withnall [Sat, 28 Jan 2012 12:56:25 +0000 (12:56 +0000)]
dfsm: Fix floating point comparison in dfsm-probabilities.h

We should be comparing the absolute difference to DBL_EPSILON, rather than
asserting the two floating point numbers are bitwise equal.

6 years agodfsm: Add more block separator characters for string fuzzing
Philip Withnall [Sat, 28 Jan 2012 12:19:56 +0000 (12:19 +0000)]
dfsm: Add more block separator characters for string fuzzing

6 years agodfsm: Fix some hash table unref problems
Philip Withnall [Fri, 27 Jan 2012 09:11:16 +0000 (09:11 +0000)]
dfsm: Fix some hash table unref problems

6 years agobendy-bus: Adapt to changes in the DfsmObject API
Philip Withnall [Thu, 26 Jan 2012 21:57:42 +0000 (21:57 +0000)]
bendy-bus: Adapt to changes in the DfsmObject API

As per commit fe5e1b598b6b901fdb04f273495be407d13235bb.

6 years agodfsm: Move well-known bus name ownership into dfsm_object_register_on_bus()
Philip Withnall [Thu, 26 Jan 2012 21:57:05 +0000 (21:57 +0000)]
dfsm: Move well-known bus name ownership into dfsm_object_register_on_bus()

It’s inherently a part of the simulation, so shouldn’t be left to clients.

6 years agodfsm: Use transition nicknames in debug messages
Philip Withnall [Thu, 26 Jan 2012 17:58:23 +0000 (17:58 +0000)]
dfsm: Use transition nicknames in debug messages

6 years agobuild: Make sure all public headers are actually installed
Philip Withnall [Thu, 26 Jan 2012 17:43:07 +0000 (17:43 +0000)]
build: Make sure all public headers are actually installed

6 years agodfsm: Add support for nicknames on fuzzy data structures
Philip Withnall [Thu, 26 Jan 2012 17:38:58 +0000 (17:38 +0000)]
dfsm: Add support for nicknames on fuzzy data structures

This will allow them to be looked up more easily in unit tests.

6 years agodfsm: Add support for nicknames on DfsmAstObjectTransitions
Philip Withnall [Thu, 26 Jan 2012 17:05:01 +0000 (17:05 +0000)]
dfsm: Add support for nicknames on DfsmAstObjectTransitions

This will allow them to be looked up more easily in unit tests.

6 years agobendy-bus: Add a SIGKILL on a timeout when stopping the simulation
Philip Withnall [Thu, 26 Jan 2012 16:37:45 +0000 (16:37 +0000)]
bendy-bus: Add a SIGKILL on a timeout when stopping the simulation

Sometimes the test program won’t respond to SIGTERM. Since we now wait for
notification that the child process has died, the simulation will continue
running forever in this case. This is bad. Consequently, we now send a
SIGKILL to the child process after a 15 second timeout if it doesn’t respond

This does mean that the process won’t (for example) write out code coverage
files (since a process has to exit cleanly to do that), but in this situation
we can never hope to get those anyway. It’s better to kill the process and
just start on another test run than continue on the current one indefinitely.

6 years agobendy-bus: Wait for test program to die before stopping the simulation
Philip Withnall [Wed, 25 Jan 2012 20:37:54 +0000 (20:37 +0000)]
bendy-bus: Wait for test program to die before stopping the simulation

When we want to stop the simulation, we need to send SIGTERM to the test
program, _and then wait for it to die_ before we continue shutting down the
simulation. This is because test programs may handle SIGTERM and spend a
while shutting themselves down. Evolution does, for example.

If programs do that but we continue to shut down without waiting for them,
when running bendy-bus-lcov, we'll end up trying to process the test
program's .gcda files before the program has written them yet.

6 years agomachines: Add some more structure to eds-address-book.machine’s vCards
Philip Withnall [Wed, 25 Jan 2012 16:57:33 +0000 (16:57 +0000)]
machines: Add some more structure to eds-address-book.machine’s vCards

Built the fuzzy vCard strings from a fuzzed array of valid vCard properties.

This assumes that EDS’ vCard parser is very reliable when it comes to
handling invalidly-structured vCards. Instead, we now concentrate on slipping
invalid property values (or invalid combinations of properties) past the
parser and deeper into EDS.

6 years agodfsm: Add a new stringJoin() built-in function
Philip Withnall [Wed, 25 Jan 2012 16:56:12 +0000 (16:56 +0000)]
dfsm: Add a new stringJoin() built-in function

This will join together all the strings in an array, using an optional
separator string.

6 years agomachines: Update eds-address-book.machine to EDS address book API v3
Philip Withnall [Tue, 24 Jan 2012 00:49:46 +0000 (00:49 +0000)]
machines: Update eds-address-book.machine to EDS address book API v3

6 years agobendy-bus: Add more pass-through environment pairs
Philip Withnall [Tue, 24 Jan 2012 00:37:48 +0000 (00:37 +0000)]
bendy-bus: Add more pass-through environment pairs

Ensure we cover the entire XDG spec.

6 years agomachines: Add AddressBookView support to eds-address-book.machine
Philip Withnall [Mon, 23 Jan 2012 23:33:50 +0000 (23:33 +0000)]
machines: Add AddressBookView support to eds-address-book.machine

This completes eds-address-book.machine, albeit commenting out some of the
code which checks book creation in the process.

6 years agomachines: Remove generic D-Bus interfaces from eds-address-book.xml
Philip Withnall [Mon, 23 Jan 2012 23:28:50 +0000 (23:28 +0000)]
machines: Remove generic D-Bus interfaces from eds-address-book.xml

6 years agodfsm: Ignore some warnings in generated Bison and Flex code
Philip Withnall [Mon, 23 Jan 2012 23:25:31 +0000 (23:25 +0000)]
dfsm: Ignore some warnings in generated Bison and Flex code

6 years agodfsm: Allow multiple consecutive string literals in the syntax
Philip Withnall [Mon, 23 Jan 2012 23:24:26 +0000 (23:24 +0000)]
dfsm: Allow multiple consecutive string literals in the syntax

Concatenate them in the parser and treat them as a single long string.
This is just syntactic sugar to make multi-line strings nicer.

6 years agodfsm: Use call-by-reference for the pairKeys() built-in function
Philip Withnall [Mon, 23 Jan 2012 21:34:04 +0000 (21:34 +0000)]
dfsm: Use call-by-reference for the pairKeys() built-in function

6 years agodfsm: Pass AST expressions to built-in functions rather than GVariants
Philip Withnall [Mon, 23 Jan 2012 21:17:48 +0000 (21:17 +0000)]
dfsm: Pass AST expressions to built-in functions rather than GVariants

This allows for functions to be implemented as call-by-reference rather
than call-by-value as appropriate.

This commit in itself doesn't change any simulation behaviour. Subsequent
commits may change the behaviour of individual built-in functions.

6 years agodfsm: Re-work how D-Bus signal emissions & method replies are handled
Philip Withnall [Mon, 23 Jan 2012 20:01:59 +0000 (20:01 +0000)]
dfsm: Re-work how D-Bus signal emissions & method replies are handled

We now pass a DfsmOutputSequence object down to the DfsmMachine, and all
the effects of its statements are appended to a list in the
DfsmOutputSequence. The caller can then evaluate the output sequence.

This allows the caller to have complete control over what actually happens
when emitting a D-Bus signal, or responding to a D-Bus method call, and
means it’s all handled nicely inside DfsmObject.

This also solves the problem whereby code like “reply; emit” would cause the
signal emission to happen before the D-Bus method reply, which was breaking
the EDS address book machine.

6 years agodfsm: Check data structures comprise only variables before assignment
Philip Withnall [Sun, 22 Jan 2012 23:52:51 +0000 (23:52 +0000)]
dfsm: Check data structures comprise only variables before assignment

6 years agodfsm: Trim error handling
Philip Withnall [Sun, 22 Jan 2012 23:22:39 +0000 (23:22 +0000)]
dfsm: Trim error handling

It turns out that since we're especially strict about typing data structures,
we can trim a lot of GErrors from data structures and expressions, to the
point where we can guarantee zero runtime errors from anything smaller than
a statement.

At the moment, the only reason to keep GErrors in statement execution methods
is because they carry D-Bus error information up the stack. This is ugly and
needs to be killed.

6 years agodfsm: Fix lonely test case
Philip Withnall [Sun, 22 Jan 2012 18:57:20 +0000 (18:57 +0000)]
dfsm: Fix lonely test case

6 years agodfsm: Check interfaces defining trigger methods and emitted signals
Philip Withnall [Sun, 22 Jan 2012 18:51:53 +0000 (18:51 +0000)]
dfsm: Check interfaces defining trigger methods and emitted signals

6 years agomachines: Fix the machines to use the correct reply statement types
Philip Withnall [Sun, 22 Jan 2012 14:28:01 +0000 (14:28 +0000)]
machines: Fix the machines to use the correct reply statement types

6 years agodfsm: Check types of reply statements in the transitions
Philip Withnall [Sun, 22 Jan 2012 14:27:43 +0000 (14:27 +0000)]
dfsm: Check types of reply statements in the transitions

6 years agodfsm: Fix potential use of an uninitialised variable
Philip Withnall [Wed, 18 Jan 2012 21:26:07 +0000 (21:26 +0000)]
dfsm: Fix potential use of an uninitialised variable

6 years agomachines: Add some missing ‘reply’ statements to telepathy-cm_trimmed.machine
Philip Withnall [Wed, 18 Jan 2012 21:20:02 +0000 (21:20 +0000)]
machines: Add some missing ‘reply’ statements to telepathy-cm_trimmed.machine

6 years agobendy-bus: Add support for creating a working directory for the dbus-daemon
Philip Withnall [Wed, 18 Jan 2012 19:36:45 +0000 (19:36 +0000)]
bendy-bus: Add support for creating a working directory for the dbus-daemon

This includes outputting a fake config.xml file for it to use.

6 years agobendy-bus: Tidy up option_env_parse_cb() a little
Philip Withnall [Wed, 18 Jan 2012 18:43:18 +0000 (18:43 +0000)]
bendy-bus: Tidy up option_env_parse_cb() a little

6 years agodfsm: Add some missing documentation
Philip Withnall [Wed, 18 Jan 2012 18:34:51 +0000 (18:34 +0000)]
dfsm: Add some missing documentation

6 years agodfsm: Fix dfsm_ast_expression_data_structure_set_from_variant()
Philip Withnall [Wed, 18 Jan 2012 18:16:07 +0000 (18:16 +0000)]
dfsm: Fix dfsm_ast_expression_data_structure_set_from_variant()

6 years agodfsm: Weight chosen transitions by whether they contain ‘throw’ statements
Philip Withnall [Wed, 18 Jan 2012 17:17:02 +0000 (17:17 +0000)]
dfsm: Weight chosen transitions by whether they contain ‘throw’ statements

We may get further into a client program’s state space by following
transitions which don’t just end up in the client program’s error handling

6 years agodfsm: Check numbers of ‘reply’ and ‘throw’ statements in each transition
Philip Withnall [Wed, 18 Jan 2012 16:26:39 +0000 (16:26 +0000)]
dfsm: Check numbers of ‘reply’ and ‘throw’ statements in each transition

There must be exactly one in every method-triggered transition, and none in
every property-triggered and random transition.

6 years agomachines: Add beginnings of an EDS address book machine
Philip Withnall [Tue, 17 Jan 2012 21:43:52 +0000 (21:43 +0000)]
machines: Add beginnings of an EDS address book machine

6 years agodfsm: Remove syntactical regexp support
Philip Withnall [Tue, 17 Jan 2012 13:59:29 +0000 (13:59 +0000)]
dfsm: Remove syntactical regexp support

The original intention with regexps was to allow fuzzy strings to be
generated which were accepted by the regexps, allowing a (relatively)
concise way of fuzzing structured data.

However, this need is fairly well covered by default values and fuzzing of
structural strings (by treating them as blocks of text).

Generating strings to match a given regexp is hard, though there are
libraries to achieve it. At this point, it's not worth putting the time into
getting that working. I've got other deadlines to meet.

6 years agodfsm: Split probability distribution code out into a separate file
Philip Withnall [Mon, 16 Jan 2012 23:22:46 +0000 (23:22 +0000)]
dfsm: Split probability distribution code out into a separate file

Tidy it up and add some sanity checking to it.

Yay for macros!

6 years agodfsm: Add fuzzing of variant types
Philip Withnall [Mon, 16 Jan 2012 17:34:37 +0000 (17:34 +0000)]
dfsm: Add fuzzing of variant types

6 years agomachines: Add Conn.I.ContactInfo support to telepathy-cm_trimmed.machine
Philip Withnall [Mon, 16 Jan 2012 17:15:45 +0000 (17:15 +0000)]
machines: Add Conn.I.ContactInfo support to telepathy-cm_trimmed.machine

6 years agodfsm: Really fix Unicode character generation this time
Philip Withnall [Sun, 15 Jan 2012 17:32:37 +0000 (17:32 +0000)]
dfsm: Really fix Unicode character generation this time

No, really.

6 years agodfsm: Return boundary numbers when fuzzing integers more often
Philip Withnall [Sun, 15 Jan 2012 17:12:06 +0000 (17:12 +0000)]
dfsm: Return boundary numbers when fuzzing integers more often

It might be the case that the program under test does arithmetic on the
integers passed to it over D-Bus, and we could find problems caused by
integer overflow/underflow. Consequently, we now return boundary numbers
with probability 0.1 when fuzzing unsigned and signed integers.

6 years agodfsm: Potentially empty arrays and dicts when fuzzing them
Philip Withnall [Sun, 15 Jan 2012 16:57:38 +0000 (16:57 +0000)]
dfsm: Potentially empty arrays and dicts when fuzzing them

It’s possible for arrays and dicts to be emptied by the fuzzing code already,
but that happens with very low probability (0.2^num_entries). To improve
the probability of this happening, we add an explicit code path for it with
probability 0.05.

6 years agomachines: Add telepathy-cm_trimmed.machine
Philip Withnall [Sun, 15 Jan 2012 16:53:19 +0000 (16:53 +0000)]
machines: Add telepathy-cm_trimmed.machine

This is the machine which first exceeded fake-tp-backend’s test coverage.

6 years agodfsm: Change arbitrary transition timeouts from 500–5000 to 50–2000ms
Philip Withnall [Sun, 15 Jan 2012 16:42:30 +0000 (16:42 +0000)]
dfsm: Change arbitrary transition timeouts from 500–5000 to 50–2000ms

This speeds up testing considerably, and means we now exceed the code
coverage of fake-tp-backend.

6 years agodfsm: Improve invalid Unicode character generation for string fuzzing
Philip Withnall [Sun, 15 Jan 2012 16:03:27 +0000 (16:03 +0000)]
dfsm: Improve invalid Unicode character generation for string fuzzing

Don’t generate any characters which will immediately be rejected by
g_utf8_validate(), and add additional sanity checking on the results before
returning them.

6 years agobendy-bus: Fix handling of IO channel EOFs with no content
Philip Withnall [Thu, 12 Jan 2012 15:41:11 +0000 (15:41 +0000)]
bendy-bus: Fix handling of IO channel EOFs with no content