gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnurl] branch master updated: sync with curl-7_56_0 in 'te


From: gnunet
Subject: [GNUnet-SVN] [gnurl] branch master updated: sync with curl-7_56_0 in 'tests' folder.
Date: Sat, 07 Oct 2017 13:58:23 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to branch master
in repository gnurl.

The following commit(s) were added to refs/heads/master by this push:
     new 63cfd7d08 sync with curl-7_56_0 in 'tests' folder.
63cfd7d08 is described below

commit 63cfd7d08fc8b7cce0eb37f18a11154b35775974
Author: ng0 <address@hidden>
AuthorDate: Sat Oct 7 11:57:37 2017 +0000

    sync with curl-7_56_0 in 'tests' folder.
---
 tests/fuzz/CMakeLists.txt             |   1 -
 tests/fuzz/corpora/ftp/long1.txt      |   8 ---
 tests/fuzz/corpora/http1_1/200_ok.txt |  13 ----
 tests/fuzz/corpora/http1_1/404_nf.txt |   9 ---
 tests/fuzz/curl_fuzzer.c              | 128 ----------------------------------
 tests/libtest/test1022.pl             |   2 -
 tests/unit/unit1605.c                 |   2 -
 tests/unit/unit1606.c                 |   1 -
 8 files changed, 164 deletions(-)

diff --git a/tests/fuzz/CMakeLists.txt b/tests/fuzz/CMakeLists.txt
deleted file mode 100644
index aefedf26f..000000000
--- a/tests/fuzz/CMakeLists.txt
+++ /dev/null
@@ -1 +0,0 @@
-# FIXME, probably adapt from file in ../unit
diff --git a/tests/fuzz/corpora/ftp/long1.txt b/tests/fuzz/corpora/ftp/long1.txt
deleted file mode 100644
index 47a536e38..000000000
--- a/tests/fuzz/corpora/ftp/long1.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-200 OK
-200 OK
-215 UNIX Type: L8
-200 OK
-200 OK
-200 OK
-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 [...]
-220 OK
diff --git a/tests/fuzz/corpora/http1_1/200_ok.txt 
b/tests/fuzz/corpora/http1_1/200_ok.txt
deleted file mode 100644
index ca7ef0b23..000000000
--- a/tests/fuzz/corpora/http1_1/200_ok.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-HTTP/1.1 200 OK
-Content-Encoding: gzip
-Accept-Ranges: bytes
-Cache-Control: max-age=604800
-Content-Type: text/html
-Date: Mon, 08 May 2017 19:03:58 GMT
-Etag: "359670651+gzip"
-Expires: Mon, 15 May 2017 19:03:58 GMT
-Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT
-Server: ECS (ewr/15BD)
-X-Cache: HIT
-Content-Length: 606
-
diff --git a/tests/fuzz/corpora/http1_1/404_nf.txt 
b/tests/fuzz/corpora/http1_1/404_nf.txt
deleted file mode 100644
index a28311a35..000000000
--- a/tests/fuzz/corpora/http1_1/404_nf.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-HTTP/1.1 404 Not Found
-Cache-Control: max-age=604800
-Content-Type: text/html
-Date: Mon, 08 May 2017 19:04:08 GMT
-Expires: Mon, 15 May 2017 19:04:08 GMT
-Server: EOS (lax004/28A3)
-Vary: Accept-Encoding
-Content-Length: 1270
-
diff --git a/tests/fuzz/curl_fuzzer.c b/tests/fuzz/curl_fuzzer.c
deleted file mode 100644
index be70e4dba..000000000
--- a/tests/fuzz/curl_fuzzer.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
-# Copyright 2016 Google Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#      https://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-################################################################################
-*/
-
-#include <errno.h>
-#include <fcntl.h>
-#include <netinet/in.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/select.h>
-#include <sys/socket.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include <gnurl/curl.h>
-
-static const void *cur_data;
-static int cur_size = -1;
-static int server_fd = -1;
-static int client_fd = -1;
-static int wrote = 0;
-
-static void fail(const char *why) {
-  perror(why);
-  exit(1);
-}
-
-static curl_socket_t open_sock(void *ctx, curlsocktype purpose,
-                               struct curl_sockaddr *address) {
-  if(cur_size == -1) {
-    fail("not fuzzing");
-  }
-  if(server_fd != -1 || client_fd != -1) {
-    fail("already connected");
-  }
-  int fds[2];
-  if(socketpair(AF_UNIX, SOCK_STREAM, 0, fds)) {
-    fail("socketpair");
-  }
-  server_fd = fds[0];
-  client_fd = fds[1];
-  if(write(server_fd, cur_data, cur_size) != cur_size) {
-    fail("write");
-  }
-  if(shutdown(server_fd, SHUT_WR)) {
-    fail("shutdown");
-  }
-  return client_fd;
-}
-
-static int set_opt(void *ctx, curl_socket_t curlfd, curlsocktype purpose) {
-  return CURL_SOCKOPT_ALREADY_CONNECTED;
-}
-
-static size_t write_callback(char *ptr, size_t size, size_t n, void *ctx) {
-  return size * n;
-}
-
-static size_t read_callback(char *buf, size_t size, size_t n, void *ctx) {
-  if(wrote || size * n == 0) {
-    return 0;
-  }
-  wrote = 1;
-  buf[0] = 'a';
-  return 1;
-}
-
-int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
-  cur_data = Data;
-  cur_size = Size;
-  wrote = 0;
-  CURL *curl = curl_easy_init();
-  curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
-  curl_easy_setopt(curl, CURLOPT_READFUNCTION, read_callback);
-  curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, open_sock);
-  curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, set_opt);
-#if defined(FUZZER_FTP)
-  curl_easy_setopt(curl, CURLOPT_URL, "ftp://address@hidden/file.txt";);
-#elif defined(FUZZER_IMAP)
-  curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
-  curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
-  curl_easy_setopt(curl, CURLOPT_URL, "imap://localhost");
-#elif defined(FUZZER_POP3)
-  curl_easy_setopt(curl, CURLOPT_USERNAME, "user");
-  curl_easy_setopt(curl, CURLOPT_PASSWORD, "secret");
-  curl_easy_setopt(curl, CURLOPT_URL, "pop3://localhost");
-#elif defined(FUZZER_HTTP_UPLOAD)
-  curl_easy_setopt(curl, CURLOPT_URL, "http://localhost/";);
-  curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
-  curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
-#elif defined(FUZZER_HTTP2)
-  curl_easy_setopt(curl, CURLOPT_URL, "http://localhost/";);
-  /* use non-TLS HTTP/2 without HTTP/1.1 Upgrade: */
-  curl_easy_setopt(curl, CURLOPT_HTTP_VERSION,
-                   CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE);
-#else
-  curl_easy_setopt(curl, CURLOPT_URL, "http://localhost/";);
-  curl_easy_setopt(curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
-#endif
-  curl_easy_perform(curl);
-  curl_easy_cleanup(curl);
-  close(server_fd);
-  close(client_fd);
-  server_fd = -1;
-  client_fd = -1;
-  cur_data = NULL;
-  cur_size = -1;
-  return 0;
-}
diff --git a/tests/libtest/test1022.pl b/tests/libtest/test1022.pl
index df088c314..76a11cfe7 100755
--- a/tests/libtest/test1022.pl
+++ b/tests/libtest/test1022.pl
@@ -12,8 +12,6 @@ my $what=$ARGV[2];
 open(CURL, "$ARGV[1]") || die "Can't open curl --version list in $ARGV[1]\n";
 $_ = <CURL>;
 chomp;
-# Leave the version to contain libcurl here as we use the ../src/curl binary 
and
-# it is producting "libcurl" string
 /libcurl\/([\.\d]+((-DEV)|(-\d+))?)/;
 my $version = $1;
 close CURL;
diff --git a/tests/unit/unit1605.c b/tests/unit/unit1605.c
index dd5372225..57a9199c5 100644
--- a/tests/unit/unit1605.c
+++ b/tests/unit/unit1605.c
@@ -45,8 +45,6 @@ static void unit_stop(void)
 UNITTEST_START
   int len;
   char *esc;
-  CURL *easy = curl_easy_init();
-  abort_unless(easy, "out of memory");
 
   esc = curl_easy_escape(easy, "", -1);
   fail_unless(esc == NULL, "negative string length can't work");
diff --git a/tests/unit/unit1606.c b/tests/unit/unit1606.c
index 9640ce2c7..9da0b70b6 100644
--- a/tests/unit/unit1606.c
+++ b/tests/unit/unit1606.c
@@ -39,7 +39,6 @@ static CURLcode unit_setup(void)
 
 static void unit_stop(void)
 {
-
   curl_easy_cleanup(easy);
   curl_global_cleanup();
 }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]