Skip to content
Permalink
Branch: master
Commits on Jul 16, 2019
  1. Revert "toolchain/zephyr: invoke ar with -D for deterministic .a files"

    marc-hb authored and carlescufi committed Jul 15, 2019
    This reverts commit b4078c5 / #17495
    
    This revert is needed for two reasons:
    
    1. As reported by Lawrence King at
       https://lists.zephyrproject.org/g/users/message/1566
    this breaks incremental builds with ninja:
    
      cd sample/hello_world
      west build -b qemu_x86
      touch src/main.c
      west build -b qemu_x86
    
      hello_world/build/../src/main.c:11: multiple definition of main';
      app/libapp.a(main.c.obj):samples/hello_world/build/../src/main.c:11:
      first defined here
      collect2: error: ld returned 1 exit status
    
      ar tf build/app/libapp.a
       main.c.obj
       main.c.obj
    
    This does NOT break incremental builds with GNU Make, not sure why not.
    
    2. Less urgently, I finally got someone from the CMake team to help me
    and point me at an alternative solution that doesn't rely on CMake
    internals: https://gitlab.kitware.com/cmake/cmake/issues/19474
    I was about to try it when Lawrence reported the regression above.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jul 15, 2019
  1. tests/net/: samples/net/: add a few 'userspace' tags

    marc-hb authored and nashif committed Jul 6, 2019
    See commit message 4afcc0f for the long story.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jul 13, 2019
  1. toolchain/zephyr: invoke ar with -D for deterministic .a files

    marc-hb authored and nashif committed Jul 9, 2019
    Quoting GNU ar man/info page:
    
      'D'
         Operate in _deterministic_ mode.  When adding files and the archive
         index use zero for UIDs, GIDs, timestamps, and use consistent file
         modes for all files.  When this option is used, if 'ar' is used
         with identical options and identical input files, multiple runs
         will create identical output files regardless of the input files'
         owners, groups, file modes, or modification times.
    
         If 'binutils' was configured with
         '--enable-deterministic-archives', then this mode is on by default.
         It can be disabled with the 'U' modifier, below.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jul 10, 2019
  1. sanitycheck: fix priority of --extra-args=CONFIG_ over testcase.yaml

    marc-hb authored and nashif committed Jul 6, 2019
    sanitycheck takes any "extra_config" list found in the testcase.yaml
    file and generates an "overlay" file from it. This file is placed in
    the per-test build directory and passed to cmake/kconfig.cmake through a
    -DOVERLAY_CONF= option set in the (also) generated sanity-out/Makefile.
    
    This commit moves this generated config overlay to a subdirectory one
    level down from the build directory, otherwise kconfig.cmake picks it
    up *twice*: once from the -DOVERLAY_CONF= option already mentioned above
    and a second time because kconfig.cmake scans the build directory and
    blindly picks up ALL files ending with .conf[*]. The second pickup is
    problematic because kconfig.cmake currently gives it the top precedence,
    even higher than anything the user espressed with --extra-args=CONFIG_*
    
    Here's a quick and simple demonstration of the issue fixed by this
    commit:
    
      cd $ZEPHYR_BASE/samples/net/sockets/net_mgmt/
      sanitycheck -T. -p qemu_x86 -b -v # --extra-args=CONFIG_USERSPACE=y|n
      grep CONFIG_USERSPACE $(find sanity-out/ -name .config)
    
      .net_mgmt.kernelmode/zephyr/.config: # CONFIG_USERSPACE is not set
        .net_mgmt.usermode/zephyr/.config: CONFIG_USERSPACE=y
    
      grep 'Merged configuration' $(find sanity-out/ -name build.log)
    
    Without this commit, attemps to override anything with
    --extra-args=CONFIG_ are silently dropped on the floor.
    
    For more background this issue was found while using the recipe in
    commit message 4afcc0f
    
    [*] picking up all .conf files is debatable but a much bigger debate
    with backward compatibility implications. This small fix makes
    absolutely zero difference to anyone or anything not using sanitycheck.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jul 8, 2019
  1. sanitycheck help: how to spot tests that were not run and just built

    marc-hb authored and nashif committed Apr 8, 2019
    There are a few reasons why sanitycheck will only build a test and not
    run it: list them in the developer guide. Also lists the --options that
    provide that information and update their --help message.
    
    A couple other --help fixes.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  2. sanitycheck: replace cmake -H "not meant for public use" with -S

    marc-hb authored and nashif committed Jul 6, 2019
    https://www.mail-archive.com/cmake-developers@cmake.org/msg16769.html
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jul 7, 2019
  1. doc: add space after cmake -Bdir and ninja -Cdir options

    marc-hb authored and nashif committed Jul 6, 2019
    Let's be consistent with official cmake, ninja and make documentations.
    
    https://cmake.org/cmake/help/latest/manual/cmake.1.html
    cmake --help
    man cmake
    
    https://ninja-build.org/manual.html#_running_ninja
    ninja --help
    
    https://www.gnu.org/software/make/manual/make.html#Options-Summary
    info make 'Options Summary'
    etc.
    
    Related to issue #15315
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  2. subsys tracing: remove (uintptr_t) casts in snprintk and use %p

    marc-hb authored and nashif committed Jul 3, 2019
    Fixes -Werror=format: '%x' expects argument of type 'unsigned int', but
    argument N has type 'long unsigned int'
    
    Reproduced with sanitycheck -p bl652_dvk (or -p any other
    HAS_SEGGER_RTT) and by adding CONFIG_SEGGER_SYSTEMVIEW=y to
    samples/philosophers/prj.conf. sanitycheck adds -Werror.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jul 4, 2019
  1. tests/net/ptp/clock: add 'userspace' tag

    marc-hb authored and jukkar committed Jul 1, 2019
    ... because this test does use userspace, as seen in the source or
    demonstrated by the failure of this command:
    
      sanitycheck --extra-args=CONFIG_TEST_USERSPACE=n
    
    See commit message of 4afcc0f for the long story.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  2. sanitycheck: fix --jobs help message + other cosmetic fixes

    marc-hb authored and andrewboie committed Jul 3, 2019
    The --jobs default was recently changed in commit 9f4f57e, update
    its help message.
    
    Add the hopefully last missing verbose("Spawning...") statement.
    
    Fix comment updated in commit 095b82a.
    
    Replace two tags with whitespace.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jul 2, 2019
  1. cmake: remove spurious IS_ABSOLUTE logic in zephyr_sources()

    marc-hb authored and nashif committed Jun 1, 2019
    target_sources() documentation states:
    
      Relative source file paths are interpreted as being relative to the
      current source directory (i.e. CMAKE_CURRENT_SOURCE_DIR).
    
    Remove spurious code duplicating cmake's behaviour. It proved to be a
    time-consuming red herring while debugging some path-related issue and
    "less is more".
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  2. samples/**/external_lib: invoke $(MAKE) instead of make

    marc-hb authored and galak committed Jun 28, 2019
    Recursive make should be invoked as $(MAKE) and not "make" for reasons
    documented at
     https://www.gnu.org/software/make/manual/html_node/MAKE-Variable.html
    
    $(MAKE) is what CMake puts in all the CMakeFiles/Makefile2 it generates,
    it doesn't use "make" either.
    
    Issue found thanks to the following warning:
     build.log:make[4]: warning: jobserver unavailable: using -j1.
                        Add '+' to parent make rule.
    
    If CMake is invoked with -GNinja or other then fall back on "make" as
    before and pray that it's available.
    
    Fast reproduction with:
       make -j2 -C build clean mylib_project VERBOSE=1
    
    Build directories have been compared before/after this change and
    there's zero difference except the generated
    mylib_project.dir/build.make file (and the warning above) when using
    make.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jun 28, 2019
  1. gen_app_partitions: deterministic _and_ decreasing app_smem_*.ld

    marc-hb authored and andrewboie committed Jun 27, 2019
    Commit 212ec9a / feature #14121 already ordered partitions by
    decreasing size, however it was common in samples/userspace/shared_mem/
    /sample.kernel.memory_protection.shared_mem for two partitions to have
    the same size and be randomly ordered between them. This adds the
    partition name as a second sort key.
    
    Unlike previous attempt in commit 725abdf this doesn't use the
    partition name as the first (and only) key and doesn't break the
    decreasing size order.  Huge thanks to Sigvart Hovland for spotting this
    in a post-merge but prompt code review.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  2. Revert "gen_app_partitions.py: make generated/app_smem_*.ld files det…

    marc-hb authored and andrewboie committed Jun 27, 2019
    …erministic"
    
    This reverts commit 725abdf which did get rid of randomness in the
    order of the partition _names_ as claimed but regressed commit
    212ec9a / feature #14121 and broke the previous size order which I
    missed. Huge thanks to Sigvart Hovland for spotting this in a post-merge
    but prompt code review. Proper fix in the next commit.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jun 27, 2019
  1. gen_app_partitions.py: make generated/app_smem_*.ld files deterministic

    marc-hb authored and nashif committed Jun 21, 2019
    Dictionaries are not ordered in Python 3.5 and before, so building twice
    in a row could lead to a different partition order, different
    build/zephyr/include/generated/app_smem_*.ld files and different
    binaries.
    
    Fix with a minor change to the "for" loop in the output function:
    make it iterate on sorted(partitions.items()) instead of the raw and
    randomly ordered partitions dictionary.
    
    It is easy to reproduce the issue even without downgrading to an
    obsolete Python version; pick a test like samples/userspace/shared_mem/
    and simply change the code to this:
    
    --- a/scripts/gen_app_partitions.py
    +++ b/scripts/gen_app_partitions.py
    @@ -159,10 +159,12 @@ def parse_elf_file(partitions):
                         partitions[partition_name][SZ] += size
    
    +import random
     def generate_final_linker(linker_file, partitions):
         string = linker_start_seq
         size_string = ''
    -    for partition, item in sorted(partitions.items()):
    +    for partition, item in sorted(partitions.items(),
    +                                  key=lambda x: random.random()):
             string += data_template.format(partition)
             if LIB in item:
                 for lib in item[LIB]:
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  2. gen_relocate_app.py: make generated/linker_relocate.ld deterministic

    marc-hb authored and nashif committed Jun 24, 2019
    Dictionaries are not ordered in Python 3.5 and before, so building twice
    ${ZEPHYR_BASE}/samples/application_development/code_relocation/
    in a row could lead to a different sections order, different
    build/zephyr/include/generated/linker_relocate.d and code_relocation.c
    and different binaries.
    
    Fix with a minor change to three "for" loops in the output functions:
    make them iterate on sorted(list of sections) instead of the raw and
    randomly ordered dictionaries of sections.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jun 26, 2019
  1. Apply David's English corrections from code review

    2 people authored and nashif committed Jun 25, 2019
    Co-Authored-By: David Kinder <david.b.kinder@intel.com>
  2. doc: how to unset Clear Linux' CFLAGS and CXXFLAGS

    marc-hb authored and nashif committed Jun 24, 2019
    Clear Linux exports to all users a list of "aggressive" compiler and
    linker flags. Zephyr's CMake build system will either warn or fail
    because of these. Add one magic command that solves the issue.
    
    More background information at https://superuser.com/a/1452523/111302
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jun 21, 2019
  1. sanitycheck: show handler_time in -v output (qemu 2.032s)

    marc-hb authored and nashif committed Jun 20, 2019
    We already have the info so let's show it. This helps spots intermittent
    issues[*], gives an indication of the time --build-only saves, can help
    spot an overloaded test system, highlights the most time-consuming tests
    which may need a longer timeout in their config, shows the effective
    timeout value when one occurs... all this for a dirt cheap screen estate
    price and two extra lines of code.
    
    Sample -v output:
    
    32/81 board123  tests/testme              PASSED (qemu 2.049s)
    33/81 board456  samples/hello             PASSED (build)
    34/81 qemu_x3   tests/kernel.stack.usage  FAILED: timeout (qemu 60.029s)
         see: sanity-out/qemu_x3/tests/kernel.stack.usage/handler.log
    35/81 board456  tests/testme              PASSED (build)
    36/81 qemu_x5   tests/kernel.queue        FAILED: failed (qemu 2.191s)
         see: sanity-out/qemu_x5/tests/kernel.queue/handler.log
    
    [*] running qemu in heavily packed cloud virtual machines comes to mind,
        also see #12553, #14173 etc.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  2. tests: minor FCB re-ordering not to leave a random flash.bin behind

    marc-hb authored and carlescufi committed Jun 20, 2019
    The last FCB test to run (fcb_test_last_of_n) uses uninitialized
    test_data[] and leaves behind a flash.bin with random content. Pick
    another one (fcb_test_reset) that leaves a deterministic flash.bin
    behind and run that last instead.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jun 19, 2019
  1. BOOT_BANNER: show KERNEL_VERSION and BUILD_VERSION differently

    marc-hb authored and nashif committed Jun 17, 2019
    Zephyr has two unrelated build _VERSIONs: KERNEL_VERSION and
    BUILD_VERSION. Prefix them slightly differently in BOOT_BANNER so anyone
    can instantly zoom in on which one is being used without having to
    compare the implementation details of both.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  2. generated/cfb_font_dice.h: don't leak absolute paths in comment

    marc-hb authored and nashif committed Jun 11, 2019
    The start of generated/cfb_font_dice.h looked like this:
    
    /*
     * This file was automatically generated using the following command:
     * /home/john/zephyrproject/zephyr/scripts/gen_cfb_font_header.py
     * --input fonts/dice.png --output
     * /home/john/tmp/build/zephyr/include/generated//cfb_font_dice.h
     * --width 32 --height 32 --first 49 --last 54
     */
    
    For build reproduction and "privacy" reasons, change it to this:
    
    /*
     * This file was automatically generated using the following command:
     * ${ZEPHYR_BASE}/scripts/gen_cfb_font_header.py
     * --input fonts/dice.png --output
     * zephyr/include/generated//cfb_font_dice.h
     * --width 32 --height 32 --first 49 --last 54
     */
    
    Test with:
      sanitycheck  -p reel_board \
      -T $ZEPHYR_BASE/samples/display/cfb_custom_font/
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jun 18, 2019
  1. cmake: silence "WARNING: ASSERTs enabled" when CONFIG_TEST is true

    marc-hb authored and nashif committed Jun 17, 2019
    TEST configurations don't need to be warned that they're using test
    techniques with some side-effects.
    
    On a typical sanitycheck invocation, this warning is one of the only two
    that appears in most test runs. In other words this commit gets rid of
    half of the entire grep -ri '[[:blank:]]warn' noise that obscures any
    work-in-progress warnings or platform specific warnings in the
    logs (typically: device tree warnings).
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jun 17, 2019
  1. CMakeLists.txt: -fmacro-prefix-map=${CMAKE_SOURCE_DIR}=CMAKE_SOURCE_DIR

    marc-hb authored and nashif committed May 31, 2019
    In commit 28a5657 we stopped ZEPHYR_BASE from leaking into
    __FILE__ and other macros.  This works great for apps inside ZEPHYR_BASE
    but does nothing for apps outside ZEPHYR_BASE.
    -fmacro-prefix-map=${CMAKE_SOURCE_DIR}=CMAKE_SOURCE_DIR does it.
    
    To avoid collisions and for consistency change:
      -fmacro-prefix-map=${ZEPHYR_BASE}=.
    to:
      -fmacro-prefix-map=${ZEPHYR_BASE}=ZEPHYR_BASE
    
    Quickest test/demo:
    
     - Copy samples/hello_word/ to ~/home_world/
     - Add "%s", __FILE__  to printf in ~/home_world/src/main.c
    
     cmake -B build  -S ~/home_world/  -DBOARD=qemu_x86
     make  -C build  run
    
    Before:
         ~/home_world/src/main.c says Hello World! qemu_x86
    
    After:
     CMAKE_SOURCE_DIR/src/main.c says Hello World! qemu_x86
    
    objdump -h $(find build -name *.c.obj) | grep noinit
    
      9 .noinit."ZEPHYR_BASE/kernel/system_work_q.c".0 0000
     17 .noinit."ZEPHYR_BASE/kernel/init.c".2 00000100  000
     18 .noinit."ZEPHYR_BASE/kernel/init.c".1 00000400  000
     19 .noinit."ZEPHYR_BASE/kernel/init.c".3 00000800  000
     16 .noinit."ZEPHYR_BASE/kernel/mailbox.c".2 00000348
     18 .noinit."ZEPHYR_BASE/kernel/mailbox.c".1 00000028
     20 .noinit."ZEPHYR_BASE/kernel/pipes.c".2 00000280  00
     22 .noinit."ZEPHYR_BASE/kernel/pipes.c".1 00000028  00
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  2. cmake: stop destroying intermediate link maps like zephyr_prebuilt.map

    marc-hb authored and andrewboie committed Jun 13, 2019
    The different linker steps are all hardcoded to the output filename
    "zephyr.map" and only the last one survives.
    
    Un-harcode.
    
    This removes some confusion when trying to follow who builds
    what/when/how and it stops destroying intermediate linking information
    useful when tracing/debugging new features or issues in the build.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Jun 11, 2019
  1. cmake: warn if inconsistency between CMAKE_SOURCE_DIR and ZEPHYR_BASE

    marc-hb authored and nashif committed May 31, 2019
    cmake has a number of issues dealing with symbolic links:
    
      https://gitlab.kitware.com/cmake/cmake/issues/16228
    
    One of them can cause cmake to rewrite the -S input from the user and
    CMAKE_SOURCE_DIR to unexpectedly include symbolic links:
    
      https://cmake.org/pipermail/cmake/2019-May/thread.html#69496
    
    Catch this corner case and warn about subtle issues like breaking
    -fmacro-prefix-map=${ZEPHYR_BASE}=
    
    Sample warning message:
    
    CMake Warning at ../../CMakeLists.txt:30 (message):
      ZEPHYR_BASE doesn't match CMAKE_CURRENT_SOURCE_DIR
    
        ZEPHYR_BASE              = ~/zephyrproject/zephyr
        PWD                      = ~/westsymlink/zephyr/samples/hello_world
        CMAKE_CURRENT_SOURCE_DIR = ~/westsymlink/zephyr
    
      You may be using a mix of symbolic links and real paths which causes
      subtle and hard to debug CMake issues.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on May 30, 2019
  1. sanitycheck: CONFIG_TEST_USERSPACE / userspace tag cleanup

    marc-hb authored and nashif committed May 21, 2019
    - Delete CONFIG_TEST_USERSPACE=n no-ops because it's the default
    since commit 7b1ee5c
    
    - Some tests have a "userspace" tag pretending to TEST_USERSPACE but
    don't and vice versa: fix missing or spurious "userspace" tags in
    testcase.yaml files.
    
    Tests have a _spurious_ "userspace" tag when they PASS this command
    cause none should pass:
    
      ./scripts/sanitycheck --tag=userspace -p qemu_x86 \
          --extra-args=CONFIG_TEST_USERSPACE=n  \
          --extra-args=CONFIG_USERSPACE=n | tee userspace.log
    
    All tests run by this command must either fail to build or fail to run
    with some userspace related error. Shortcut to look at all test
    failures:
    
     zephyr_failure_logs() {
         awk '/see.*log/ {print $2}' "$@"
     }
    
    Tests _missing_ "userspace" tag FAIL to either build or to run with some
    userspace related error when running this:
    
      ./scripts/sanitycheck --exclude=userspace -p qemu_x86 \
          --extra-args=CONFIG_TEST_USERSPACE=n  \
          --extra-args=CONFIG_USERSPACE=n | tee excludeuserspace.log
    
    Note the detection methods above are not 100% perfect because some
    flexible tests like tests/kernel/queue/src/main.c evade them with #ifdef
    CONFIG_USERSPACE smarts. Considering they never break, it is purely the
    test author's decision to include or not such flexible tests in the
    "userspace" subset.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on May 24, 2019
  1. extensions.cmake: don't leak absolute paths in snippets-*.ld comment

    marc-hb authored and carlescufi committed May 23, 2019
    Make headers look like this instead:
    
         /* From ${ZEPHYR_BASE}/arch/common/isr_tables.ld: */
    
    Besides being shorter and more "private", this makes the content of
    snippets-*.ld files the same no matter who built them and where.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on May 22, 2019
  1. tests/bluetooth/tester: remove spurious CONFIG_GPIO=y

    marc-hb authored and nashif committed May 21, 2019
    This tries to build gpio without any driver which fails at cmake time
    like this:
    
    CMake Error at ../../../cmake/extensions.cmake:378 (add_library):
      No SOURCES given to target: drivers__gpio
      Call Stack (most recent call first):
      ../../../cmake/extensions.cmake:355 (zephyr_library_named)
      ../../../drivers/gpio/CMakeLists.txt:3 (zephyr_library)
    
    Remove TEST_USERSPACE workaround added in commit 3b53e69 which
    added gpio_handlers.c to the SOURCES.
    
    Fixes #15232.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on May 21, 2019
  1. sanitycheck: when present, point at handler.log instead of run.log

    marc-hb authored and nashif committed May 13, 2019
    When Zephyr crashes immediately QEMU reports an error immediately. This
    is immediately reported by "make run". Then sanitycheck points the user
    at the output of "make run". However the error message(s) are in QEMU's
    output which is in a different .log file.
    
    To address this situation point the error message at handler.log
    instead of run.log if and only if handler.log is not empty.
    
    To reproduce here's an artificial but very simple crash:
    
      sanitycheck --extra-args=CONFIG_TEST_USERSPACE=n \
        -p qemu_x86 -T tests/kernel/mem_protect/stackprot/
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on May 9, 2019
  1. cmake: explain BUILD_VERSION and KERNEL_VERSION_*

    marc-hb authored and carlescufi committed May 4, 2019
    - Add examples for the latter.
    - Point at each other and highlight how independent they are from each
      other.
    - State their inputs and outputs in plain English.
    - Fix "git describe" error message giving the wrong impression that
      everyone cares about BUILD_VERSION. Only the boot banner cares now.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on May 8, 2019
  1. sanitycheck: support symbolic links in ZEPHYR_BASE

    marc-hb authored and nashif committed Apr 16, 2019
    Fix issue where sanitycheck wrongly assumed tests inside ZEPHYR_BASE
    to be outside ZEPHYR_BASE and dropped the prefix in their name. This
    happened when:
    - ZEPHYR_BASE contains symbolic link(s), and
    - relative --testcase-root argument(s) are passed
    
    To generate unique names, TestCase.get_unique(testcase_root) first
    checks whether "testcase_root" starts with ZEPHYR_BASE. Either may or
    may not include symbolic links so both must be canonicalized before
    comparison. While fixing this method, replace explicit forward slash
    "/" and string replace with os.path.relpath() and make a couple other
    simplifications and minor pydoc fixes.
    
    Add new canonical_zephyr_base = os.path.realpath(ZEPHYR_BASE) constant
    and corresponding comments and guidelines.
    
    The most visible effect of this mismatch was sanitycheck dropping the
    --testcase-root prefix from the unique name of tests inside
    ZEPHYR_BASE. This means some test names could be not unique anymore
    and silently overwrite each other's results, example:
    
     bash# cd zephyr_dir_with_symlink; export ZEPHYR_BASE=$(pwd)
     ./scripts/sanitycheck -T samples/portability/cmsis_rtos_v1 \
                           -T samples/portability/cmsis_rtos_v2
    
    The more systematic and practical consequence (and how I actually
    found this) was test outputs landing in unexpected locations.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on May 4, 2019
  1. sanitycheck: clarify who spawns processes and threads and where

    marc-hb authored and nashif committed Apr 30, 2019
    Notably fix the wrong comment I added in commit 6f011c9: when
    testing with QEmu sanitycheck does _not_ spawn QEmu; it relies on "make
    run" instead.
    
    Searching the code for "Spawning" now cycles directly to all the places
    starting processes and threads.
    
    - Sample -v -v verbose output (lines wrapped for commit message check)
    
     Spawning QEMUHandler Thread for \
         qemu_x86/samples/hello_world/sample.helloworld 'make run'
    
    - native_posix example:
    
     Spawning process /home/.../sanity-out/native_posix/\
        /samples/hello_world/sample.helloworld/zephyr/zephyr.exe
     Spawning BinaryHandler Thread for native_posix/\
         samples/hello_world/sample.helloworld
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Apr 30, 2019
  1. CODEOWNERS: include/cortex_m/csme/ -> include/cortex_m/csme.h

    marc-hb authored and andrewboie committed Apr 30, 2019
    Typo fix as discussed in original PR #14475 for commit eb82bdd
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Commits on Apr 26, 2019
  1. gen_kobject_list.py: better comments and --help. Zero code change.

    marc-hb authored and galak committed Apr 16, 2019
    - The script can but does not always generate five files, in fact the
      current build invokes it at least three times requesting different
      outputs every time.
    
    - --kobj-types-output produces a code fragment; not a standalone/usable
      header file. It outputs enum constants for a single enum type and not
      several enum types.
    
    - Some outputs include driver instances and others not: clarify which.
    
    - There's an entire and great section in the documentation that took
      me ages to find because it's not referenced anywhere in the --help
      or code. Fixed.
    
    - Highlight the massive duplication in the CMakeLists.txt to save
      déjà vu confusion and minimize future divergence.
    
    - Other minor tweaks.
    
    Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Older
You can’t perform that action at this time.