~ubuntu-branches/debian/experimental/libeatmydata/experimental

« back to all changes in this revision

Viewing changes to debian/patches/upstream_portable_testsuite.diff

  • Committer: Bazaar Package Importer
  • Author(s): Modestas Vainius
  • Date: 2011-01-02 17:21:29 UTC
  • Revision ID: james.westby@ubuntu.com-20110102172129-q8axwliijo3ml1ed
Tags: 15-5
* Get rid of the debian-changes-* patch introduced by mistake in the previous
  upload.
* Forbid generation of the single debian patch by adding
  abort-on-upstream-changes to debian/source/local-options.
* Add unapply-patches to debian/source/local-options.
* Merge Ubuntu patches;
  - ubuntu_as_needed_fix.diff (with small tweak) to
    upstream_improve_Makefile.diff;
  - ubuntu_missing_open_arg.diff (with tweak) to
    upstream_portable_testsuite.diff.
* Fix relative path recognition as per IEEE Std 1003.1 Shell Command
  Language Specification, chapter 2.9. (Closes: #606157)
* Remove config.h in distclean target (upstream_basic_autoconf.diff
  modified).

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
--- /dev/null
8
8
+++ b/eatmydatatest.c
9
 
@@ -0,0 +1,84 @@
 
9
@@ -0,0 +1,85 @@
10
10
+/*
11
11
+    Copyright (C): 2010, Modestas Vainius <modax@debian.org>
12
12
+
28
28
+#include <errno.h>
29
29
+#include <sys/mman.h>
30
30
+#include <unistd.h>
 
31
+#include <sys/stat.h>
31
32
+
32
33
+int failed_tests = 0;
33
34
+
46
47
+    int fd, res;
47
48
+
48
49
+    res = -1;
49
 
+    fd = open(DATAFILENAME, O_CREAT|O_TRUNC|O_WRONLY|flag);
 
50
+    fd = open(DATAFILENAME, O_CREAT|O_TRUNC|O_WRONLY|flag, S_IRUSR|S_IWUSR);
50
51
+    if (fd != -1) {
51
52
+        res = fcntl(fd, F_GETFL);
52
53
+    }
70
71
+    TESTCASE(test_open_flag(O_DSYNC), 0, "open(O_DSYNC) flag was not filtered out");
71
72
+
72
73
+    // Open and close FD in order to make sure its invalid.
73
 
+    fd = open(DATAFILENAME, O_CREAT|O_TRUNC|O_WRONLY);
 
74
+    fd = open(DATAFILENAME, O_CREAT|O_TRUNC|O_WRONLY, S_IRUSR|S_IWUSR);
74
75
+    if (fd == -1)
75
76
+        perror("unable to open " DATAFILENAME);
76
77
+    if (close(fd) == -1)
101
102
+       rm -f libeatmydata.so* *.o fsynctest eatmydatatest
102
103
 
103
104
 distclean: clean
104
 
        rm -f config.log config.status
 
105
        rm -f config.log config.status config.h
105
106
@@ -18,7 +18,11 @@ libeatmydata.so: eatmydata.o
106
107
 fsynctest: fsynctest.c
107
108
        $(CC) $(CFLAGS) $(LDFLAGS) -o fsynctest fsynctest.c