1. 05 9月, 2018 1 次提交
  2. 31 5月, 2018 1 次提交
  3. 14 2月, 2018 1 次提交
    • D
      selftests/android: Fix line continuation in Makefile · 64136fb7
      Daniel Díaz 提交于
      The Makefile lacks a couple of line continuation backslashes
      in an `if' clause, which can make the subsequent rsync
      command go awry over the whole filesystem (`rsync -a / /`).
      
        /bin/sh: -c: line 5: syntax error: unexpected end of file
        make[1]: [all] Error 1 (ignored)
        TEST=$DIR"_test.sh"; \
                        if [ -e $DIR/$TEST ]; then
        /bin/sh: -c: line 2: syntax error: unexpected end of file
        make[1]: [all] Error 1 (ignored)
        rsync -a $DIR/$TEST $BUILD_TARGET/;
        [...a myriad of:]
        [  rsync: readlink_stat("...") failed: Permission denied (13)]
        [  skipping non-regular file "..."]
        [  rsync: opendir "..." failed: Permission denied (13)]
        [and many other errors...]
        fi
        make[1]: fi: Command not found
        make[1]: [all] Error 127 (ignored)
        done
        make[1]: done: Command not found
        make[1]: [all] Error 127 (ignored)
      Signed-off-by: NDaniel Díaz <daniel.diaz@linaro.org>
      Acked-by: NPintu Agarwal <pintu.ping@gmail.com>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      64136fb7
  4. 15 11月, 2017 1 次提交
    • P
      android/ion: userspace test utility for ion buffer sharing · 47a18c42
      Pintu Agarwal 提交于
      This is a test utility to verify ION buffer sharing in user space
      between 2 independent processes.
      It uses unix domain socket (with SCM_RIGHTS) as IPC to transfer an FD to
      another process to share the same buffer.
      This utility demonstrates how ION buffer sharing can be implemented between
      two user space processes, using various heap types.
      
      This utility is made to be run as part of kselftest framework in kernel.
      The utility is verified on Ubuntu-32 bit system with Linux Kernel 4.14,
      using ION system heap.
      
      For more information about the utility please check the README file.
      Signed-off-by: NPintu Agarwal <pintu.ping@gmail.com>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      47a18c42
  5. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      Many source files in the tree are missing licensing information, which
      makes it harder for compliance tools to determine the correct license.
      
      By default all files without license information are under the default
      license of the kernel, which is GPL version 2.
      
      Update the files which contain no license information with the 'GPL-2.0'
      SPDX license identifier.  The SPDX identifier is a legally binding
      shorthand, which can be used instead of the full boiler plate text.
      
      This patch is based on work done by Thomas Gleixner and Kate Stewart and
      Philippe Ombredanne.
      
      How this work was done:
      
      Patches were generated and checked against linux-4.14-rc6 for a subset of
      the use cases:
       - file had no licensing information it it.
       - file was a */uapi/* one with no licensing information in it,
       - file was a */uapi/* one with existing licensing information,
      
      Further patches will be generated in subsequent months to fix up cases
      where non-standard license headers were used, and references to license
      had to be inferred by heuristics based on keywords.
      
      The analysis to determine which SPDX License Identifier to be applied to
      a file was done in a spreadsheet of side by side results from of the
      output of two independent scanners (ScanCode & Windriver) producing SPDX
      tag:value files created by Philippe Ombredanne.  Philippe prepared the
      base worksheet, and did an initial spot review of a few 1000 files.
      
      The 4.13 kernel was the starting point of the analysis with 60,537 files
      assessed.  Kate Stewart did a file by file comparison of the scanner
      results in the spreadsheet to determine which SPDX license identifier(s)
      to be applied to the file. She confirmed any determination that was not
      immediately clear with lawyers working with the Linux Foundation.
      
      Criteria used to select files for SPDX license identifier tagging was:
       - Files considered eligible had to be source code files.
       - Make and config files were included as candidates if they contained >5
         lines of source
       - File already had some variant of a license header in it (even if <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      Reviewed-by: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  6. 26 9月, 2017 2 次提交
  7. 10 8月, 2017 1 次提交
  8. 25 4月, 2017 1 次提交
  9. 11 4月, 2017 1 次提交
    • D
      selftests/futex: Fix build error with OUTPUT variable · bfedc31c
      Darren Hart 提交于
      The use of $$OUTPUT in the target shell commands resulted in an empty
      string followed by an absolute path for which mkdir failed:
      
      $ make -C tools/testing/selftests/futex
      make: Entering directory '/home/dvhart/source/linux/linux-pdx86/tools/testing/selftests/futex'
      Makefile:36: warning: overriding recipe for target 'clean'
      ../lib.mk:55: warning: ignoring old recipe for target 'clean'
      for DIR in functional; do		\
      	BUILD_TARGET=$OUTPUT/$DIR;	\
      	mkdir $BUILD_TARGET  -p;	\
      	make OUTPUT=$BUILD_TARGET -C $DIR all;\
      done
      mkdir: cannot create directory ‘/functional’: Permission denied
      
      Replace $$OUTPUT with $(OUTPUT) when referring to the Makefile OUTPUT
      variable. The above make command now completes successfully.
      
      Fixes: a8ba798b ("selftests: enable O and KBUILD_OUTPUT")
      Signed-off-by: NDarren Hart (VMware) <dvhart@infradead.org>
      Cc: linux-kselftest@vger.kernel.org
      Cc: bamvor.zhangjian@huawei.com
      Cc: Shuah Khan <shuah@kernel.org>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      bfedc31c
  10. 06 1月, 2017 1 次提交
  11. 27 5月, 2015 2 次提交
    • D
      selftests/futex: Update Makefile to use lib.mk · 9705315b
      Darren Hart 提交于
      Adapt the futextest Makefiles to use lib.mk macros for RUN_TESTS and
      EMIT_TESTS. For now, we reuse the run.sh mechanism provided by
      futextest. This doesn't provide the standard selftests: [PASS|FAIL]
      format, but the tests provide very similar output already.
      
      This results in the run_kselftest.sh script for futexes including a
      single line: ./run.sh
      
      Cc: Shuah Khan <shuahkh@osg.samsung.com>
      Cc: linux-api@vger.kernel.org
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      9705315b
    • D
      selftests: Add futex functional tests · 2aa8470f
      Darren Hart 提交于
      The futextest testsuite [1] provides functional, stress, and
      performance tests for the various futex op codes. Those tests will be of
      more use to futex developers if they are included with the kernel
      source.
      
      Copy the core infrastructure and the functional tests into selftests,
      but adapt them for inclusion in the kernel:
      
      - Update the Makefile to include the run_tests target, remove reference
        to the performance and stress tests from the contributed sources.
      - Replace my dead IBM email address with my current Intel email address.
      - Remove the warrantee and write-to paragraphs from the license blurbs.
      - Remove the NAME section as the filename is easily determined. ;-)
      - Make the whitespace usage consistent in a couple of places.
      - Cleanup various CodingStyle violations.
      
      A future effort will explore moving the performance and stress tests
      into the kernel.
      
      1. http://git.kernel.org/cgit/linux/kernel/git/dvhart/futextest.git
      
      Cc: Shuah Khan <shuahkh@osg.samsung.com>
      Cc: linux-api@vger.kernel.org
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Davidlohr Bueso <dave@stgolabs.net>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: NDarren Hart <dvhart@linux.intel.com>
      Signed-off-by: NShuah Khan <shuahkh@osg.samsung.com>
      2aa8470f