From 5cf27a92534088813202e47ab2c6b9ea03f5922f Mon Sep 17 00:00:00 2001 From: wangshi Date: Fri, 11 Nov 2022 09:11:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=AF=91test=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E4=B8=8Bunittest=E7=9A=84=E6=96=87=E4=BB=B6=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=80=E4=BA=9B=E5=9C=A8ohos=E4=B8=8A=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E4=B8=8D=E8=BF=87=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: wangshi --- test/run-tests.c | 7 ------- test/runner-unix.c | 3 --- test/test-idna.c | 1 - test/test-strscpy.c | 1 - 4 files changed, 12 deletions(-) diff --git a/test/run-tests.c b/test/run-tests.c index 94be458..467f2d5 100644 --- a/test/run-tests.c +++ b/test/run-tests.c @@ -65,13 +65,6 @@ typedef BOOL (WINAPI *sCompareObjectHandles)(_In_ HANDLE, _In_ HANDLE); int main(int argc, char **argv) { -#ifndef _WIN32 - // if (0 == geteuid() && NULL == getenv("UV_RUN_AS_ROOT")) { - // fprintf(stderr, "The libuv test suite cannot be run as root.\n"); - // return EXIT_FAILURE; - // } -#endif - platform_init(argc, argv); argv = uv_setup_args(argc, argv); diff --git a/test/runner-unix.c b/test/runner-unix.c index 85856d5..60f1118 100644 --- a/test/runner-unix.c +++ b/test/runner-unix.c @@ -109,7 +109,6 @@ int process_start(char* name, char* part, process_info_t* p, int is_helper) { args[n++] = NULL; stdout_file = fopen("/data/local/tmp/test.txt", "w+"); - //stdout_file = tmpfile(); stdout_fd = fileno(stdout_file); if (!stdout_file) { perror("tmpfile"); @@ -143,8 +142,6 @@ int process_start(char* name, char* part, process_info_t* p, int is_helper) { /* child */ if (is_helper) closefd(pipefd[0]); - //dup2(stdout_fd, STDOUT_FILENO); - //dup2(stdout_fd, STDERR_FILENO); execve(args[0], args, environ); perror("execve()"); _exit(127); diff --git a/test/test-idna.c b/test/test-idna.c index cb7e170..77af3a9 100644 --- a/test/test-idna.c +++ b/test/test-idna.c @@ -21,7 +21,6 @@ #include "task.h" #include "../src/idna.h" -//#include "../src/idna.c" #include TEST_IMPL(utf8_decode1) { diff --git a/test/test-strscpy.c b/test/test-strscpy.c index ea4bc8c..993f7a1 100644 --- a/test/test-strscpy.c +++ b/test/test-strscpy.c @@ -24,7 +24,6 @@ #include #include "../src/strscpy.h" -//#include "../src/strscpy.c" TEST_IMPL(strscpy) { char d[4];