Skip to content

Commit

Permalink
Fix DNSHandlePacket CBMC test
Browse files Browse the repository at this point in the history
  • Loading branch information
ActoryOu committed Jul 11, 2024
1 parent 598d87a commit 6a7eff0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
15 changes: 11 additions & 4 deletions test/cbmc/proofs/DNS/DNSHandlePacket/DNShandlePacket_harness.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@
#include "FreeRTOS_DNS.h"
#include "FreeRTOS_IP_Private.h"

/* Function prvParseDNSReply is proven to be correct separately. */
uint32_t prvParseDNSReply( uint8_t * pucUDPPayloadBuffer,
size_t xBufferLength,
BaseType_t xExpected )
/* CBMC includes. */
#include "cbmc.h"

/* Function DNS_ParseDNSReply is proven to be correct separately. */
uint32_t DNS_ParseDNSReply( uint8_t * pucUDPPayloadBuffer,
size_t uxBufferLength,
struct freertos_addrinfo ** ppxAddressInfo,
BaseType_t xExpected,
uint16_t usPort )
{
__CPROVER_assert( pucUDPPayloadBuffer != NULL, "pucUDPPayloadBuffer cannot be NULL" );
return nondet_uint32();
}

void harness()
Expand Down
3 changes: 2 additions & 1 deletion test/cbmc/proofs/DNS/DNSHandlePacket/Makefile.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"OBJS":
[
"$(ENTRY)_harness.goto",
"$(FREERTOS_PLUS_TCP)/source/FreeRTOS_DNS.goto"
"$(FREERTOS_PLUS_TCP)/source/FreeRTOS_DNS.goto",
"$(FREERTOS_PLUS_TCP)/source/FreeRTOS_IP.goto"
],
"DEF":
[
Expand Down

0 comments on commit 6a7eff0

Please sign in to comment.