zhaixiaojuan opened a new issue, #2345: URL: https://github.com/apache/brpc/issues/2345
**Describe the bug (描述bug)** 在执行iobuf_unittest.cpp文件中append_store_append_cut测试时,系统中的/dev/null被删除 在执行该测试前,/dev/null的类型为字符设备: # ll /dev/null crw-r--r-- 1 root root 1, 3 8月 4 18:40 /dev/null 在执行该测试后,由于测试用例中会删除/dev/null,导致在执行for循环中open函数,创建了一个文件类型的/dev/null: # ll /dev/null -rw-rw-rw- 1 root root 0 Aug 4 07:22 /dev/null 这将导致在使用系统时,会由于/dev/null类型被修改,而引起一系列问题。 **To Reproduce (复现方法)** cd test make sh run_tests.sh **Expected behavior (期望行为)** 不应该删除/dev/null文件 **Versions (各种版本)** OS: Linux Compiler: g++ brpc: master protobuf: 3.5.0 **Additional context/screenshots (更多上下文/截图)** Activate the web console with: systemctl enable --now cockpit.socket Last login: Fri Aug 4 05:21:48 2023 from 10.130.0.184 -bash: /dev/null: Permission denied -bash: /dev/null: Permission denied -bash: /dev/null: Permission denied -bash: /dev/null: Permission denied -bash: /dev/null: Permission denied -bash: /dev/null: Permission denied -bash: /dev/null: Permission denied -bash: /dev/null: Permission denied -bash: /dev/null: Permission denied -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
