From: Michael Jeanson Date: Thu, 6 Jul 2023 18:40:01 +0000 (-0400) Subject: Tests: implement REUSE with SPDX identifiers X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=89a8858dc6fdaf6c094d9038db79fbc61469ccef;p=lttng-ust.git Tests: implement REUSE with SPDX identifiers The SPDX identifiers [1] are a legally binding shorthand, which can be used instead of the full boiler plate text. This is the first step towards implementing the full REUSE spec [2] to help with copyright and licensing audits and compliance. This will reduce a lot a manual work required for the licensing audit required in Debian on each update. For files that lacked copyright and licensing information, I used the following guidelines. If a clear author could be determined from the git history use it, otherwise use 'EfficiOS Inc.'. For build system files, use 'MIT', for documentation 'CC-BY-4.0' and for data files 'CC0-1.0'. Freeform text files were converted to Markdown to allow licensing comments. [1] https://spdx.org/ids-how [2] https://reuse.software/tutorial/ Change-Id: I3c391f15d97b5958bdfacc17eb4ab2abafd9d99d Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/.reuse/dep5 b/.reuse/dep5 index 4c2bf6ac..4d8a7474 100644 --- a/.reuse/dep5 +++ b/.reuse/dep5 @@ -5,3 +5,7 @@ Upstream-Contact: Mathieu Desnoyers Files: extras/abi/2.*/* extras/abi/empty/* Copyright: 2023 EfficiOS, Inc. License: CC0-1.0 + +Files: tests/unit/ust-elf/data/* +Copyright: 2023 EfficiOS, Inc. +License: LGPL-2.1-or-later diff --git a/tests/benchmark/Makefile.am b/tests/benchmark/Makefile.am index 38b60f3c..6b770958 100644 --- a/tests/benchmark/Makefile.am +++ b/tests/benchmark/Makefile.am @@ -18,4 +18,4 @@ bench2_LDADD = \ dist_noinst_SCRIPTS = test_benchmark ptime -EXTRA_DIST = README +EXTRA_DIST = README.md diff --git a/tests/benchmark/README b/tests/benchmark/README deleted file mode 100644 index 3294f10a..00000000 --- a/tests/benchmark/README +++ /dev/null @@ -1,11 +0,0 @@ -To run the benchmark: - - ./test_benchmark - -You can specify the number of iterations, events and threads by setting -environment variables ITERS, DURATION, NR_THREADS respectively: - - ITERS=10 DURATION=20 NR_THREADS=4 ./test_benchmark - -NR_CPUS can also be configured, but by default is based on the contents of -/proc/cpuinfo. diff --git a/tests/benchmark/README.md b/tests/benchmark/README.md new file mode 100644 index 00000000..50c2ba45 --- /dev/null +++ b/tests/benchmark/README.md @@ -0,0 +1,17 @@ + + +To run the benchmark: + + ./test_benchmark + +You can specify the number of iterations, events and threads by setting +environment variables `ITERS`, `DURATION`, `NR_THREADS` respectively: + + ITERS=10 DURATION=20 NR_THREADS=4 ./test_benchmark + +`NR_CPUS` can also be configured, but by default is based on the contents of +`/proc/cpuinfo`. diff --git a/tests/benchmark/ptime b/tests/benchmark/ptime index 0413b94d..8a478138 100755 --- a/tests/benchmark/ptime +++ b/tests/benchmark/ptime @@ -1,4 +1,6 @@ #!/usr/bin/env python + +# SPDX-FileCopyrightText: 2023 EfficiOS, Inc # # SPDX-License-Identifier: LGPL-2.1-only diff --git a/tests/benchmark/test_benchmark b/tests/benchmark/test_benchmark index 0da40a57..33e5ed49 100755 --- a/tests/benchmark/test_benchmark +++ b/tests/benchmark/test_benchmark @@ -1,4 +1,6 @@ #!/bin/bash + +# SPDX-FileCopyrightText: 2023 EfficiOS, Inc # # SPDX-License-Identifier: LGPL-2.1-only diff --git a/tests/compile/api0/ctf-types/README b/tests/compile/api0/ctf-types/README deleted file mode 100644 index 01986531..00000000 --- a/tests/compile/api0/ctf-types/README +++ /dev/null @@ -1,3 +0,0 @@ -This is a "hello world" application used to verify that an instrumented program -with tracepoints using type declarations in CTF metadata can be built -successfully. diff --git a/tests/compile/api0/ctf-types/README.md b/tests/compile/api0/ctf-types/README.md new file mode 100644 index 00000000..264634a5 --- /dev/null +++ b/tests/compile/api0/ctf-types/README.md @@ -0,0 +1,9 @@ + + +This is a "hello world" application used to verify that an instrumented program +with tracepoints using type declarations in CTF metadata can be built +successfully. diff --git a/tests/compile/api0/hello-many/Makefile.am b/tests/compile/api0/hello-many/Makefile.am index 15974ec8..20d65354 100644 --- a/tests/compile/api0/hello-many/Makefile.am +++ b/tests/compile/api0/hello-many/Makefile.am @@ -8,3 +8,5 @@ noinst_PROGRAMS = hello-many hello_many_SOURCES = hello-many.c tp.c ust_tests_hello_many.h hello_many_LDADD = $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la $(DL_LIBS) hello_many_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS) + +EXTRA_DIST = README.md diff --git a/tests/compile/api0/hello-many/README b/tests/compile/api0/hello-many/README deleted file mode 100644 index a2572546..00000000 --- a/tests/compile/api0/hello-many/README +++ /dev/null @@ -1,2 +0,0 @@ -This is a "hello world" application used to verify that an instrumented -program which contains more than 30 tracepoints can be built successfully. diff --git a/tests/compile/api0/hello-many/README.md b/tests/compile/api0/hello-many/README.md new file mode 100644 index 00000000..2f26db31 --- /dev/null +++ b/tests/compile/api0/hello-many/README.md @@ -0,0 +1,8 @@ + + +This is a "hello world" application used to verify that an instrumented +program which contains more than 30 tracepoints can be built successfully. diff --git a/tests/compile/api0/hello.cxx/Makefile.am b/tests/compile/api0/hello.cxx/Makefile.am index 8920f5b8..7b3e1295 100644 --- a/tests/compile/api0/hello.cxx/Makefile.am +++ b/tests/compile/api0/hello.cxx/Makefile.am @@ -7,3 +7,5 @@ AM_CPPFLAGS += -I$(srcdir) noinst_PROGRAMS = hello hello_SOURCES = hello.cpp tp-cpp.cpp ust_tests_hello.h hello_LDADD = $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la $(DL_LIBS) + +EXTRA_DIST = README.md diff --git a/tests/compile/api0/hello.cxx/README b/tests/compile/api0/hello.cxx/README deleted file mode 100644 index 48cb0d8f..00000000 --- a/tests/compile/api0/hello.cxx/README +++ /dev/null @@ -1,4 +0,0 @@ -This is a "hello world" application used to verify that an instrumented -program written in C++ can be built successfully. - -Only enabled if a C++ build environment is detected during configure. diff --git a/tests/compile/api0/hello.cxx/README.md b/tests/compile/api0/hello.cxx/README.md new file mode 100644 index 00000000..34acde72 --- /dev/null +++ b/tests/compile/api0/hello.cxx/README.md @@ -0,0 +1,10 @@ + + +This is a "hello world" application used to verify that an instrumented +program written in C++ can be built successfully. + +Only enabled if a C++ build environment is detected during configure. diff --git a/tests/compile/api0/hello/Makefile.am b/tests/compile/api0/hello/Makefile.am index f3f86f22..aa5fa263 100644 --- a/tests/compile/api0/hello/Makefile.am +++ b/tests/compile/api0/hello/Makefile.am @@ -8,3 +8,8 @@ noinst_PROGRAMS = hello hello_SOURCES = hello.c tp.c ust_tests_hello.h hello_LDADD = $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la $(DL_LIBS) hello_CFLAGS = -Werror=old-style-definition $(AM_CFLAGS) + +EXTRA_DIST = \ + Makefile.example.bsd \ + Makefile.example.linux \ + README.md diff --git a/tests/compile/api0/hello/Makefile.example.bsd b/tests/compile/api0/hello/Makefile.example.bsd index 607171c2..ba617818 100644 --- a/tests/compile/api0/hello/Makefile.example.bsd +++ b/tests/compile/api0/hello/Makefile.example.bsd @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2011 Mathieu Desnoyers +# +# SPDX-License-Identifier: MIT + # Example makefile for build outside of the LTTng-UST tree. hello: diff --git a/tests/compile/api0/hello/Makefile.example.linux b/tests/compile/api0/hello/Makefile.example.linux index c983f4c4..72b302fa 100644 --- a/tests/compile/api0/hello/Makefile.example.linux +++ b/tests/compile/api0/hello/Makefile.example.linux @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2011 Mathieu Desnoyers +# +# SPDX-License-Identifier: MIT + # Example makefile for build outside of the LTTng-UST tree. hello: diff --git a/tests/compile/api0/hello/README b/tests/compile/api0/hello/README deleted file mode 100644 index 5d5100da..00000000 --- a/tests/compile/api0/hello/README +++ /dev/null @@ -1,2 +0,0 @@ -This is a "hello world" application used to verify that an instrumented -program can be built successfully. \ No newline at end of file diff --git a/tests/compile/api0/hello/README.md b/tests/compile/api0/hello/README.md new file mode 100644 index 00000000..683b01d1 --- /dev/null +++ b/tests/compile/api0/hello/README.md @@ -0,0 +1,8 @@ + + +This is a "hello world" application used to verify that an instrumented +program can be built successfully. diff --git a/tests/compile/api1/hello-many/Makefile.am b/tests/compile/api1/hello-many/Makefile.am index ce867fc7..af7085b8 100644 --- a/tests/compile/api1/hello-many/Makefile.am +++ b/tests/compile/api1/hello-many/Makefile.am @@ -19,4 +19,4 @@ hello_many_compatapi1_LDADD = \ $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ $(DL_LIBS) -EXTRA_DIST = README +EXTRA_DIST = README.md diff --git a/tests/compile/api1/hello-many/README b/tests/compile/api1/hello-many/README deleted file mode 100644 index a2572546..00000000 --- a/tests/compile/api1/hello-many/README +++ /dev/null @@ -1,2 +0,0 @@ -This is a "hello world" application used to verify that an instrumented -program which contains more than 30 tracepoints can be built successfully. diff --git a/tests/compile/api1/hello-many/README.md b/tests/compile/api1/hello-many/README.md new file mode 100644 index 00000000..2f26db31 --- /dev/null +++ b/tests/compile/api1/hello-many/README.md @@ -0,0 +1,8 @@ + + +This is a "hello world" application used to verify that an instrumented +program which contains more than 30 tracepoints can be built successfully. diff --git a/tests/compile/api1/hello.cxx/Makefile.am b/tests/compile/api1/hello.cxx/Makefile.am index 62040697..54213d88 100644 --- a/tests/compile/api1/hello.cxx/Makefile.am +++ b/tests/compile/api1/hello.cxx/Makefile.am @@ -18,4 +18,4 @@ hello_compatapi1_LDADD = \ $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ $(DL_LIBS) -EXTRA_DIST = README +EXTRA_DIST = README.md diff --git a/tests/compile/api1/hello.cxx/README b/tests/compile/api1/hello.cxx/README deleted file mode 100644 index 48cb0d8f..00000000 --- a/tests/compile/api1/hello.cxx/README +++ /dev/null @@ -1,4 +0,0 @@ -This is a "hello world" application used to verify that an instrumented -program written in C++ can be built successfully. - -Only enabled if a C++ build environment is detected during configure. diff --git a/tests/compile/api1/hello.cxx/README.md b/tests/compile/api1/hello.cxx/README.md new file mode 100644 index 00000000..34acde72 --- /dev/null +++ b/tests/compile/api1/hello.cxx/README.md @@ -0,0 +1,10 @@ + + +This is a "hello world" application used to verify that an instrumented +program written in C++ can be built successfully. + +Only enabled if a C++ build environment is detected during configure. diff --git a/tests/compile/api1/hello/Makefile.am b/tests/compile/api1/hello/Makefile.am index 206a4ce3..04dce1e9 100644 --- a/tests/compile/api1/hello/Makefile.am +++ b/tests/compile/api1/hello/Makefile.am @@ -19,4 +19,7 @@ hello_compatapi1_LDADD = \ $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ $(DL_LIBS) -EXTRA_DIST = README +EXTRA_DIST = \ + Makefile.example.bsd \ + Makefile.example.linux \ + README.md diff --git a/tests/compile/api1/hello/Makefile.example.bsd b/tests/compile/api1/hello/Makefile.example.bsd index 35943945..ba617818 100644 --- a/tests/compile/api1/hello/Makefile.example.bsd +++ b/tests/compile/api1/hello/Makefile.example.bsd @@ -1,5 +1,7 @@ -# SPDX-License-Identifier: LGPL-2.1-only +# SPDX-FileCopyrightText: 2011 Mathieu Desnoyers # +# SPDX-License-Identifier: MIT + # Example makefile for build outside of the LTTng-UST tree. hello: diff --git a/tests/compile/api1/hello/Makefile.example.linux b/tests/compile/api1/hello/Makefile.example.linux index 74fda7bb..60067763 100644 --- a/tests/compile/api1/hello/Makefile.example.linux +++ b/tests/compile/api1/hello/Makefile.example.linux @@ -1,5 +1,7 @@ -# SPDX-License-Identifier: LGPL-2.1-only +# SPDX-FileCopyrightText: 2011 Mathieu Desnoyers # +# SPDX-License-Identifier: MIT + # Example makefile to build outside of the LTTng-UST tree. hello: diff --git a/tests/compile/api1/hello/README b/tests/compile/api1/hello/README deleted file mode 100644 index 5d5100da..00000000 --- a/tests/compile/api1/hello/README +++ /dev/null @@ -1,2 +0,0 @@ -This is a "hello world" application used to verify that an instrumented -program can be built successfully. \ No newline at end of file diff --git a/tests/compile/api1/hello/README.md b/tests/compile/api1/hello/README.md new file mode 100644 index 00000000..f1ef35b8 --- /dev/null +++ b/tests/compile/api1/hello/README.md @@ -0,0 +1,8 @@ + + +This is a "hello world" application used to verify that an instrumented +program can be built successfully. \ No newline at end of file diff --git a/tests/compile/api1/ust-fields/Makefile.am b/tests/compile/api1/ust-fields/Makefile.am index c186ccff..2e70c96f 100644 --- a/tests/compile/api1/ust-fields/Makefile.am +++ b/tests/compile/api1/ust-fields/Makefile.am @@ -18,4 +18,4 @@ ust_fields_compatapi1_LDADD = \ $(top_builddir)/src/lib/lttng-ust/liblttng-ust.la \ $(DL_LIBS) -EXTRA_DIST = README +EXTRA_DIST = README.md diff --git a/tests/compile/api1/ust-fields/README b/tests/compile/api1/ust-fields/README deleted file mode 100644 index 01986531..00000000 --- a/tests/compile/api1/ust-fields/README +++ /dev/null @@ -1,3 +0,0 @@ -This is a "hello world" application used to verify that an instrumented program -with tracepoints using type declarations in CTF metadata can be built -successfully. diff --git a/tests/compile/api1/ust-fields/README.md b/tests/compile/api1/ust-fields/README.md new file mode 100644 index 00000000..264634a5 --- /dev/null +++ b/tests/compile/api1/ust-fields/README.md @@ -0,0 +1,9 @@ + + +This is a "hello world" application used to verify that an instrumented program +with tracepoints using type declarations in CTF metadata can be built +successfully. diff --git a/tests/regression/abi0-conflict/test_abi0_conflict b/tests/regression/abi0-conflict/test_abi0_conflict index 9dccbe12..3a98dc94 100755 --- a/tests/regression/abi0-conflict/test_abi0_conflict +++ b/tests/regression/abi0-conflict/test_abi0_conflict @@ -1,4 +1,7 @@ #!/bin/bash + +# SPDX-FileCopyrightText: 2023 EfficiOS, Inc +# # SPDX-License-Identifier: LGPL-2.1-only if [ "x${UST_TESTS_SRCDIR:-}" != "x" ]; then diff --git a/tests/unit/gcc-weak-hidden/b.c b/tests/unit/gcc-weak-hidden/b.c index 5c9cee6f..69dc125f 100644 --- a/tests/unit/gcc-weak-hidden/b.c +++ b/tests/unit/gcc-weak-hidden/b.c @@ -1,6 +1,6 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-only - */ +// SPDX-FileCopyrightText: 2023 EfficiOS, Inc +// +// SPDX-License-Identifier: LGPL-2.1-only #include "b.h" diff --git a/tests/unit/gcc-weak-hidden/b.h b/tests/unit/gcc-weak-hidden/b.h index 88a708ad..38353caa 100644 --- a/tests/unit/gcc-weak-hidden/b.h +++ b/tests/unit/gcc-weak-hidden/b.h @@ -1,6 +1,6 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-only - */ +// SPDX-FileCopyrightText: 2023 EfficiOS, Inc +// +// SPDX-License-Identifier: LGPL-2.1-only #ifndef _UST_TEST_WEAK_B_H #define _UST_TEST_WEAK_B_H diff --git a/tests/unit/gcc-weak-hidden/libgcc-wh.h b/tests/unit/gcc-weak-hidden/libgcc-wh.h index af2b2a13..2f787bf3 100644 --- a/tests/unit/gcc-weak-hidden/libgcc-wh.h +++ b/tests/unit/gcc-weak-hidden/libgcc-wh.h @@ -1,6 +1,6 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-only - */ +// SPDX-FileCopyrightText: 2023 EfficiOS, Inc +// +// SPDX-License-Identifier: LGPL-2.1-only #ifndef _UST_TEST_WEAK_LIBGCC_H #define _UST_TEST_WEAK_LIBGCC_H diff --git a/tests/unit/gcc-weak-hidden/libgcc-wh1.c b/tests/unit/gcc-weak-hidden/libgcc-wh1.c index d6ab0c9e..dfdddc53 100644 --- a/tests/unit/gcc-weak-hidden/libgcc-wh1.c +++ b/tests/unit/gcc-weak-hidden/libgcc-wh1.c @@ -1,6 +1,6 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-only - */ +// SPDX-FileCopyrightText: 2023 EfficiOS, Inc +// +// SPDX-License-Identifier: LGPL-2.1-only #include "libgcc-wh.h" diff --git a/tests/unit/gcc-weak-hidden/libgcc-wh2.c b/tests/unit/gcc-weak-hidden/libgcc-wh2.c index 722f2f43..f1eff130 100644 --- a/tests/unit/gcc-weak-hidden/libgcc-wh2.c +++ b/tests/unit/gcc-weak-hidden/libgcc-wh2.c @@ -1,6 +1,6 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-only - */ +// SPDX-FileCopyrightText: 2023 EfficiOS, Inc +// +// SPDX-License-Identifier: LGPL-2.1-only #include "libgcc-wh.h" diff --git a/tests/unit/libcommon/test_get_cpu_mask_from_sysfs b/tests/unit/libcommon/test_get_cpu_mask_from_sysfs index 528ace29..dbd35150 100755 --- a/tests/unit/libcommon/test_get_cpu_mask_from_sysfs +++ b/tests/unit/libcommon/test_get_cpu_mask_from_sysfs @@ -1,4 +1,7 @@ #!/bin/bash + +# SPDX-FileCopyrightText: 2023 EfficiOS, Inc +# # SPDX-License-Identifier: LGPL-2.1-only if [ "x${UST_TESTS_SRCDIR:-}" != "x" ]; then diff --git a/tests/unit/libcommon/test_get_max_cpuid_from_sysfs b/tests/unit/libcommon/test_get_max_cpuid_from_sysfs index 1d344bae..f759bebc 100755 --- a/tests/unit/libcommon/test_get_max_cpuid_from_sysfs +++ b/tests/unit/libcommon/test_get_max_cpuid_from_sysfs @@ -1,4 +1,7 @@ #!/bin/bash + +# SPDX-FileCopyrightText: 2023 EfficiOS, Inc +# # SPDX-License-Identifier: LGPL-2.1-only if [ "x${UST_TESTS_SRCDIR:-}" != "x" ]; then diff --git a/tests/unit/ust-elf/data/main.c b/tests/unit/ust-elf/data/main.c index 84fb21ab..2505cc0a 100644 --- a/tests/unit/ust-elf/data/main.c +++ b/tests/unit/ust-elf/data/main.c @@ -1,6 +1,6 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-only - */ +// SPDX-FileCopyrightText: 2023 EfficiOS, Inc +// +// SPDX-License-Identifier: LGPL-2.1-only int main() { diff --git a/tests/unit/ust-elf/data/pic/hello.c b/tests/unit/ust-elf/data/pic/hello.c index a45ce5d3..98aa8be7 100644 --- a/tests/unit/ust-elf/data/pic/hello.c +++ b/tests/unit/ust-elf/data/pic/hello.c @@ -1,6 +1,6 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-only - */ +// SPDX-FileCopyrightText: 2023 EfficiOS, Inc +// +// SPDX-License-Identifier: LGPL-2.1-only #include diff --git a/tests/unit/ust-elf/data/pic/libhello.c b/tests/unit/ust-elf/data/pic/libhello.c index 6f990c56..768a0fb5 100644 --- a/tests/unit/ust-elf/data/pic/libhello.c +++ b/tests/unit/ust-elf/data/pic/libhello.c @@ -1,6 +1,6 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-only - */ +// SPDX-FileCopyrightText: 2023 EfficiOS, Inc +// +// SPDX-License-Identifier: LGPL-2.1-only #include diff --git a/tests/unit/ust-elf/test_ust_elf b/tests/unit/ust-elf/test_ust_elf index afc6ecad..cbadc73b 100755 --- a/tests/unit/ust-elf/test_ust_elf +++ b/tests/unit/ust-elf/test_ust_elf @@ -1,4 +1,7 @@ #!/bin/bash + +# SPDX-FileCopyrightText: 2023 EfficiOS, Inc +# # SPDX-License-Identifier: LGPL-2.1-only if [ "x${UST_TESTS_SRCDIR:-}" != "x" ]; then