summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-26 11:00:24 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-04-27 19:40:12 +0200
commit4b7c77bce370d2ff88c9fb9036e5f3a3b1da9cb7 (patch)
tree64814323130a90a2ae790a5a787d8bd8989648e9 /testsuites
parent127a812f501833fbad73665d7676b32753d667b3 (diff)
downloadrtems-4b7c77bce370d2ff88c9fb9036e5f3a3b1da9cb7.tar.bz2
rtems: Change rtems_task_get_affinity() status
In case the processor set is not large enough to contain the processor affinity set of the task return RTEMS_INVALID_SIZE instead of RTEMS_INVALID_NUMBER. This is more in line with other directives since the issue is related to the size of an object. Close #4393.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/smptests/smpaffinity01/init.c2
-rw-r--r--testsuites/sptests/spscheduler01/init.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/testsuites/smptests/smpaffinity01/init.c b/testsuites/smptests/smpaffinity01/init.c
index 5d79259e9f..9ec687d816 100644
--- a/testsuites/smptests/smpaffinity01/init.c
+++ b/testsuites/smptests/smpaffinity01/init.c
@@ -85,7 +85,7 @@ void Validate_getaffinity_errors(void)
"Init - rtems_task_get_affinity - Invalid cpusetsize - RTEMS_INVALID_NUMBER"
);
sc = rtems_task_get_affinity( Init_id, 1, &cpuset );
- rtems_test_assert( sc == RTEMS_INVALID_NUMBER );
+ rtems_test_assert( sc == RTEMS_INVALID_SIZE );
/* Verify rtems_task_get_affinity validates cpuset */
puts("Init - rtems_task_get_affinity - Invalid cpuset - RTEMS_INVALID_ADDRESS");
diff --git a/testsuites/sptests/spscheduler01/init.c b/testsuites/sptests/spscheduler01/init.c
index 5ed17057d3..94ecfe4ef5 100644
--- a/testsuites/sptests/spscheduler01/init.c
+++ b/testsuites/sptests/spscheduler01/init.c
@@ -49,6 +49,7 @@ static void assert_eno(rtems_status_code sc, int eno)
rtems_test_assert(eno == ESRCH);
break;
case RTEMS_INVALID_NUMBER:
+ case RTEMS_INVALID_SIZE:
rtems_test_assert(eno == EINVAL);
break;
default:
@@ -139,7 +140,7 @@ static void test_task_get_set_affinity(void)
rtems_test_assert(sc == RTEMS_INVALID_ADDRESS);
sc = task_get_affinity(RTEMS_SELF, 0, &cpuset);
- rtems_test_assert(sc == RTEMS_INVALID_NUMBER);
+ rtems_test_assert(sc == RTEMS_INVALID_SIZE);
sc = task_set_affinity(RTEMS_SELF, 0, &cpuset);
rtems_test_assert(sc == RTEMS_INVALID_NUMBER);