mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-25 06:04:17 +08:00
psxtests - Eliminate missing prototype warnings
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
/* Task_1
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* Task_1
|
||||
*
|
||||
* This routine serves as a test task. It verifies the basic task
|
||||
* switching capabilities of the executive.
|
||||
*
|
||||
* Input parameters:
|
||||
* argument - task argument
|
||||
*
|
||||
* Output parameters: NONE
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -24,6 +24,13 @@
|
||||
#include <time.h>
|
||||
#include <sched.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void diff_timespec(
|
||||
struct timespec *start,
|
||||
struct timespec *stop,
|
||||
struct timespec *result
|
||||
);
|
||||
|
||||
void diff_timespec(
|
||||
struct timespec *start,
|
||||
struct timespec *stop,
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
|
||||
#include "tmacros.h"
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
|
||||
/*
|
||||
* This test case shows that post switch extension handlers must cope with
|
||||
* already deleted resources (e.g. _POSIX_signals_Post_switch_extension()).
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2011.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -15,6 +15,10 @@
|
||||
#include "test_support.h"
|
||||
#include <pthread.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
void *TestThread(void *argument);
|
||||
|
||||
int Index;
|
||||
|
||||
void *TestThread(
|
||||
@@ -29,9 +33,7 @@ void *TestThread(
|
||||
return argument;
|
||||
}
|
||||
|
||||
void *POSIX_Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
void *POSIX_Init(void *argument)
|
||||
{
|
||||
int status;
|
||||
pthread_t id;
|
||||
|
||||
@@ -25,6 +25,10 @@
|
||||
#define BUFSIZE 512
|
||||
#define WRONG_FD 404
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
struct aiocb *create_aiocb(int fd);
|
||||
void free_aiocb(struct aiocb *aiocbp);
|
||||
|
||||
struct aiocb *
|
||||
create_aiocb (int fd)
|
||||
{
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
#include <fcntl.h>
|
||||
#include <rtems/chain.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
struct aiocb *create_aiocb(int fd);
|
||||
void free_aiocb(struct aiocb *aiocbp);
|
||||
|
||||
#define BUFSIZE 32
|
||||
#define MAX 10
|
||||
#define WRONG_FD 666
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
#include <fcntl.h>
|
||||
#include <rtems/chain.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
struct aiocb *create_aiocb(int fd);
|
||||
void free_aiocb(struct aiocb *aiocbp);
|
||||
|
||||
#define MAX 6
|
||||
#define BUFSIZE 128
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -16,6 +16,9 @@
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
|
||||
volatile int Signal_occurred;
|
||||
volatile int Signal_count;
|
||||
void Signal_handler( int signo );
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -15,6 +15,9 @@
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
|
||||
void *POSIX_Init(
|
||||
void *argument
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -15,6 +15,9 @@
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
|
||||
void *POSIX_Init(
|
||||
void *argument
|
||||
)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* Simple test program -- simplified version of sample test hello.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -18,6 +16,9 @@
|
||||
#include <bsp.h>
|
||||
#include <pmacros.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
|
||||
void test_main( void );
|
||||
|
||||
rtems_task Init(
|
||||
|
||||
@@ -22,6 +22,12 @@
|
||||
#include <pmacros.h>
|
||||
#endif
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
void countTask_cancel_handler(void *ignored);
|
||||
void *countTaskDeferred(void *ignored);
|
||||
void *countTaskAsync(void *ignored);
|
||||
|
||||
volatile bool countTask_handler;
|
||||
|
||||
void countTask_cancel_handler(void *ignored)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -14,6 +14,25 @@
|
||||
#include <pmacros.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
rtems_timer_service_routine Cancel_duringISR_TSR(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
);
|
||||
rtems_timer_service_routine SetState_duringISR_TSR(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
);
|
||||
rtems_timer_service_routine SetType_duringISR_TSR(
|
||||
rtems_id ignored_id,
|
||||
void *ignored_address
|
||||
);
|
||||
void doit(
|
||||
rtems_timer_service_routine (*TSR)(rtems_id, void *),
|
||||
const char *method
|
||||
);
|
||||
|
||||
volatile int TSR_occurred;
|
||||
volatile int TSR_status;
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
#include <bsp.h>
|
||||
#include <pmacros.h>
|
||||
|
||||
void test_main( void );
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
int test_main(void);
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* Modifications to support reference counting in the file system are
|
||||
@@ -26,6 +26,9 @@
|
||||
#include <pmacros.h>
|
||||
#include <rtems/libcsupport.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
int test_main(void);
|
||||
|
||||
static void touch( char *file )
|
||||
{
|
||||
int fd;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
/*
|
||||
* Based upon user code supplied in conjunction with PR1759
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2011.
|
||||
* Based upon user code supplied in conjunction with PR1759
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -24,6 +28,12 @@
|
||||
int Caught_signo = -1;
|
||||
siginfo_t Caught_siginfo = { -1, -1, };
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument arg);
|
||||
void handler(int signo);
|
||||
void handler_info(int signo, siginfo_t *info, void *context);
|
||||
rtems_task test_task(rtems_task_argument arg);
|
||||
|
||||
void handler(int signo)
|
||||
{
|
||||
Caught_signo = signo;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -16,6 +15,10 @@
|
||||
#include "pmacros.h"
|
||||
#include <pthread.h> /* thread facilities */
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
void cleaner(void *arg);
|
||||
|
||||
void cleaner(void *arg)
|
||||
{
|
||||
puts( "clean was not supposed to run" );
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -17,6 +17,8 @@
|
||||
#include "pmacros.h"
|
||||
#include "pritime.h"
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
void check_enosys(int status);
|
||||
|
||||
void check_enosys(int status)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -15,6 +15,10 @@
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
void *BlockingThread(void *argument);
|
||||
|
||||
pthread_cond_t Condition;
|
||||
pthread_mutex_t Mutex1;
|
||||
pthread_mutex_t Mutex2;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2011.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -23,6 +23,13 @@
|
||||
#define SIG_SUSPEND SIGUSR1
|
||||
#define SIG_THR_RESTART SIGUSR2
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
static void print_sig_mask(const char * str);
|
||||
void GC_suspend_handler(int sig);
|
||||
void GC_restart_handler(int sig);
|
||||
void *run(void *arg);
|
||||
|
||||
sem_t GC_suspend_ack_sem;
|
||||
|
||||
static void print_sig_mask( const char * str )
|
||||
@@ -53,7 +60,7 @@ void GC_restart_handler( int sig )
|
||||
puts( "run in GC_restart_handler" );
|
||||
}
|
||||
|
||||
void* run( void *arg )
|
||||
void *run( void *arg )
|
||||
{
|
||||
int status;
|
||||
pthread_t id = *(pthread_t *)arg;
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
/* system.h
|
||||
/**
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -14,11 +16,20 @@
|
||||
/*
|
||||
* Some of the fatal error cases require the ability to peek inside RTEMS
|
||||
*/
|
||||
|
||||
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
|
||||
#include <rtems.h>
|
||||
#include <tmacros.h>
|
||||
|
||||
/* functions */
|
||||
void force_error(void);
|
||||
|
||||
void Put_Source(uint32_t source);
|
||||
|
||||
void Put_Error(
|
||||
uint32_t source,
|
||||
uint32_t error
|
||||
);
|
||||
|
||||
void *POSIX_Init(
|
||||
void *argument
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2011.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -19,6 +19,9 @@
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
)
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* Simple test program -- simplified version of sample test hello.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -18,7 +16,9 @@
|
||||
#include <bsp.h>
|
||||
#include <pmacros.h>
|
||||
|
||||
void test_main( void );
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
void test_main(void);
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/*
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* Simple test program to exercise some of the basic functionality of
|
||||
* POSIX Files and Directories Support.
|
||||
*
|
||||
@@ -9,8 +11,10 @@
|
||||
* /
|
||||
* /dev
|
||||
* /dev/XXX [where XXX includes at least console]
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2011.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -40,7 +44,11 @@
|
||||
|
||||
#include "primode.h"
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void test_case_reopen_append(void);
|
||||
void dump_statbuf(struct stat *buf);
|
||||
void stat_a_file(const char *file);
|
||||
int test_main(void);
|
||||
|
||||
char test_write_buffer[ 1024 ];
|
||||
rtems_filesystem_operations_table IMFS_ops_no_evalformake;
|
||||
@@ -70,7 +78,6 @@ void test_extend(
|
||||
/*
|
||||
* dump_statbuf
|
||||
*/
|
||||
|
||||
void dump_statbuf( struct stat *buf )
|
||||
{
|
||||
int major1;
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
/*
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* A test support function which performs a crude version of
|
||||
* "cat" so you can look at specific parts of a file.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -26,6 +30,9 @@
|
||||
|
||||
#include <tmacros.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void test_cat(char *file, int offset_arg, int length);
|
||||
|
||||
/*
|
||||
* test_cat routine
|
||||
*/
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
/*
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* A test support function which extends the file to the specified
|
||||
* length. This handles the implied open(), lseek(), write(), and close()
|
||||
* operations.
|
||||
*
|
||||
* The defined behavior is a seek() followed by a write() extends the file
|
||||
* and zero fills the new length part.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -30,10 +34,12 @@
|
||||
|
||||
#include <pmacros.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void test_extend(char *file, off_t offset);
|
||||
|
||||
/*
|
||||
* test_extend routine
|
||||
*/
|
||||
|
||||
void test_extend(
|
||||
char *file,
|
||||
off_t offset
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
/*
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* A test support function which performs a write() and
|
||||
* handles implied open(), lseek(), write(), and close() operations.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -25,10 +29,12 @@
|
||||
|
||||
#include <pmacros.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void test_write(char *file, off_t offset, char *buffer);
|
||||
|
||||
/*
|
||||
* test_write routine
|
||||
*/
|
||||
|
||||
void test_write(
|
||||
char *file,
|
||||
off_t offset,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -29,6 +29,10 @@
|
||||
#include <tmacros.h>
|
||||
#include "test_support.h"
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
void do_with_fd(int fd, const char *description);
|
||||
|
||||
void do_with_fd(
|
||||
int fd,
|
||||
const char *description
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -15,6 +15,9 @@
|
||||
#include "test_support.h"
|
||||
#include <errno.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -18,6 +18,13 @@
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
void test_gid(void);
|
||||
void test_uid(void);
|
||||
void test_pid(void);
|
||||
void test_getlogin(void);
|
||||
|
||||
void test_gid(void)
|
||||
{
|
||||
gid_t gid;
|
||||
@@ -125,8 +132,6 @@ void test_getlogin(void)
|
||||
puts( "getlogin_r(buffer, 0) -- ERANGE" );
|
||||
sc = getlogin_r( &ch, 0 );
|
||||
rtems_test_assert( sc == ERANGE );
|
||||
|
||||
|
||||
}
|
||||
|
||||
rtems_task Init(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -21,6 +21,16 @@
|
||||
#include <errno.h>
|
||||
#include <rtems/libcsupport.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
void open_it(bool readOnly, bool create);
|
||||
void write_helper(void);
|
||||
void read_helper(void);
|
||||
void truncate_helper(void);
|
||||
void extend_helper(int eno);
|
||||
void close_it(void);
|
||||
void unlink_it(void);
|
||||
|
||||
int TestFd;
|
||||
uint8_t Buffer[256];
|
||||
ssize_t TotalWritten;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -27,7 +27,10 @@
|
||||
extern int seteuid(uid_t euid);
|
||||
#endif
|
||||
|
||||
void IMFS_dump( void );
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument argument);
|
||||
void IMFS_dump(void);
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument argument
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -15,6 +15,10 @@
|
||||
#include <intrcritical.h>
|
||||
#include <time.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
rtems_timer_service_routine test_release_from_isr(rtems_id timer, void *arg);
|
||||
|
||||
#define TEST_NAME "01"
|
||||
#define TEST_STRING "POSIX Timer"
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -15,6 +15,9 @@
|
||||
#include <sys/time.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
|
||||
void *POSIX_Init(
|
||||
void *argument
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -16,18 +16,19 @@
|
||||
#include <errno.h>
|
||||
#include "tmacros.h"
|
||||
|
||||
void Key_destructor(
|
||||
void *key_data
|
||||
)
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
void Key_destructor(void *key_data);
|
||||
|
||||
void Key_destructor(void *key_data)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void *POSIX_Init(
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
int status;
|
||||
int status;
|
||||
|
||||
puts( "\n\n*** POSIX KEY 01 TEST ***" );
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -16,6 +16,9 @@
|
||||
#include "tmacros.h"
|
||||
#include "pmacros.h"
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
|
||||
void *POSIX_Init(
|
||||
void *ignored
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -16,6 +16,11 @@
|
||||
#include "tmacros.h"
|
||||
#include "pmacros.h"
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
void destructor(void *value);
|
||||
void *Test_Thread(void *key_value);
|
||||
|
||||
pthread_key_t Key;
|
||||
volatile bool destructor_ran;
|
||||
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
#include <bsp.h>
|
||||
#include <pmacros.h>
|
||||
|
||||
void test_main( void );
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
void test_main(void);
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* Modifications to support reference counting in the file system are
|
||||
@@ -26,6 +26,9 @@
|
||||
#include <rtems/libio.h>
|
||||
#include <pmacros.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
int test_main(void);
|
||||
|
||||
DIR *directory;
|
||||
DIR *directory2;
|
||||
DIR *directory3;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -20,6 +20,46 @@
|
||||
#include <signal.h> /* signal facilities */
|
||||
#include "test_support.h"
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void Start_Test(char *description);
|
||||
void Validate_attributes(mqd_t mq, int oflag, int msg_count);
|
||||
char *Build_Queue_Name(int i);
|
||||
void open_test_queues(void);
|
||||
void validate_mq_open_error_codes(void);
|
||||
void validate_mq_unlink_error_codes(void);
|
||||
void validate_mq_close_error_codes(void);
|
||||
void validate_mq_getattr_error_codes(void);
|
||||
void Send_msg_to_que(int que, int msg);
|
||||
void Show_send_msg_to_que(char *task_name, int que, int msg);
|
||||
void verify_queues_full(char *task_name);
|
||||
void verify_queues_empty(char *task_name);
|
||||
int empty_message_queues(char *task_name);
|
||||
int fill_message_queues(char *task_name);
|
||||
void Read_msg_from_que(int que, int msg);
|
||||
int validate_mq_send_error_codes(void);
|
||||
void validate_mq_receive_error_codes(void);
|
||||
void verify_open_functionality(void);
|
||||
void verify_unlink_functionality(void);
|
||||
void verify_close_functionality(void);
|
||||
void verify_timed_send_queue(int que, int is_blocking);
|
||||
void verify_timed_send(void);
|
||||
void verify_timed_receive_queue(char *task_name, int que, int is_blocking);
|
||||
void verify_timed_receive(void);
|
||||
void wait_for_signal(sigset_t *waitset, int sec, int expect_signal);
|
||||
void verify_notify(void);
|
||||
void verify_with_threads(void);
|
||||
void verify_timedout_mq_timedreceive(
|
||||
char *task_name, int que, int is_blocking);;
|
||||
void verify_timedout_mq_timedsend(int que, int is_blocking);
|
||||
void verify_timed_receive(void);
|
||||
void validate_mq_setattr(void);
|
||||
void verify_timedout_mq_timedreceive(
|
||||
char *task_name, int que, int is_blocking);
|
||||
void verify_mq_receive(void);
|
||||
void verify_timedout_mq_timedsend(int que, int is_blocking);
|
||||
void verify_mq_send(void);
|
||||
void verify_timed_receive(void);
|
||||
|
||||
#define fatal_posix_mqd( _ptr, _msg ) \
|
||||
if ( (_ptr != (mqd_t) -1) ) { \
|
||||
check_dispatch_disable_level( 0 ); \
|
||||
@@ -29,12 +69,12 @@
|
||||
rtems_test_exit( -1 ); \
|
||||
}
|
||||
|
||||
|
||||
typedef struct {
|
||||
char msg[ 50 ];
|
||||
int size;
|
||||
unsigned int priority;
|
||||
}Test_Message_t;
|
||||
} Test_Message_t;
|
||||
|
||||
Test_Message_t Predefined_Msgs[MAXMSG+1];
|
||||
Test_Message_t Predefined_Msgs[MAXMSG+1] = {
|
||||
{ "12345678", 9, MQ_PRIO_MAX-1 }, /* Max Length Message med */
|
||||
@@ -93,9 +133,9 @@ void Start_Test(
|
||||
|
||||
|
||||
void Validate_attributes(
|
||||
mqd_t mq,
|
||||
int oflag,
|
||||
int msg_count
|
||||
mqd_t mq,
|
||||
int oflag,
|
||||
int msg_count
|
||||
)
|
||||
{
|
||||
int status;
|
||||
@@ -114,8 +154,8 @@ void Validate_attributes(
|
||||
}
|
||||
|
||||
#define Get_Queue_Name( i ) Test_q[i].name
|
||||
char *Build_Queue_Name( int i ) {
|
||||
|
||||
char *Build_Queue_Name(int i)
|
||||
{
|
||||
static char Queue_Name[PATH_MAX + 2];
|
||||
|
||||
sprintf(Queue_Name,"mq%d", i+1 );
|
||||
@@ -528,7 +568,6 @@ int empty_message_queues(
|
||||
* Returns the number of messages queued after the test on the
|
||||
* first queue.
|
||||
*/
|
||||
|
||||
int validate_mq_send_error_codes(void)
|
||||
{
|
||||
int status;
|
||||
@@ -1374,19 +1413,3 @@ void *Task_5 (
|
||||
return NULL; /* just so the compiler thinks we returned something */
|
||||
|
||||
}
|
||||
|
||||
void *Task_ (
|
||||
void *argument
|
||||
)
|
||||
{
|
||||
|
||||
print_current_time( "Task_: ", "" );
|
||||
|
||||
puts( "Task_: pthread_exit" );
|
||||
pthread_exit( NULL );
|
||||
|
||||
/* switch to Init */
|
||||
|
||||
return NULL; /* just so the compiler thinks we returned something */
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
/* system.h
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* This include file contains information that is included in every
|
||||
* function in the test set.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -19,13 +22,10 @@
|
||||
#include <sched.h>
|
||||
#include <tmacros.h>
|
||||
|
||||
void *POSIX_Init(
|
||||
void *argument
|
||||
);
|
||||
|
||||
void *Task_1_through_3(
|
||||
void *argument
|
||||
);
|
||||
void *POSIX_Init(void *argument);
|
||||
void *Task_1_through_3(void *argument);
|
||||
void *Task_4(void *argument);
|
||||
void *Task_5(void *argument);
|
||||
|
||||
/* configuration information */
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -21,6 +21,10 @@
|
||||
#include <time.h>
|
||||
#include <tmacros.h>
|
||||
#include <signal.h> /* signal facilities */
|
||||
#include "test_support.h"
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
|
||||
pthread_t Init_id;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "test_support.h"
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_timer_service_routine mq_send_timer(rtems_id timer, void *arg);
|
||||
|
||||
mqd_t Queue;
|
||||
volatile bool tsr_fired;
|
||||
volatile int tsr_status;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -22,6 +22,9 @@
|
||||
|
||||
#include "test_support.h"
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
|
||||
void *POSIX_Init(
|
||||
void *argument
|
||||
)
|
||||
@@ -30,7 +33,6 @@ void *POSIX_Init(
|
||||
mqd_t Queue, second_Queue;
|
||||
int sc;
|
||||
Heap_Information_block start;
|
||||
Heap_Information_block info;
|
||||
size_t to_alloc;
|
||||
void *alloced;
|
||||
bool sb;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -15,6 +15,9 @@
|
||||
#include <errno.h>
|
||||
#include <pthread.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
void *POSIX_Init(void *argument);
|
||||
|
||||
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
|
||||
typedef struct {
|
||||
const char *name;
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
/* Odd Object Name/Id Error Cases
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
/**
|
||||
* @file
|
||||
* Odd Object Name/Id Error Cases
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -15,6 +19,9 @@
|
||||
#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
|
||||
#include <tmacros.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -17,6 +17,11 @@
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
void print_passwd(struct passwd *pw);
|
||||
void print_group(struct group *gr);
|
||||
|
||||
void print_passwd(
|
||||
struct passwd *pw
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -21,6 +21,11 @@
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
void print_passwd(struct passwd *pw);
|
||||
void print_group(struct group *gr);
|
||||
|
||||
void print_passwd(
|
||||
struct passwd *pw
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2010.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -20,8 +20,11 @@
|
||||
#include <errno.h>
|
||||
#include <rtems/libcsupport.h>
|
||||
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument not_used
|
||||
rtems_task_argument ignored
|
||||
)
|
||||
{
|
||||
int fd[2] = {0,0};
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/*
|
||||
* Simple test program -- simplified version of sample test hello.
|
||||
*
|
||||
* COPYRIGHT (c) 1989-1999.
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -18,7 +16,9 @@
|
||||
#include <bsp.h>
|
||||
#include <pmacros.h>
|
||||
|
||||
void test_main( void );
|
||||
/* forward declarations to avoid warnings */
|
||||
rtems_task Init(rtems_task_argument ignored);
|
||||
void test_main(void);
|
||||
|
||||
rtems_task Init(
|
||||
rtems_task_argument ignored
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
/*
|
||||
/**
|
||||
* @file
|
||||
*
|
||||
* This test exercises the following routines:
|
||||
*
|
||||
* + readv
|
||||
* + writev
|
||||
*
|
||||
* COPYRIGHT (c) 1989-2009.
|
||||
*/
|
||||
|
||||
/*
|
||||
* COPYRIGHT (c) 1989-2012.
|
||||
* On-Line Applications Research Corporation (OAR).
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
@@ -39,8 +43,13 @@
|
||||
#define rtems_test_exit(_s) exit(_s)
|
||||
#endif
|
||||
|
||||
#define TESTFILE "testfile1.tst"
|
||||
/* forward declarations to avoid warnings */
|
||||
int test_main(void);
|
||||
int fillPatternBuffer(void);
|
||||
int doFunctionalTest(void);
|
||||
int doErrorTest(void);
|
||||
|
||||
#define TESTFILE "testfile1.tst"
|
||||
|
||||
/* This buffer size is assumed in the iovec initialization below */
|
||||
#define MAX_BUFFER 1000
|
||||
@@ -56,7 +65,6 @@ unsigned char ReadBuffer[MAX_BUFFER];
|
||||
* FALSE if buffer failed to fill
|
||||
*
|
||||
*/
|
||||
|
||||
int fillPatternBuffer(void)
|
||||
{
|
||||
int retval = TRUE;
|
||||
@@ -79,8 +87,8 @@ int fillPatternBuffer(void)
|
||||
* FALSE if an operation did not work as expected.
|
||||
*
|
||||
*/
|
||||
|
||||
int doFunctionalTest(void) {
|
||||
int doFunctionalTest(void)
|
||||
{
|
||||
FILE *fp;
|
||||
int fd;
|
||||
struct iovec rdvec[4];
|
||||
@@ -165,7 +173,6 @@ int doFunctionalTest(void) {
|
||||
* FALSE if an operation did not work as expected.
|
||||
*
|
||||
*/
|
||||
|
||||
int doErrorTest(void)
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user