Skip to content

Commit

Permalink
test: suppress ERROR messages when irrelevant to the test result
Browse files Browse the repository at this point in the history
Suppress *ERROR* messages from stderr in tests that verify faulty
situation based on function return value and errno value.
These tests ignore stderr/stdout at all.
This is to avoid a lot of unnecessary messages on the screen during
tests execution.

Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@intel.com>
  • Loading branch information
grom72 committed Mar 20, 2024
1 parent ca3fd60 commit 478a79e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/test/obj_tx_locks/TEST1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2019, Intel Corporation
# Copyright 2015-2024, Intel Corporation

#
# src/test/obj_tx_locks/TEST1 -- unit test for transaction locks
Expand All @@ -21,6 +21,6 @@ require_valgrind 3.10
configure_valgrind drd force-enable
setup

expect_normal_exit ./obj_tx_locks$EXESUFFIX $DIR/testfile1 m
expect_normal_exit ./obj_tx_locks$EXESUFFIX $DIR/testfile1 m 2>/dev/null

pass
4 changes: 2 additions & 2 deletions src/test/out_err_mt/TEST1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2023, Intel Corporation
# Copyright 2015-2024, Intel Corporation
#

#
Expand All @@ -26,7 +26,7 @@ unset PMEM_LOG_FILE
unset PMEMOBJ_LOG_FILE
unset PMEMPOOL_LOG_FILE

expect_normal_exit ./out_err_mt$EXESUFFIX $DIR/testfile1
expect_normal_exit ./out_err_mt$EXESUFFIX $DIR/testfile1 2>/dev/null

check

Expand Down
4 changes: 2 additions & 2 deletions src/test/out_err_mt/TEST2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2015-2023, Intel Corporation
# Copyright 2015-2024, Intel Corporation
#

#
Expand All @@ -24,7 +24,7 @@ unset PMEMOBJ_LOG_LEVEL
unset PMEM_LOG_FILE
unset PMEMOBJ_LOG_FILE

expect_normal_exit ./out_err_mt$EXESUFFIX $DIR/testfile1
expect_normal_exit ./out_err_mt$EXESUFFIX $DIR/testfile1 2>/dev/null

check

Expand Down
4 changes: 2 additions & 2 deletions src/test/util_ctl/TEST0
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2023, Intel Corporation
# Copyright 2016-2024, Intel Corporation

. ../unittest/unittest.sh

Expand All @@ -10,6 +10,6 @@ set_test_labels fault_injection
setup

expect_normal_exit\
./util_ctl$EXESUFFIX $DIR/testconfig
./util_ctl$EXESUFFIX $DIR/testconfig 2>/dev/null

pass
4 changes: 2 additions & 2 deletions src/test/util_ctl/TEST1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2016-2023, Intel Corporation
# Copyright 2016-2024, Intel Corporation

. ../unittest/unittest.sh

Expand All @@ -12,6 +12,6 @@ configure_valgrind memcheck force-enable
setup

expect_normal_exit\
./util_ctl$EXESUFFIX $DIR/testconfig
./util_ctl$EXESUFFIX $DIR/testconfig 2>/dev/null

pass

0 comments on commit 478a79e

Please sign in to comment.