aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSantiago Gimeno <santiago.gimeno@gmail.com>2022-12-10 19:36:46 +0100
committerGitHub <noreply@github.com>2022-12-10 19:36:46 +0100
commitabf77a9eda3c83e74d8d0f60d77fe00cb888908b (patch)
tree7b5b0bc6ecc7db6f5b748813d72fa4b3825f9a81 /test
parent75d9411e803dea5363bfdc223f1f284b8cf3dec3 (diff)
downloadlibuv-abf77a9eda3c83e74d8d0f60d77fe00cb888908b.tar.gz
libuv-abf77a9eda3c83e74d8d0f60d77fe00cb888908b.zip
test: fix some unreachable code warnings (#3851)
Diffstat (limited to 'test')
-rw-r--r--test/run-tests.c4
-rw-r--r--test/test-tcp-connect-error-after-write.c12
-rw-r--r--test/test-tcp-write-in-a-row.c3
-rw-r--r--test/test-tty-escape-sequence-processing.c21
4 files changed, 19 insertions, 21 deletions
diff --git a/test/run-tests.c b/test/run-tests.c
index 86b03599..d8cfe297 100644
--- a/test/run-tests.c
+++ b/test/run-tests.c
@@ -85,10 +85,6 @@ int main(int argc, char **argv) {
fflush(stderr);
return EXIT_FAILURE;
}
-
-#ifndef __SUNPRO_C
- return EXIT_SUCCESS;
-#endif
}
diff --git a/test/test-tcp-connect-error-after-write.c b/test/test-tcp-connect-error-after-write.c
index 3f2e3572..ad214b93 100644
--- a/test/test-tcp-connect-error-after-write.c
+++ b/test/test-tcp-connect-error-after-write.c
@@ -55,6 +55,11 @@ static void write_cb(uv_write_t* req, int status) {
* Related issue: https://github.com/joyent/libuv/issues/443
*/
TEST_IMPL(tcp_connect_error_after_write) {
+#ifdef _WIN32
+ RETURN_SKIP("This test is disabled on Windows for now. "
+ "See https://github.com/joyent/libuv/issues/444\n");
+#else
+
uv_connect_t connect_req;
struct sockaddr_in addr;
uv_write_t write_req;
@@ -62,12 +67,6 @@ TEST_IMPL(tcp_connect_error_after_write) {
uv_buf_t buf;
int r;
-#ifdef _WIN32
- fprintf(stderr, "This test is disabled on Windows for now.\n");
- fprintf(stderr, "See https://github.com/joyent/libuv/issues/444\n");
- return 0; /* windows slackers... */
-#endif
-
ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr));
buf = uv_buf_init("TEST", 4);
@@ -95,4 +94,5 @@ TEST_IMPL(tcp_connect_error_after_write) {
MAKE_VALGRIND_HAPPY();
return 0;
+#endif
}
diff --git a/test/test-tcp-write-in-a-row.c b/test/test-tcp-write-in-a-row.c
index f04d48fc..f50e5186 100644
--- a/test/test-tcp-write-in-a-row.c
+++ b/test/test-tcp-write-in-a-row.c
@@ -114,7 +114,7 @@ static void start_server(void) {
TEST_IMPL(tcp_write_in_a_row) {
#if defined(_WIN32)
RETURN_SKIP("tcp_write_in_a_row does not work on Windows");
-#endif
+#else
uv_connect_t connect_req;
struct sockaddr_in addr;
@@ -138,4 +138,5 @@ TEST_IMPL(tcp_write_in_a_row) {
MAKE_VALGRIND_HAPPY();
return 0;
+#endif
}
diff --git a/test/test-tty-escape-sequence-processing.c b/test/test-tty-escape-sequence-processing.c
index 5f04291d..e311c0f0 100644
--- a/test/test-tty-escape-sequence-processing.c
+++ b/test/test-tty-escape-sequence-processing.c
@@ -1043,6 +1043,11 @@ TEST_IMPL(tty_set_cursor_shape) {
TEST_IMPL(tty_set_style) {
+#if _MSC_VER >= 1920 && _MSC_VER <= 1929
+ RETURN_SKIP("Broken on Microsoft Visual Studio 2019, to be investigated. "
+ "See: https://github.com/libuv/libuv/issues/3304");
+#else
+
uv_tty_t tty_out;
uv_loop_t* loop;
COORD cursor_pos;
@@ -1070,11 +1075,6 @@ TEST_IMPL(tty_set_style) {
WORD attr;
int i, length;
-#if _MSC_VER >= 1920 && _MSC_VER <= 1929
- RETURN_SKIP("Broken on Microsoft Visual Studio 2019, to be investigated. "
- "See: https://github.com/libuv/libuv/issues/3304");
-#endif
-
loop = uv_default_loop();
initialize_tty(&tty_out);
@@ -1239,6 +1239,7 @@ TEST_IMPL(tty_set_style) {
MAKE_VALGRIND_HAPPY();
return 0;
+#endif
}
@@ -1345,6 +1346,10 @@ TEST_IMPL(tty_full_reset) {
TEST_IMPL(tty_escape_sequence_processing) {
+#if _MSC_VER >= 1920 && _MSC_VER <= 1929
+ RETURN_SKIP("Broken on Microsoft Visual Studio 2019, to be investigated. "
+ "See: https://github.com/libuv/libuv/issues/3304");
+#else
uv_tty_t tty_out;
uv_loop_t* loop;
COORD cursor_pos, cursor_pos_old;
@@ -1353,11 +1358,6 @@ TEST_IMPL(tty_escape_sequence_processing) {
struct captured_screen actual = {0}, expect = {0};
int dir;
-#if _MSC_VER >= 1920 && _MSC_VER <= 1929
- RETURN_SKIP("Broken on Microsoft Visual Studio 2019, to be investigated. "
- "See: https://github.com/libuv/libuv/issues/3304");
-#endif
-
loop = uv_default_loop();
initialize_tty(&tty_out);
@@ -1622,6 +1622,7 @@ TEST_IMPL(tty_escape_sequence_processing) {
MAKE_VALGRIND_HAPPY();
return 0;
+#endif
}
#else