zephyr/tests
Peter A. Bigot 765c06376c Revert "sys/util.h: helper macro to perform pointer difference"
This reverts commit 755cc644cc.

This approach is problematic in several ways.  First, `intptr_t` could
cause undefined behavior in the subtraction when the pointer converts to
a negative value.  Except in weird cases where the sign of the pointer
identifies a memory domain (like kernel vs userspace) I'm unaware of any
valid use of `intptr_t`.

Second, this macro was created to address a special need that cannot
rely on defined behavior: i.e. to ensure that data definitions are
placed in contiguous space and access is provided through linker-defined
symbols, for which the language required alignment and continuity is not
guaranteed.

A macro that calculates the span between linker symbols has very
different semantics than one that calculates the difference between
pointers.  Replace the global PTR_DIFF with a documented local macro
that tests what's necessary without risking integer overflow.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-07-17 03:44:03 -04:00
..
application_development cleanup: include/: move misc/byteorder.h to sys/byteorder.h 2019-06-27 22:55:49 -04:00
arch tests: arch: arm_thread_swap: add README file 2019-07-14 04:53:14 -07:00
benchmarks cleanup: include/: move misc/util.h to sys/util.h 2019-06-27 22:55:49 -04:00
bluetooth tests: enable native_posix_64 testing 2019-07-16 10:41:11 -07:00
boards tests: enable native_posix_64 testing 2019-07-16 10:41:11 -07:00
booting/stub license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
cmsis_rtos_v1 tests/cmsis_rtos_v1: Correct timing assumptions 2019-07-02 22:52:29 -04:00
cmsis_rtos_v2 CMSIS v2: Work around time unit confusion 2019-07-02 22:52:29 -04:00
crypto kernel: lib: Add convert functions for hex strings and binary arrays 2019-07-16 12:44:18 +02:00
drivers tests: pinmux: remove whitelisting 2019-07-12 05:54:16 -07:00
kernel tests: enable native_posix_64 testing 2019-07-16 10:41:11 -07:00
lib prf.c: handle denormals properly 2019-07-14 23:07:44 -04:00
misc cleanup: include/: move misc/util.h to sys/util.h 2019-06-27 22:55:49 -04:00
net tests: enable native_posix_64 testing 2019-07-16 10:41:11 -07:00
posix tests/posix/common: Adjust miscalibrated timing test 2019-07-02 22:52:29 -04:00
shell shell: add test for new built-in command 2019-05-24 11:04:42 +02:00
subsys Revert "sys/util.h: helper macro to perform pointer difference" 2019-07-17 03:44:03 -04:00
unit tests: crc: convert to regular test case 2019-07-06 00:31:04 +02:00
ztest subsys/testsuite/ztest: change zassert_mem_equal to macro 2019-06-03 09:39:37 -04:00