diff --git a/libos/test/fs/test_enc.py b/libos/test/fs/test_enc.py index f731f7b47a..c62d70875d 100644 --- a/libos/test/fs/test_enc.py +++ b/libos/test/fs/test_enc.py @@ -67,8 +67,8 @@ def test_000_gen_key(self): # test random key generation key_path = os.path.join(self.TEST_DIR, 'tmpkey') args = ['gen-key', '-w', key_path] - stdout, _ = self.__pf_crypt(args) - self.assertIn('Wrap key saved to: ' + key_path, stdout) + _, stderr = self.__pf_crypt(args) + self.assertIn('Wrap key saved to: ' + key_path, stderr) self.assertEqual(os.path.getsize(key_path), 16) os.remove(key_path) diff --git a/tools/sgx/common/util.h b/tools/sgx/common/util.h index 335b6fe6d9..a375f172ed 100644 --- a/tools/sgx/common/util.h +++ b/tools/sgx/common/util.h @@ -30,12 +30,12 @@ extern endianness_t g_endianness; #define DBG(fmt, ...) \ do { \ if (g_verbose) \ - dprintf(g_stdout_fd, fmt, ##__VA_ARGS__); \ + dprintf(g_stderr_fd, fmt, ##__VA_ARGS__); \ } while (0) #define INFO(fmt, ...) \ do { \ - dprintf(g_stdout_fd, fmt, ##__VA_ARGS__); \ + dprintf(g_stderr_fd, fmt, ##__VA_ARGS__); \ } while (0) #define ERROR(fmt, ...) \