Opened 14 years ago

Last modified 4 years ago

#6209 assigned bug

Test tty-test.cpp fails in src/tests/add-ons/kernel/drivers/tty/

Reported by: Karvjorm Owned by: nobody
Priority: normal Milestone: R1.1
Component: Drivers/TTY Version: R1/alpha2
Keywords: Cc: Karvjorm
Blocked By: Blocking:
Platform: All

Description

When I tried to build tty-test.cpp in src/tests/add-ons/kernel/drivers/tty/, I got an error message from the following line:

printf("e: %d\n", err);

err is here of status_t type. After commenting out that line I was able to build application but testing failed in TestUnblockOnCloseRead(false, true) or TestUnblockOnCloseRead(false, false) after first TestUnblockOnCloseRead(true, false) test in Test() method when doing CHK_ALIVE(thread) test.

When I commented out the second and third test, then test program fails when RUN_TEST(new TestSelectNotifyOnClose(true)) is called:

RUN_TEST(new TestUnblockOnCloseRead(true,  false));
//RUN_TEST(new TestUnblockOnCloseRead(false, false));
//RUN_TEST(new TestUnblockOnCloseRead(false, true));

RUN_TEST(new TestUnblockOnCloseWrite(true,  false, false));
RUN_TEST(new TestUnblockOnCloseWrite(false, false, false));
RUN_TEST(new TestUnblockOnCloseWrite(true,  true,  false));
RUN_TEST(new TestUnblockOnCloseWrite(false, true,  false));
// TODO: How to enable echo mode?
// RUN_TEST(new TestUnblockOnCloseWrite(true,  false, true));
// RUN_TEST(new TestUnblockOnCloseWrite(false, false, true));
// RUN_TEST(new TestUnblockOnCloseWrite(true,  true,  true));
// RUN_TEST(new TestUnblockOnCloseWrite(false, true,  true));

// select tests

RUN_TEST(new TestSelectAlreadyReady(true,  true));
RUN_TEST(new TestSelectAlreadyReady(false, true));
RUN_TEST(new TestSelectAlreadyReady(true,  false));
RUN_TEST(new TestSelectAlreadyReady(false, false));

RUN_TEST(new TestSelectNotifyOnClose(true));
RUN_TEST(new TestSelectNotifyOnClose(false));

Change History (5)

comment:1 by pulkomandy, 9 years ago

Component: - GeneralDrivers/TTY
Owner: changed from nobody to bonefish
Status: newassigned

comment:2 by bonefish, 9 years ago

Keywords: tty-test thread Alive removed
Owner: changed from bonefish to nobody

No clue what these tests even do.

comment:3 by pulkomandy, 9 years ago

It was 9 years ago, but you wrote them (according to the git log and copyright message at least).

comment:4 by bonefish, 9 years ago

Yes, and I'm sure they where useful back then. I don't know, whether they still are and when they stopped working. François added a test on 2010-03-28, predating this ticket, so I assume they did still work back then. My last change to the TTY driver code was before that, on 2010-03-04.

At any rate, I don't think I'll work on this any time soon.

comment:5 by pulkomandy, 4 years ago

Milestone: R1R1.1
Note: See TracTickets for help on using tickets.