diff --git a/src/systemcmds/tests/test_mount.c b/src/systemcmds/tests/test_mount.c index 080b458cdf..9ad674a433 100644 --- a/src/systemcmds/tests/test_mount.c +++ b/src/systemcmds/tests/test_mount.c @@ -272,6 +272,7 @@ test_mount(int argc, char *argv[]) px4_close(fd); if (ret) { + px4_close(cmd_fd); PX4_ERR("UNLINKING FILE FAILED"); return 1; } @@ -283,7 +284,7 @@ test_mount(int argc, char *argv[]) fsync(fileno(stderr)); usleep(20000); - + px4_close(cmd_fd); /* we always reboot for the next test if we get here */ PX4_INFO("Iteration done, rebooting.."); diff --git a/src/systemcmds/tests/test_ppm_loopback.c b/src/systemcmds/tests/test_ppm_loopback.c index dbfd93c4eb..c004b1ca67 100644 --- a/src/systemcmds/tests/test_ppm_loopback.c +++ b/src/systemcmds/tests/test_ppm_loopback.c @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2012, 2013 PX4 Development Team. All rights reserved. + * Copyright (c) 2012, 2013, 2017 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -173,6 +173,8 @@ int test_ppm_loopback(int argc, char *argv[]) return ERROR; } + close(servo_fd); + warnx("PPM LOOPBACK TEST PASSED SUCCESSFULLY!"); return 0; diff --git a/src/systemcmds/tests/test_servo.c b/src/systemcmds/tests/test_servo.c index bc399315fb..a8a75b7a8e 100644 --- a/src/systemcmds/tests/test_servo.c +++ b/src/systemcmds/tests/test_servo.c @@ -1,6 +1,6 @@ /**************************************************************************** * - * Copyright (c) 2012, 2013 PX4 Development Team. All rights reserved. + * Copyright (c) 2012, 2013, 2017 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -116,5 +116,6 @@ int test_servo(int argc, char *argv[]) printf("Advancing channel 1 to 1800\n"); result = ioctl(fd, PWM_SERVO_SET(1), 1800); out: + close(fd); return 0; } diff --git a/src/systemcmds/tests/test_uart_baudchange.c b/src/systemcmds/tests/test_uart_baudchange.c index de575f9ae1..676ca72cd4 100644 --- a/src/systemcmds/tests/test_uart_baudchange.c +++ b/src/systemcmds/tests/test_uart_baudchange.c @@ -1,8 +1,6 @@ /**************************************************************************** - * px4/sensors/test_gpio.c * - * Copyright (C) 2012 PX4 Development Team. All rights reserved. - * Lorenz Meier + * Copyright (c) 2012, 2017 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -14,7 +12,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be + * 3. Neither the name PX4 nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -33,9 +31,11 @@ * ****************************************************************************/ -/**************************************************************************** - * Included Files - ****************************************************************************/ +/** + * @file test_uart_baudchange.c + * + * @author Lorenz Meier + */ #include #include diff --git a/src/systemcmds/tests/test_uart_break.c b/src/systemcmds/tests/test_uart_break.c index 01e5ee85f8..b5c44a77f0 100644 --- a/src/systemcmds/tests/test_uart_break.c +++ b/src/systemcmds/tests/test_uart_break.c @@ -1,9 +1,6 @@ /**************************************************************************** - * px4/sensors/test_uart_break.c * - * Copyright (C) 2012-2016 PX4 Development Team. All rights reserved. - * Lorenz Meier - * David Sidrane + * Copyright (c) 2012-2017 PX4 Development Team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -15,7 +12,7 @@ * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be + * 3. Neither the name PX4 nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * @@ -34,9 +31,12 @@ * ****************************************************************************/ -/**************************************************************************** - * Included Files - ****************************************************************************/ +/** + * @file test_uart_break.c + * + * @author Lorenz Meier + * @author David Sidrane + */ #include #include @@ -59,40 +59,6 @@ #include #include - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Function Prototypes - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/**************************************************************************** - * Name: test_led - ****************************************************************************/ - int test_uart_break(int argc, char *argv[]) { int uart2_nwrite0 = 0; diff --git a/src/systemcmds/tests/test_uart_loopback.c b/src/systemcmds/tests/test_uart_loopback.c index 6c81f2fd79..f6d4190922 100644 --- a/src/systemcmds/tests/test_uart_loopback.c +++ b/src/systemcmds/tests/test_uart_loopback.c @@ -35,6 +35,7 @@ * @file test_uart_loopback.c * Tests the uart outputs * + * @author Lorenz Meier */ #include @@ -75,6 +76,10 @@ int test_uart_loopback(int argc, char *argv[]) } if (uart5 < 0) { + if (uart2 > 0) { + close(uart2); + } + printf("ERROR opening UART5, aborting..\n"); exit(uart5); }