Permalink
Browse files

target-tester:

 * add flock_type test, refs r11139


git-svn-id: file:///var/svn/freetz/trunk@11140 149334a1-2f27-0410-a3b9-fc62619ac1e6
  • Loading branch information...
1 parent fe2cbd0 commit c72cdc3e9291e2d1824ecc8badef089ea4751f82 er13 committed Oct 26, 2013
Showing with 18 additions and 1 deletion.
  1. +16 −0 make/target-tester/src/flock_type.c
  2. +2 −1 make/target-tester/target-tester.mk
@@ -0,0 +1,16 @@
+#include <fcntl.h>
+#include <stdio.h>
+
+int main(int argc, char** argv) {
+ struct flock lock = { 1, 2, 3, 4, 5 };
+ if (lock.l_start == 1 && lock.l_len == 2 && lock.l_type == 4 && lock.l_whence == 5) {
+ printf("flock_type=bsd\n");
+ return 0;
+ }
+ if (lock.l_type == 1 && lock.l_whence == 2 && lock.l_start == 3 && lock.l_len == 4) {
+ printf("flock_type=linux\n");
+ return 0;
+ }
+ printf("flock_type=unknown\n");
+ return 1;
+}
@@ -31,7 +31,8 @@ $(PKG)_BINARIES:= \
realpath_test \
tst_nl_langinfo \
zlib_four_byte_unsigned_int \
- vfwprintf
+ vfwprintf \
+ flock_type
# doesn't compile
# bash_cv_sys_siglist -> no

0 comments on commit c72cdc3

Please sign in to comment.