failed to compile whle random test enabled
This commit is contained in:
parent
9782575a3a
commit
45ec0df68b
|
@ -338,14 +338,15 @@ void taosRemoveDir(char *rootDir);
|
||||||
int taosMkDir(const char *pathname, mode_t mode);
|
int taosMkDir(const char *pathname, mode_t mode);
|
||||||
void taosMvDir(char* destDir, char *srcDir);
|
void taosMvDir(char* destDir, char *srcDir);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef TAOS_RANDOM_FILE_FAIL
|
#ifdef TAOS_RANDOM_FILE_FAIL
|
||||||
void taosSetRandomFileFailFactor(int factor);
|
void taosSetRandomFileFailFactor(int factor);
|
||||||
void taosSetRandomFileFailOutput(const char *path);
|
void taosSetRandomFileFailOutput(const char *path);
|
||||||
ssize_t taosReadFileRandomFail(int fd, void *buf, size_t count, const char *file, uint32_t line);
|
ssize_t taosReadFileRandomFail(int fd, void *buf, size_t count, const char *file, uint32_t line);
|
||||||
ssize_t taosWriteFileRandomFail(int fd, void *buf, size_t count, const char *file, uint32_t line);
|
ssize_t taosWriteFileRandomFail(int fd, void *buf, size_t count, const char *file, uint32_t line);
|
||||||
off_t taosLSeekRandomFail(int fd, off_t offset, int whence, const char *file, uint32_t line);
|
off_t taosLSeekRandomFail(int fd, off_t offset, int whence, const char *file, uint32_t line);
|
||||||
|
#undef taosTRead
|
||||||
|
#undef taosTWrite
|
||||||
|
#undef taosLSeek
|
||||||
#define taosTRead(fd, buf, count) taosReadFileRandomFail(fd, buf, count, __FILE__, __LINE__)
|
#define taosTRead(fd, buf, count) taosReadFileRandomFail(fd, buf, count, __FILE__, __LINE__)
|
||||||
#define taosTWrite(fd, buf, count) taosWriteFileRandomFail(fd, buf, count, __FILE__, __LINE__)
|
#define taosTWrite(fd, buf, count) taosWriteFileRandomFail(fd, buf, count, __FILE__, __LINE__)
|
||||||
#define taosLSeek(fd, offset, whence) taosLSeekRandomFail(fd, offset, whence, __FILE__, __LINE__)
|
#define taosLSeek(fd, offset, whence) taosLSeekRandomFail(fd, offset, whence, __FILE__, __LINE__)
|
||||||
|
@ -356,6 +357,10 @@ void taosMvDir(char* destDir, char *srcDir);
|
||||||
ssize_t taosSendToRandomFail(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen);
|
ssize_t taosSendToRandomFail(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *dest_addr, socklen_t addrlen);
|
||||||
ssize_t taosReadSocketRandomFail(int fd, void *buf, size_t count);
|
ssize_t taosReadSocketRandomFail(int fd, void *buf, size_t count);
|
||||||
ssize_t taosWriteSocketRandomFail(int fd, const void *buf, size_t count);
|
ssize_t taosWriteSocketRandomFail(int fd, const void *buf, size_t count);
|
||||||
|
#undef taosSend
|
||||||
|
#undef taosSendto
|
||||||
|
#undef taosReadSocket
|
||||||
|
#undef taosWriteSocket
|
||||||
#define taosSend(sockfd, buf, len, flags) taosSendRandomFail(sockfd, buf, len, flags)
|
#define taosSend(sockfd, buf, len, flags) taosSendRandomFail(sockfd, buf, len, flags)
|
||||||
#define taosSendto(sockfd, buf, len, flags, dest_addr, addrlen) taosSendToRandomFail(sockfd, buf, len, flags, dest_addr, addrlen)
|
#define taosSendto(sockfd, buf, len, flags, dest_addr, addrlen) taosSendToRandomFail(sockfd, buf, len, flags, dest_addr, addrlen)
|
||||||
#define taosReadSocket(fd, buf, len) taosReadSocketRandomFail(fd, buf, len)
|
#define taosReadSocket(fd, buf, len) taosReadSocketRandomFail(fd, buf, len)
|
||||||
|
|
|
@ -12,6 +12,10 @@
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// no test file errors here
|
||||||
|
#undef TAOS_RANDOM_FILE_FAIL
|
||||||
|
|
||||||
#include "tsdbMain.h"
|
#include "tsdbMain.h"
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "talgo.h"
|
#include "talgo.h"
|
||||||
|
@ -22,8 +26,6 @@
|
||||||
#include "ttime.h"
|
#include "ttime.h"
|
||||||
#include "tulog.h"
|
#include "tulog.h"
|
||||||
|
|
||||||
#include <pthread.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
|
|
||||||
#define TSDB_CFG_FILE_NAME "config"
|
#define TSDB_CFG_FILE_NAME "config"
|
||||||
#define TSDB_DATA_DIR_NAME "data"
|
#define TSDB_DATA_DIR_NAME "data"
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _DEFAULT_SOURCE
|
#define _DEFAULT_SOURCE
|
||||||
|
// no test file errors here
|
||||||
|
#undef TAOS_RANDOM_FILE_FAIL
|
||||||
|
|
||||||
#include "os.h"
|
#include "os.h"
|
||||||
#include "tulog.h"
|
#include "tulog.h"
|
||||||
#include "tlog.h"
|
#include "tlog.h"
|
||||||
|
|
|
@ -13,6 +13,9 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// no test file errors here
|
||||||
|
#undef TAOS_RANDOM_FILE_FAIL
|
||||||
|
|
||||||
#include "tnote.h"
|
#include "tnote.h"
|
||||||
|
|
||||||
taosNoteInfo m_HttpNote;
|
taosNoteInfo m_HttpNote;
|
||||||
|
|
Loading…
Reference in New Issue