 .travis.yml                    | 18 ++++++++++++++++++
 doc/guide.rst                  |  2 +-
 doc/posix.rst                  |  4 ++--
 libfiu/Makefile                |  2 +-
 preload/posix/Makefile         |  4 ++--
 tests/Makefile                 | 18 +++++++++++++-----
 tests/collisions/Makefile      |  2 +-
 tests/generated/Makefile       |  2 +-
 tests/utils/test-basic_ctrl.py | 12 ++++++++----
 9 files changed, 47 insertions(+), 17 deletions(-)

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..120cbd2
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,18 @@
+# Configuration for https://travis-ci.org/
+
+language: c
+
+compiler:
+    - gcc
+    - clang
+
+addons:
+    apt:
+        packages:
+            - python-dev
+            - python3-dev
+
+script:
+    - make test
+
+
diff --git a/doc/guide.rst b/doc/guide.rst
index 7b3d2cb..b72cbc8 100644
--- a/doc/guide.rst
+++ b/doc/guide.rst
@@ -45,7 +45,7 @@ store a given file::
                 return true;
         }
 
-With current disk sizes, it's very unusual to ran out of free space, which
+With current disk sizes, it's very unusual to run out of free space, which
 makes the scenario where *free_space()* returns 0 hard to test. With libfiu,
 you can do the following small addition::
 
diff --git a/doc/posix.rst b/doc/posix.rst
index b83b56d..1ce4ab3 100644
--- a/doc/posix.rst
+++ b/doc/posix.rst
@@ -2,7 +2,7 @@
 Simulating failures in the POSIX API
 ====================================
 
-When developing robust sofware, developers often consider the cases when the
+When developing robust software, developers often consider the cases when the
 classic POSIX functions return failure.
 
 Testing that fault-handling code is a problem because under normal conditions
@@ -42,7 +42,7 @@ expected.
 
 When fortune is run, every *read()* has a 5% chance to fail, selecting an
 *errno* at random from the list of the ones that read() is allowed to return.
-If you want to select an specific *errno*, you can do it by passing its
+If you want to select a specific *errno*, you can do it by passing its
 numerical value using the *-i* parameter.
 
 The name of the failure points are fixed, and there is at least one for each
diff --git a/libfiu/Makefile b/libfiu/Makefile
index 0eb7ad8..4743513 100644
--- a/libfiu/Makefile
+++ b/libfiu/Makefile
@@ -38,7 +38,7 @@ else
 	NICE_CC = $(CC)
 endif
 
-LIB_VER=0.94
+LIB_VER=0.95
 LIB_SO_VER=0
 
 
diff --git a/preload/posix/Makefile b/preload/posix/Makefile
index 4355829..d63ef5d 100644
--- a/preload/posix/Makefile
+++ b/preload/posix/Makefile
@@ -24,11 +24,11 @@ PREFIX=/usr/local
 INSTALL=install
 
 
-MODS = $(wildcard modules/*.mod)
+MODS = $(sort $(wildcard modules/*.mod))
 GEN_C = $(addsuffix .c,$(MODS))
 GEN_OBJS = $(addsuffix .o,$(MODS))
 GEN_FL = $(addsuffix .fl,$(MODS))
-CUSTOM_OBJS = $(patsubst %.c,%.o,$(wildcard modules/*.custom.c))
+CUSTOM_OBJS = $(patsubst %.c,%.o,$(sort $(wildcard modules/*.custom.c)))
 OBJS = codegen.o $(GEN_OBJS) $(CUSTOM_OBJS)
 
 
diff --git a/tests/Makefile b/tests/Makefile
index 5d8ec6e..c4a63ed 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,5 +1,5 @@
 
-CFLAGS += -std=c99 -pedantic -Wall -rdynamic
+CFLAGS += -std=c99 -pedantic -Wall
 ALL_CFLAGS = -I../libfiu/ -L../libfiu/ \
 	-D_XOPEN_SOURCE=600 -D_GNU_SOURCE -fPIC -DFIU_ENABLE=1 $(CFLAGS)
 
@@ -53,9 +53,20 @@ C_BINS := $(patsubst %.c,%,$(C_SRCS))
 
 c-tests: $(patsubst %.c,c-run-%,$(C_SRCS))
 
-test-%: test-%.o build-flags
+test-%: test-%.c build-flags
 	$(NICE_CC) $(ALL_CFLAGS) $< -lfiu -lpthread -o $@
 
+# Tests that use the stack need special build flags, as some common
+# optimizations can cause them to fail.
+# -rdynamic: Adds all symbols to the dynamic symbol table. This option is
+#    needed for backtrace() to work properly.
+# -fno-optimize-sibling-calls: This optimization can turn some calls into
+#    direct jumps, which leaves caller information out of the stack frame and
+#    makes functions not appear in the backtrace. We disable it.
+test-enable_stac%: test-enable_stac%.c build-flags
+	$(NICE_CC) $(ALL_CFLAGS) \
+		-rdynamic -fno-optimize-sibling-calls $< -lfiu -lpthread -o $@
+
 c-run-%: %
 	$(NICE_RUN) ./$<
 
@@ -69,9 +80,6 @@ build-flags: .force-build-flags
 		echo "$(BF)" > build-flags; \
 	fi
 
-.c.o:
-	$(NICE_CC) $(ALL_CFLAGS) -c $< -o $@
-
 
 #
 # Python tests
diff --git a/tests/collisions/Makefile b/tests/collisions/Makefile
index 0292d84..b148981 100644
--- a/tests/collisions/Makefile
+++ b/tests/collisions/Makefile
@@ -1,5 +1,5 @@
 
-CFLAGS += -std=c99 -pedantic -Wall -rdynamic
+CFLAGS += -std=c99 -pedantic -Wall
 ALL_CFLAGS = -I../../libfiu/ -L../../libfiu/ -L./ \
 	-D_XOPEN_SOURCE=600 -D_GNU_SOURCE -fPIC -DFIU_ENABLE=1 $(CFLAGS)
 
diff --git a/tests/generated/Makefile b/tests/generated/Makefile
index 201f58b..05e7498 100644
--- a/tests/generated/Makefile
+++ b/tests/generated/Makefile
@@ -1,5 +1,5 @@
 
-CFLAGS += -std=c99 -pedantic -Wall -rdynamic
+CFLAGS += -std=c99 -pedantic -Wall
 ALL_CFLAGS = -I../../libfiu/ -L../../libfiu/ \
 	-D_XOPEN_SOURCE=600 -D_GNU_SOURCE -fPIC -DFIU_ENABLE=1 $(CFLAGS)
 
diff --git a/tests/utils/test-basic_ctrl.py b/tests/utils/test-basic_ctrl.py
index e21cb35..4723d8d 100755
--- a/tests/utils/test-basic_ctrl.py
+++ b/tests/utils/test-basic_ctrl.py
@@ -1,5 +1,6 @@
 #!/usr/bin/env python
 
+import os
 import subprocess
 import time
 
@@ -11,9 +12,12 @@ def launch_sh():
     # straightforward (which helps debugging and troubleshooting), but at the
     # same time it is interactive and we can make it do the operations we
     # want.
+    # We also set LC_ALL=C as we test the output for the word "error", which
+    # does not necessarily appear in other languages.
     p = subprocess.Popen("./wrap fiu-run -x cat".split(),
             stdin=subprocess.PIPE, stdout=subprocess.PIPE,
-            stderr=subprocess.PIPE)
+            stderr=subprocess.PIPE,
+            env=dict(os.environ, LC_ALL="C"))
 
     # Give it a moment to initialize and create the control files.
     time.sleep(0.2)
@@ -45,19 +49,19 @@ p = launch_sh()
 fiu_ctrl(p, ["-c", "enable name=posix/io/*"])
 out, err = send_cmd(p, "test\n")
 assert out == '', out
-assert 'error' in err
+assert 'error' in err, err
 
 # Same, but with failinfo.
 p = launch_sh()
 fiu_ctrl(p, ["-c", "enable name=posix/io/*,failinfo=3"])
 out, err = send_cmd(p, "test\n")
 assert out == '', out
-assert 'error' in err
+assert 'error' in err, err
 
 # Same, but with probability.
 p = launch_sh()
 fiu_ctrl(p, ["-c", "enable_random name=posix/io/*,probability=0.999"])
 out, err = send_cmd(p, "test\n")
 assert out == '', out
-assert 'error' in err
+assert 'error' in err, err
 
