Add uncrustify github workflow (#659)

* Add uncrustify github workflow

* Fix exclusion pattern

* fix find expression

* exclude uncrustify files

* Uncrustify common demo and test files

* exlude white space checking files

* Fix EOL whitespace checker

* Remove whitespaces from EOL

* Fix space at EOL

* Fix find spaces at EOL

Co-authored-by: Archit Aggarwal <architag@amazon.com>
This commit is contained in:
alfred gedeon 2021-07-22 14:23:48 -07:00 committed by GitHub
parent dd80d615b5
commit ae92d8c6ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
191 changed files with 17540 additions and 17102 deletions

View file

@ -34,46 +34,52 @@
#include "cbmc.h"
#ifndef LOCK_BOUND
#define LOCK_BOUND 4
#define LOCK_BOUND 4
#endif
#ifndef QUEUE_PEEK_BOUND
#define QUEUE_PEEK_BOUND 4
#define QUEUE_PEEK_BOUND 4
#endif
QueueHandle_t xQueue;
/* This method is called to initialize pxTimeOut.
Setting up the data structure is not interesting for the proof,
but the harness uses it to model a release
on the queue after first check. */
void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut ){
xQueue-> uxMessagesWaiting = nondet_BaseType_t();
* Setting up the data structure is not interesting for the proof,
* but the harness uses it to model a release
* on the queue after first check. */
void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut )
{
xQueue->uxMessagesWaiting = nondet_BaseType_t();
}
void harness(){
xQueue = xUnconstrainedQueueBoundedItemSize(10);
void harness()
{
xQueue = xUnconstrainedQueueBoundedItemSize( 10 );
//Initialise the tasksStubs
vInitTaskCheckForTimeOut(0, QUEUE_PEEK_BOUND - 1);
/*Initialise the tasksStubs */
vInitTaskCheckForTimeOut( 0, QUEUE_PEEK_BOUND - 1 );
TickType_t xTicksToWait;
if(xState == taskSCHEDULER_SUSPENDED){
xTicksToWait = 0;
}
TickType_t xTicksToWait;
if(xQueue){
__CPROVER_assume(xQueue->cTxLock < LOCK_BOUND - 1);
__CPROVER_assume(xQueue->cRxLock < LOCK_BOUND - 1);
if( xState == taskSCHEDULER_SUSPENDED )
{
xTicksToWait = 0;
}
void *pvItemToQueue = pvPortMalloc(xQueue->uxItemSize);
if( xQueue )
{
__CPROVER_assume( xQueue->cTxLock < LOCK_BOUND - 1 );
__CPROVER_assume( xQueue->cRxLock < LOCK_BOUND - 1 );
/* In case malloc fails as this is otherwise an invariant violation. */
if(!pvItemToQueue){
xQueue->uxItemSize = 0;
}
void * pvItemToQueue = pvPortMalloc( xQueue->uxItemSize );
xQueuePeek( xQueue, pvItemToQueue, xTicksToWait );
}
/* In case malloc fails as this is otherwise an invariant violation. */
if( !pvItemToQueue )
{
xQueue->uxItemSize = 0;
}
xQueuePeek( xQueue, pvItemToQueue, xTicksToWait );
}
}