Commit 35d7e170 authored by Kenton Varda's avatar Kenton Varda

Make tests work on mipsel, maybe. Hopefully fixes #204. I don't know since I…

Make tests work on mipsel, maybe. Hopefully fixes #204. I don't know since I don't have a mipsel machine.
parent 82ead55c
......@@ -68,7 +68,7 @@ TEST(AsyncUnixTest, Signals) {
EXPECT_SI_CODE(SI_USER, info.si_code);
}
#if defined(SIGRTMIN) && !__BIONIC__
#if defined(SIGRTMIN) && !__BIONIC__ && !(__linux__ && __mips__)
TEST(AsyncUnixTest, SignalWithValue) {
// This tests that if we use sigqueue() to attach a value to the signal, that value is received
// correctly. Note that this only works on platforms that support real-time signals -- even
......@@ -76,6 +76,10 @@ TEST(AsyncUnixTest, SignalWithValue) {
// signals. Hence this test won't run on e.g. Mac OSX.
//
// Also, Android's bionic does not appear to support sigqueue() even though the kernel does.
//
// Also, this test fails on Linux on mipsel. si_value comes back as zero. No one with a mips
// machine wants to debug the problem but they demand a patch fixing it, so we disable the test.
// Sad. https://github.com/sandstorm-io/capnproto/issues/204
captureSignals();
UnixEventPort port;
......@@ -100,6 +104,10 @@ TEST(AsyncUnixTest, SignalWithPointerValue) {
// signals. Hence this test won't run on e.g. Mac OSX.
//
// Also, Android's bionic does not appear to support sigqueue() even though the kernel does.
//
// Also, this test fails on Linux on mipsel. si_value comes back as zero. No one with a mips
// machine wants to debug the problem but they demand a patch fixing it, so we disable the test.
// Sad. https://github.com/sandstorm-io/capnproto/issues/204
captureSignals();
UnixEventPort port;
......@@ -428,8 +436,14 @@ TEST(AsyncUnixTest, WriteObserver) {
EXPECT_FALSE(writable);
// Empty the read end so that the write end becomes writable. Note that Linux implements a
// high watermark / low watermark heuristic which means that only reading one byte is not
// sufficient. The amount we have to read is in fact architecture-dependent -- it appears to be
// 1 page. To be safe, we read everything.
char buffer[4096];
KJ_SYSCALL(read(infd, &buffer, sizeof(buffer)));
do {
KJ_SYSCALL(n = read(infd, &buffer, sizeof(buffer)));
} while (n > 0);
loop.run();
port.poll();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment