summaryrefslogtreecommitdiffstats
path: root/testsuites/samples
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-10-04 15:23:25 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-10-05 13:41:07 +0200
commit51b3cbca11b940d37b791b4d8009c2144db31ac6 (patch)
tree603dd4aeee593f82d8224195f089ca3024c75f40 /testsuites/samples
parent8776bb94197613a369b47b3adf4b2d4e0ba766ed (diff)
downloadrtems-51b3cbca11b940d37b791b4d8009c2144db31ac6.tar.bz2
tests: Use rtems_task_exit()
Update #3533.
Diffstat (limited to 'testsuites/samples')
-rw-r--r--testsuites/samples/base_mp/init.c2
-rw-r--r--testsuites/samples/base_sp/init.c3
-rw-r--r--testsuites/samples/capture/init.c2
-rw-r--r--testsuites/samples/capture/test1.c30
-rw-r--r--testsuites/samples/fileio/init.c3
-rw-r--r--testsuites/samples/loopback/init.c6
-rw-r--r--testsuites/samples/pppd/init.c2
-rw-r--r--testsuites/samples/pppd/pppdapp.c2
-rw-r--r--testsuites/samples/ticker/init.c3
-rw-r--r--testsuites/samples/unlimited/init.c2
10 files changed, 26 insertions, 29 deletions
diff --git a/testsuites/samples/base_mp/init.c b/testsuites/samples/base_mp/init.c
index 901dc83a9b..608b0dea51 100644
--- a/testsuites/samples/base_mp/init.c
+++ b/testsuites/samples/base_mp/init.c
@@ -44,5 +44,5 @@ rtems_task Init(
);
rtems_test_assert(status == RTEMS_SUCCESSFUL);
- rtems_task_delete( RTEMS_SELF );
+ rtems_task_exit();
}
diff --git a/testsuites/samples/base_sp/init.c b/testsuites/samples/base_sp/init.c
index b1cb4d90a6..071913a390 100644
--- a/testsuites/samples/base_sp/init.c
+++ b/testsuites/samples/base_sp/init.c
@@ -43,6 +43,5 @@ rtems_task Init(
status = rtems_task_start( tid, Application_task, ARGUMENT );
directive_failed( status, "start" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
+ rtems_task_exit();
}
diff --git a/testsuites/samples/capture/init.c b/testsuites/samples/capture/init.c
index e87a7beae6..2bf395fdad 100644
--- a/testsuites/samples/capture/init.c
+++ b/testsuites/samples/capture/init.c
@@ -67,7 +67,7 @@ rtems_task Init(
setup_tasks_to_watch ();
- rtems_task_delete (RTEMS_SELF);
+ rtems_task_exit();
} else {
TEST_END();
rtems_test_exit( 0 );
diff --git a/testsuites/samples/capture/test1.c b/testsuites/samples/capture/test1.c
index 19b7b4fad8..2f4193adb2 100644
--- a/testsuites/samples/capture/test1.c
+++ b/testsuites/samples/capture/test1.c
@@ -66,7 +66,7 @@ capture_CT1a (rtems_task_argument arg)
capture_CT1a_deleted = 1;
- rtems_task_delete (RTEMS_SELF);
+ rtems_task_exit();
}
static void
@@ -79,7 +79,7 @@ capture_CT1b (rtems_task_argument arg)
capture_CT1b_deleted = 1;
- rtems_task_delete (RTEMS_SELF);
+ rtems_task_exit();
}
static void
@@ -102,7 +102,7 @@ capture_CT1c (rtems_task_argument arg)
capture_CT1c_deleted = 1;
- rtems_task_delete (RTEMS_SELF);
+ rtems_task_exit();
}
static void
@@ -153,7 +153,7 @@ capture_test_1 (int argc,
if (sc != RTEMS_SUCCESSFUL)
{
printf ("error: Test 1: cannot start CT1a: %s\n", rtems_status_text (sc));
- rtems_task_delete (id[0]);
+ rtems_task_exit();
rtems_semaphore_delete (mutex);
return;
}
@@ -170,7 +170,7 @@ capture_test_1 (int argc,
if (sc != RTEMS_SUCCESSFUL)
{
printf ("error: Test 1: cannot create CT1b: %s\n", rtems_status_text (sc));
- rtems_task_delete (id[0]);
+ rtems_task_exit();
rtems_semaphore_delete (mutex);
return;
}
@@ -180,8 +180,8 @@ capture_test_1 (int argc,
if (sc != RTEMS_SUCCESSFUL)
{
printf ("error: Test 1: cannot start CT1b: %s\n", rtems_status_text (sc));
- rtems_task_delete (id[1]);
- rtems_task_delete (id[0]);
+ rtems_task_exit();
+ rtems_task_exit();
rtems_semaphore_delete (mutex);
return;
}
@@ -198,8 +198,8 @@ capture_test_1 (int argc,
if (sc != RTEMS_SUCCESSFUL)
{
printf ("error: Test 1: cannot create CT1c: %s\n", rtems_status_text (sc));
- rtems_task_delete (id[1]);
- rtems_task_delete (id[0]);
+ rtems_task_exit();
+ rtems_task_exit();
rtems_semaphore_delete (mutex);
return;
}
@@ -209,9 +209,9 @@ capture_test_1 (int argc,
if (sc != RTEMS_SUCCESSFUL)
{
printf ("error: Test 1: cannot start CT1c: %s\n", rtems_status_text (sc));
- rtems_task_delete (id[2]);
- rtems_task_delete (id[1]);
- rtems_task_delete (id[0]);
+ rtems_task_exit();
+ rtems_task_exit();
+ rtems_task_exit();
rtems_semaphore_delete (mutex);
return;
}
@@ -228,9 +228,9 @@ capture_test_1 (int argc,
if (!loops)
{
printf ("error: Test 1: test tasks did not delete\n");
- rtems_task_delete (id[2]);
- rtems_task_delete (id[1]);
- rtems_task_delete (id[0]);
+ rtems_task_exit();
+ rtems_task_exit();
+ rtems_task_exit();
}
sc = rtems_semaphore_delete (mutex);
diff --git a/testsuites/samples/fileio/init.c b/testsuites/samples/fileio/init.c
index f86593c46c..3bb7fcc800 100644
--- a/testsuites/samples/fileio/init.c
+++ b/testsuites/samples/fileio/init.c
@@ -1171,8 +1171,7 @@ Init (rtems_task_argument ignored)
status = rtems_task_start( Task_id, fileio_task, 1 );
directive_failed( status, "start" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
+ rtems_task_exit();
} else {
TEST_END();
diff --git a/testsuites/samples/loopback/init.c b/testsuites/samples/loopback/init.c
index 5cbbd54620..672eeedeb6 100644
--- a/testsuites/samples/loopback/init.c
+++ b/testsuites/samples/loopback/init.c
@@ -120,7 +120,7 @@ static rtems_task workerTask(rtems_task_argument arg)
if (close(s) < 0)
printf("Can't close worker task socket: %s\n", strerror(errno));
printf("Worker task terminating.\n");
- rtems_task_delete(RTEMS_SELF);
+ rtems_task_exit();
}
/*
@@ -152,7 +152,7 @@ static rtems_task serverTask(rtems_task_argument arg)
s1 = accept(s, (struct sockaddr *)&farAddr, &addrlen);
if (s1 < 0)
if (errno == ENXIO)
- rtems_task_delete(RTEMS_SELF);
+ rtems_task_exit();
else
rtems_panic("Can't accept connection: %s", strerror(errno));
else
@@ -220,7 +220,7 @@ static rtems_task clientTask(rtems_task_argument arg)
{
clientWorker(arg);
printf("Client task terminating.\n");
- rtems_task_delete( RTEMS_SELF );
+ rtems_task_exit();
}
/*
diff --git a/testsuites/samples/pppd/init.c b/testsuites/samples/pppd/init.c
index 6e04c344de..95e0d533f4 100644
--- a/testsuites/samples/pppd/init.c
+++ b/testsuites/samples/pppd/init.c
@@ -57,5 +57,5 @@ rtems_task Init(rtems_task_argument argument)
rtems_bsdnet_initialize_network();
rtems_pppd_initialize();
pppdapp_initialize();
- rtems_task_delete(RTEMS_SELF);
+ rtems_task_exit();
}
diff --git a/testsuites/samples/pppd/pppdapp.c b/testsuites/samples/pppd/pppdapp.c
index 0eb789d82a..bf8cd525cd 100644
--- a/testsuites/samples/pppd/pppdapp.c
+++ b/testsuites/samples/pppd/pppdapp.c
@@ -125,7 +125,7 @@ static rtems_task pppdapp(rtems_task_argument arg)
}
/* terminate myself */
- rtems_task_delete(RTEMS_SELF);
+ rtems_task_exit();
}
int pppdapp_initialize(void)
diff --git a/testsuites/samples/ticker/init.c b/testsuites/samples/ticker/init.c
index 3f3cbd8359..a9e0c9b16a 100644
--- a/testsuites/samples/ticker/init.c
+++ b/testsuites/samples/ticker/init.c
@@ -74,6 +74,5 @@ rtems_task Init(
status = rtems_task_start( Task_id[ 3 ], Test_task, 3 );
directive_failed( status, "start 3" );
- status = rtems_task_delete( RTEMS_SELF );
- directive_failed( status, "delete" );
+ rtems_task_exit();
}
diff --git a/testsuites/samples/unlimited/init.c b/testsuites/samples/unlimited/init.c
index 002a9736e4..77f4dedd3a 100644
--- a/testsuites/samples/unlimited/init.c
+++ b/testsuites/samples/unlimited/init.c
@@ -66,7 +66,7 @@ rtems_task test_task(
printf( "task %u ending.\n", my_n);
- rtems_task_delete(RTEMS_SELF);
+ rtems_task_exit();
}
void destroy_all_tasks(