test/net: fix PTP clock test code
test/net: fix PTP clock test code

The various ptp_clock_driver_api methods receive a struct ptp_context
not a struct eth_context, and the later must be obtained from a
reference stored in the former. Failing to do so by directly
interpreting driver_data as a struct eth_context instance does end up
corrupting memory past the actual struct ptp_context storage. The test
may still pass as ptp_clock_get() reads from the same out-of-bounds
memory as the previous ptp_clock_set() and therefore the content
matches, and with luck the corrupted memory is not essential to the
completion of the test. But that wasn't my case which allowed me to
find this issue.

Fix this by properly obtaining a reference to the struct eth_context
instance via the actual struct ptp_context, and adding a test like
the one found in eth_tx() to make sure we got the right memory.

Signed-off-by: Nicolas Pitre <76342682d5afc62854e1102d9578521fe1ed6813@baylibre.com>

finikorg/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,Vudentz/zephyr,nashif/zephyr,galak/zephyr,finikorg/zephyr,Vudentz/zephyr,GiulianoFranchetto/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,GiulianoFranchetto/zephyr,finikorg/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,GiulianoFranchetto/zephyr,GiulianoFranchetto/zephyr,nashif/zephyr,galak/zephyr,nashif/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,finikorg/zephyr,GiulianoFranchetto/zephyr,nashif/zephyr,galak/zephyr,Vudentz/zephyr,finikorg/zephyr,nashif/zephyr,galak/zephyr,galak/zephyr