Skip to content

Commit

Permalink
Merge pull request #3 from Tencent/coo-consistency-check
Browse files Browse the repository at this point in the history
Coo consistency check
  • Loading branch information
zzhuncle authored Sep 22, 2023
2 parents cdbb030 + 8a9f8b0 commit 58074da
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,58 @@ Check out some test cases (e.g., [Dirty Write](test_result/test_cases/wat_sda_di
You can explore all results on [report webpage](https://axingguchen.github.io/3TS/).

## Usage
To generate Makefile (all commands are executed under '3TS/src/dbtest'):
Provide two installation methods for the project environment: **Docker** and **Compilation**, and you can freely choose the installation method.

### Docker installation

If you have not installed Docker, you can use the following command to install it with one click.

```shell
curl -s https://get.docker.com/ | sh
```

Obtain Mirror

```shell
docker pull registry.cn-hangzhou.aliyuncs.com/open_projects/3ts_coo:1.0
```

Obtain Mirror to view the image ID and generate a container based on the image ID

```shell
docker images
docker run -it [image_id] /bin/bash
```

View all containers and enter the generated container

```shell
docker ps -a
docker exec -it [container_id] /bin/bash
```

### Compile Installation

To generate Makefile (all commands are executed under '3TS/src/dbtest'):

```
cmake -S ./
```

To complie the code:

```
make
```

## Example

If using Docker installation, the container defaults to installing and configuring the database PostgreSQL,Start it using the following command (if you choose to compile the installation method, you need to install the database and configure it):

```shell
/etc/init.d/postgresql start
```

For test cases, it specify in "do_test_list.txt". Use "#" to exclude (comment) the test case.
We provide three levels of test cases, i.e., the basic cases (33 anomalies in the paper), the predicate cases, and the MDA cases (with multiple transactions and objects). For specific test cases to evaluate, we specify it in do_test_list.txt.

Expand Down
3 changes: 2 additions & 1 deletion src/dbtest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ PROJECT(dbtest)
set(CMAKE_BUILD_TYPE "Debug")
set(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
set(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
message("cmake moudle ${CMAKE_MODULE_PATH}")

set(CMAKE_CXX_FLAGS "-std=c++17 ${CMAKE_CXX_FLAGS} -g -ftest-coverage -fprofile-arcs -Wno-deprecated -fopenmp -pthread -lpthread")
Expand Down Expand Up @@ -49,7 +50,7 @@ list(APPEND SOURCE_FILES_SQL_v2
add_executable(3ts_dbtest_v2 ${SOURCE_FILES_SQL_v2})
# ld:odbc
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake/Modules/")
find_package(odbc REQUIRED)
find_package(ODBC REQUIRED)
list(APPEND ODBC_LD odbc)
# link ld
target_link_libraries(3ts_dbtest_v2 ${THIRD_PARTIES})
Expand Down

0 comments on commit 58074da

Please sign in to comment.