Skip to content

Commit

Permalink
Merge pull request #748 from zanzaben/fix699_Select_Test_RTEMS
Browse files Browse the repository at this point in the history
Fix #699, format printf correctly
  • Loading branch information
astrogeco authored Jan 21, 2021
2 parents bfca5b2 + 0d4c3c7 commit 2b1211a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/tests/select-test/select-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void TestSelectSingleRead(void)

/* Verify Outputs */
UtAssert_True(actual == expected, "OS_SelectSingle() (%ld) == OS_ERROR_TIMEOUT", (long)actual);
UtAssert_True(StateFlags == 0, "OS_SelectSingle() (%d) == None", StateFlags);
UtAssert_True(StateFlags == 0, "OS_SelectSingle() (0x%x) == None", (unsigned int)StateFlags);

status = OS_BinSemGive(bin_sem_id);

Expand All @@ -309,8 +309,8 @@ void TestSelectSingleRead(void)

/* Verify Outputs */
UtAssert_True(actual == expected, "OS_SelectSingle() (%ld) == OS_SUCCESS", (long)actual);
UtAssert_True(StateFlags == OS_STREAM_STATE_READABLE, "OS_SelectSingle() (%d) == OS_STREAM_STATE_READABLE",
StateFlags);
UtAssert_True(StateFlags == OS_STREAM_STATE_READABLE, "OS_SelectSingle() (%x) == OS_STREAM_STATE_READABLE",
(unsigned int)StateFlags);
}

void TestSelectMultipleRead(void)
Expand Down Expand Up @@ -414,16 +414,16 @@ void TestSelectSingleWrite(void)
expected = OS_ERROR_TIMEOUT;
/* Verify Outputs */
UtAssert_True(actual == expected, "OS_SelectSingle() (%ld) == OS_ERROR_TIMEOUT", (long)actual);
UtAssert_True(StateFlags == 0, "OS_SelectSingle() (%d) == None", StateFlags);
UtAssert_True(StateFlags == 0, "OS_SelectSingle() (0x%x) == None", (unsigned int)StateFlags);

expected = OS_SUCCESS;
StateFlags = OS_STREAM_STATE_WRITABLE;
actual = OS_SelectSingle(c_socket_id, &StateFlags, 100);

/* Verify Outputs */
UtAssert_True(actual == expected, "OS_SelectSingle() (%ld) == OS_SUCCESS", (long)actual);
UtAssert_True(StateFlags == OS_STREAM_STATE_WRITABLE, "OS_SelectSingle() (%d) == OS_STREAM_STATE_WRITABLE",
StateFlags);
UtAssert_True(StateFlags == OS_STREAM_STATE_WRITABLE, "OS_SelectSingle() (%x) == OS_STREAM_STATE_WRITABLE",
(unsigned int)StateFlags);
}
}

Expand Down Expand Up @@ -513,24 +513,24 @@ void TestSelectSingleFile(void)

/* Verify Outputs */
UtAssert_True(actual == expected, "OS_SelectSingle() (%ld) == OS_SUCCESS", (long)actual);
UtAssert_True(StateFlags == OS_STREAM_STATE_READABLE, "OS_SelectSingle() (%d) == OS_STREAM_STATE_READABLE",
StateFlags);
UtAssert_True(StateFlags == OS_STREAM_STATE_READABLE, "OS_SelectSingle() (%x) == OS_STREAM_STATE_READABLE",
(unsigned int)StateFlags);

StateFlags = OS_STREAM_STATE_WRITABLE;
actual = OS_SelectSingle(fd, &StateFlags, 100);

/* Verify Outputs */
UtAssert_True(actual == expected, "OS_SelectSingle() (%ld) == OS_SUCCESS", (long)actual);
UtAssert_True(StateFlags == OS_STREAM_STATE_WRITABLE, "OS_SelectSingle() (%d) == OS_STREAM_STATE_WRITABLE",
StateFlags);
UtAssert_True(StateFlags == OS_STREAM_STATE_WRITABLE, "OS_SelectSingle() (%x) == OS_STREAM_STATE_WRITABLE",
(unsigned int)StateFlags);

expected = OS_ERROR_TIMEOUT;
StateFlags = OS_STREAM_STATE_BOUND;
actual = OS_SelectSingle(fd, &StateFlags, 100);

/* Verify Outputs */
UtAssert_True(actual == expected, "OS_SelectSingle() (%ld) == OS_ERROR_TIMEOUT", (long)actual);
UtAssert_True(StateFlags == 0, "OS_SelectSingle() (%d) == None", StateFlags);
UtAssert_True(StateFlags == 0, "OS_SelectSingle() (0x%x) == None", (unsigned int)StateFlags);
}

void UtTest_Setup(void)
Expand Down

0 comments on commit 2b1211a

Please sign in to comment.