]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Remove obsolete json fuzzer
authorJouni Malinen <jouni@codeaurora.org>
Mon, 12 Oct 2020 18:13:08 +0000 (21:13 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 12 Oct 2020 18:17:17 +0000 (21:17 +0300)
tests/fuzzing/json replaced this more than a year ago, so get rid
of the now obsolete version.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
tests/Makefile
tests/test-json.c [deleted file]

index 72fb8ee4f5014313c1a0bfb5cc8f045c6072849d..558194c1efd5cc032539d8feb413d6f46a3424e2 100644 (file)
@@ -73,9 +73,6 @@ test-https: $(call BUILDOBJ,test-https.o) $(LIBS)
 test-https_server: $(call BUILDOBJ,test-https_server.o) $(LIBS)
        $(LDO) $(LDFLAGS) -o $@ $< $(LLIBS)
 
-test-json: $(call BUILDOBJ,test-json.o) $(LIBS)
-       $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
-
 test-list: $(call BUILDOBJ,test-list.o) $(LIBS)
        $(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
 
@@ -119,7 +116,6 @@ clean: common-clean
        rm -f *~
        rm -f test-eapol
        rm -f test-https
-       rm -f test-json
        rm -f test-tls
        rm -f test_x509v3_nist.out.*
        rm -f test_x509v3_nist2.out.*
diff --git a/tests/test-json.c b/tests/test-json.c
deleted file mode 100644 (file)
index b33a792..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * JSON parser - test program
- * Copyright (c) 2019, Jouni Malinen <j@w1.fi>
- *
- * This software may be distributed under the terms of the BSD license.
- * See README for more details.
- */
-
-#include "utils/includes.h"
-#include "utils/common.h"
-#include "utils/os.h"
-#include "utils/json.h"
-#include "utils/wpa_debug.h"
-
-
-void run_test(const char *buf, size_t len)
-{
-       struct json_token *root;
-       char *txt;
-       size_t buflen = 10000;
-
-       root = json_parse(buf, len);
-       if (!root) {
-               wpa_printf(MSG_DEBUG, "JSON parsing failed");
-               return;
-       }
-
-       txt = os_zalloc(buflen);
-       if (txt) {
-               json_print_tree(root, txt, buflen);
-               wpa_printf(MSG_DEBUG, "%s", txt);
-               os_free(txt);
-       }
-       json_free(root);
-}
-
-
-#ifdef TEST_LIBFUZZER
-int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
-{
-       run_test((const char *) data, size);
-       return 0;
-}
-#else /* TEST_LIBFUZZER */
-int main(int argc, char *argv[])
-{
-       char *buf;
-       size_t len;
-
-       wpa_debug_level = 0;
-
-       if (argc < 2)
-               return -1;
-
-       buf = os_readfile(argv[1], &len);
-       if (!buf)
-               return -1;
-
-       run_test(buf, len);
-       os_free(buf);
-
-       return 0;
-}
-#endif /* TEST_LIBFUZZER */