kunit: added missing SPDX headers

Lots of files were missing SPDX headers; this adds them in.

Change-Id: I56e8897c3fff22506980559d130e43849e87b1ca
Signed-off-by: Brendan Higgins <brendanhiggins@google.com>
diff --git a/Documentation/test/api/class-and-function-mocking.rst b/Documentation/test/api/class-and-function-mocking.rst
index 013004f..9fc2108 100644
--- a/Documentation/test/api/class-and-function-mocking.rst
+++ b/Documentation/test/api/class-and-function-mocking.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 ==========================
 Class and Function Mocking
 ==========================
diff --git a/Documentation/test/api/index.rst b/Documentation/test/api/index.rst
index a032f94..a4fdc35 100644
--- a/Documentation/test/api/index.rst
+++ b/Documentation/test/api/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 =============
 API Reference
 =============
diff --git a/Documentation/test/api/platform-mocking.rst b/Documentation/test/api/platform-mocking.rst
index 219f9e1..3bb4b2b 100644
--- a/Documentation/test/api/platform-mocking.rst
+++ b/Documentation/test/api/platform-mocking.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 ================
 Platform Mocking
 ================
diff --git a/Documentation/test/api/test.rst b/Documentation/test/api/test.rst
index b3ef4d1..5dbfb9e 100644
--- a/Documentation/test/api/test.rst
+++ b/Documentation/test/api/test.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 ========
 Test API
 ========
diff --git a/Documentation/test/faq.rst b/Documentation/test/faq.rst
index 097543d..998570b 100644
--- a/Documentation/test/faq.rst
+++ b/Documentation/test/faq.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 =========================================
 Frequently Asked Questions
 =========================================
diff --git a/Documentation/test/index.rst b/Documentation/test/index.rst
index 381386c..e7c0a7e 100644
--- a/Documentation/test/index.rst
+++ b/Documentation/test/index.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 =========================================
 KUnit - Unit Testing for the Linux Kernel
 =========================================
diff --git a/Documentation/test/start.rst b/Documentation/test/start.rst
index fe3fdee..c57fe43 100644
--- a/Documentation/test/start.rst
+++ b/Documentation/test/start.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 ===============
 Getting Started
 ===============
diff --git a/Documentation/test/usage.rst b/Documentation/test/usage.rst
index f833b84..c9131e7 100644
--- a/Documentation/test/usage.rst
+++ b/Documentation/test/usage.rst
@@ -1,3 +1,5 @@
+.. SPDX-License-Identifier: GPL-2.0
+
 =============
 Using KUnit
 =============
diff --git a/arch/um/include/asm/io-mock.h b/arch/um/include/asm/io-mock.h
index bd2538a..d1a0f80 100644
--- a/arch/um/include/asm/io-mock.h
+++ b/arch/um/include/asm/io-mock.h
@@ -1,4 +1,11 @@
 /* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Mock IO functions.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #ifndef _ASM_UM_IO_MOCK_H
 #define _ASM_UM_IO_MOCK_H
 
diff --git a/arch/um/kernel/io-mock.c b/arch/um/kernel/io-mock.c
index 4b1eee8..420c6f1 100644
--- a/arch/um/kernel/io-mock.c
+++ b/arch/um/kernel/io-mock.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Mock IO functions.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <linux/mm.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
diff --git a/drivers/base/platform-mock.c b/drivers/base/platform-mock.c
index 6571104..3df9f1b 100644
--- a/drivers/base/platform-mock.c
+++ b/drivers/base/platform-mock.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Fake platform device API for unit testing platform drivers.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <linux/platform_device_mock.h>
 #include <linux/of_platform.h>
 
diff --git a/include/linux/platform_device_mock.h b/include/linux/platform_device_mock.h
index 00db6fe..6cac125 100644
--- a/include/linux/platform_device_mock.h
+++ b/include/linux/platform_device_mock.h
@@ -1,3 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Fake platform device API for unit testing platform drivers.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <linux/platform_device.h>
 #include <test/mock.h>
 
diff --git a/include/test/mock.h b/include/test/mock.h
index a31e5d6..fd0dc4c 100644
--- a/include/test/mock.h
+++ b/include/test/mock.h
@@ -1,3 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Mocking API for KUnit.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #ifndef _TEST_MOCK_H
 #define _TEST_MOCK_H
 
diff --git a/include/test/params.h b/include/test/params.h
index aade864..50d5403 100644
--- a/include/test/params.h
+++ b/include/test/params.h
@@ -1,3 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Macros for parsing and manipulating parameter lists needed for generating
+ * mocks.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #ifndef _TEST_PARAMS_H
 #define _TEST_PARAMS_H
 
diff --git a/include/test/string-stream.h b/include/test/string-stream.h
index 814f0bb..4097d85 100644
--- a/include/test/string-stream.h
+++ b/include/test/string-stream.h
@@ -1,3 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * C++ stream style string builder used in KUnit for building messages.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #ifndef _TEST_STRING_STREAM_H
 #define _TEST_STRING_STREAM_H
 
diff --git a/include/test/test-stream.h b/include/test/test-stream.h
index 540d341..a53060c 100644
--- a/include/test/test-stream.h
+++ b/include/test/test-stream.h
@@ -1,3 +1,12 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * C++ stream style string formatter and printer used in KUnit for outputting
+ * KUnit messages.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #ifndef _TEST_TEST_STREAM_H
 #define _TEST_TEST_STREAM_H
 
diff --git a/include/test/test.h b/include/test/test.h
index d68b7f0..dee210d 100644
--- a/include/test/test.h
+++ b/include/test/test.h
@@ -1,3 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Base unit test (KUnit) API.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #ifndef _TEST_TEST_H
 #define _TEST_TEST_H
 
diff --git a/test/common-mocks.c b/test/common-mocks.c
index ddcb28d..5775619 100644
--- a/test/common-mocks.c
+++ b/test/common-mocks.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Common KUnit mock call arg matchers and formatters.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <linux/kernel.h>
 #include <test/mock.h>
 
diff --git a/test/example-test.c b/test/example-test.c
index 2f472c5..6f15cbb 100644
--- a/test/example-test.c
+++ b/test/example-test.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Example KUnit test to show how to use KUnit.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <test/test.h>
 #include <test/mock.h>
 
diff --git a/test/mock-macro-test.c b/test/mock-macro-test.c
index 59f80fb..1c0397a 100644
--- a/test/mock-macro-test.c
+++ b/test/mock-macro-test.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * KUnit test for parameter list parsing macros.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <test/test.h>
 #include <test/mock.h>
 
diff --git a/test/mock-test.c b/test/mock-test.c
index 83e43ce..b2abadb 100644
--- a/test/mock-test.c
+++ b/test/mock-test.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * KUnit test for mock.h.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <test/test.h>
 #include <test/mock.h>
 
diff --git a/test/mock.c b/test/mock.c
index 13fc1ef..4f2a006 100644
--- a/test/mock.c
+++ b/test/mock.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Mocking API for KUnit.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <test/mock.h>
 
 static int mock_void_ptr_init(struct MOCK(void) *mock_void_ptr)
diff --git a/test/string-stream-test.c b/test/string-stream-test.c
index b4bc5ce..982150e 100644
--- a/test/string-stream-test.c
+++ b/test/string-stream-test.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * KUnit test for struct string_stream.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <linux/slab.h>
 #include <test/test.h>
 #include <test/string-stream.h>
diff --git a/test/string-stream.c b/test/string-stream.c
index f91bb60..396939f97 100644
--- a/test/string-stream.c
+++ b/test/string-stream.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * C++ stream style string builder used in KUnit for building messages.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <linux/list.h>
 #include <linux/slab.h>
 #include <test/string-stream.h>
diff --git a/test/test-mock.c b/test/test-mock.c
index 0ae4a7c..b0f222f 100644
--- a/test/test-mock.c
+++ b/test/test-mock.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * KUnit mock for struct test.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include "test-mock.h"
 
 DEFINE_STRUCT_CLASS_MOCK_VOID_RETURN(METHOD(fail), CLASS(test),
diff --git a/test/test-mock.h b/test/test-mock.h
index ed4c9df..9996e2a 100644
--- a/test/test-mock.h
+++ b/test/test-mock.h
@@ -1,3 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * KUnit mock for struct test.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <test/test.h>
 #include <test/mock.h>
 
diff --git a/test/test-stream-test.c b/test/test-stream-test.c
index db001b7..ada38ea 100644
--- a/test/test-stream-test.c
+++ b/test/test-stream-test.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * KUnit test for struct test_stream.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <test/test.h>
 #include <test/mock.h>
 #include <test/test-stream.h>
diff --git a/test/test-stream.c b/test/test-stream.c
index 89f0a08..f9869ad 100644
--- a/test/test-stream.c
+++ b/test/test-stream.c
@@ -1,3 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * C++ stream style string formatter and printer used in KUnit for outputting
+ * KUnit messages.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <test/test.h>
 #include <test/test-stream.h>
 #include <test/string-stream.h>
diff --git a/test/test-test.c b/test/test-test.c
index 815fe9b..b1d7c7c 100644
--- a/test/test-test.c
+++ b/test/test-test.c
@@ -1,3 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * KUnit test for core test infrastructure.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
 #include <test/test.h>
 
 static void test_test_catches_segfault(struct test *test)
diff --git a/test/test.c b/test/test.c
index 4855d18b..fbfd8e9 100644
--- a/test/test.c
+++ b/test/test.c
@@ -1,3 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Base unit test (KUnit) API.
+ *
+ * Copyright (C) 2018, Google LLC.
+ * Author: Brendan Higgins <brendanhiggins@google.com>
+ */
+
 #include <linux/sched.h>
 #include <linux/sched/debug.h>
 #include <os.h>
diff --git a/tools/testing/kunit/kunit.py b/tools/testing/kunit/kunit.py
index 3c5ef46..5421af3 100755
--- a/tools/testing/kunit/kunit.py
+++ b/tools/testing/kunit/kunit.py
@@ -1,4 +1,5 @@
 #!/usr/bin/python3
+# SPDX-License-Identifier: GPL-2.0
 
 # A thin wrapper on top of the KUnit Kernel
 
diff --git a/tools/testing/kunit/kunit_config.py b/tools/testing/kunit/kunit_config.py
index 422acb9..183bd5e 100644
--- a/tools/testing/kunit/kunit_config.py
+++ b/tools/testing/kunit/kunit_config.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0
+
 import collections
 import re
 
diff --git a/tools/testing/kunit/kunit_kernel.py b/tools/testing/kunit/kunit_kernel.py
index f0e1a6b..2181b22 100644
--- a/tools/testing/kunit/kunit_kernel.py
+++ b/tools/testing/kunit/kunit_kernel.py
@@ -1,3 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0
+
 import logging
 import subprocess
 import os