Hi Alex

Could you please take a look on this, so we can merge it together with
buffer/packet changes.

On 12/13/2014 02:48 PM, Taras Kondratiuk wrote:
> Current crypto tests calculate range offsets expecting a bug in crypto
> implementation: data offsets are applied relatively to a start of a
> buffer instead of start of data in a packet. This bug is fixed in
> linux-generic by recent buffer/packet rework patches, so all crypto
> tests fails now. Remove this workaround.
> 
> Signed-off-by: Taras Kondratiuk <[email protected]>
> ---
> This patch should be merged just after Bill's buffer/packet changes
> for v0.5.
> ---
>  test/validation/crypto/odp_crypto_test_async_inp.c | 4 +---
>  test/validation/crypto/odp_crypto_test_sync_inp.c  | 4 +---
>  2 files changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/test/validation/crypto/odp_crypto_test_async_inp.c 
> b/test/validation/crypto/odp_crypto_test_async_inp.c
> index c140c0f..96d4c3f 100644
> --- a/test/validation/crypto/odp_crypto_test_async_inp.c
> +++ b/test/validation/crypto/odp_crypto_test_async_inp.c
> @@ -67,9 +67,7 @@ static void alg_test(enum odp_crypto_op op,
>       CU_ASSERT(pkt != ODP_PACKET_INVALID);
>       uint8_t *data_addr = odp_packet_data(pkt);
>       memcpy(data_addr, input_vec, input_vec_len);
> -     /* offsets are relative to buffer address (not packet data)
> -     until https://bugs.linaro.org/show_bug.cgi?id=387 is fixed */
> -     int data_off = data_addr - (uint8_t *)odp_buffer_addr(buf);
> +     const int data_off = 0;
>  
>       /* Prepare input/output params */
>       odp_crypto_op_params_t op_params;
> diff --git a/test/validation/crypto/odp_crypto_test_sync_inp.c 
> b/test/validation/crypto/odp_crypto_test_sync_inp.c
> index b63fd4d..f37ad54 100644
> --- a/test/validation/crypto/odp_crypto_test_sync_inp.c
> +++ b/test/validation/crypto/odp_crypto_test_sync_inp.c
> @@ -56,9 +56,7 @@ static void alg_test(enum odp_crypto_op op,
>       CU_ASSERT(pkt != ODP_PACKET_INVALID);
>       uint8_t *data_addr = odp_packet_data(pkt);
>       memcpy(data_addr, input_vec, input_vec_len);
> -     /* offsets are relative to buffer address (not packet data)
> -     until https://bugs.linaro.org/show_bug.cgi?id=387 is fixed */
> -     int data_off = data_addr - (uint8_t *)odp_buffer_addr(buf);
> +     const int data_off = 0;
>  
>       /* Prepare input/output params */
>       odp_crypto_op_params_t op_params;
> 


-- 
Taras Kondratiuk

_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to