diff --git a/.github/workflows/gem5.yml b/.github/workflows/gem5.yml index 6b370b9122..d9ef4d5fba 100644 --- a/.github/workflows/gem5.yml +++ b/.github/workflows/gem5.yml @@ -126,3 +126,33 @@ jobs: mkdir -p $GEM5_HOME/util/xs_scripts/test_multi_core cd $GEM5_HOME/util/xs_scripts/test_multi_core bash ../kmh-ruby-dual.sh /nfs-nvme/home/share/zyy/shared_payloads/bzip_checkpoint_with_sv39_without_rdtime_with_dualmtimecpt_1000M.gz + + difftest_check: + runs-on: self-hosted + continue-on-error: false + name: XS-GEM5 - Check difftest + steps: + - uses: actions/checkout@v2 + - name: Build DRAMSim + run: | + export GEM5_HOME=$(pwd) + cd ext/dramsim3 + git clone git@github.com:umd-memsys/DRAMSim3.git DRAMsim3 + cd DRAMsim3 && mkdir -p build + cd build + cmake .. + make -j 48 + cd $GEM5_HOME + - name: Build GEM5 debug + run: CC=clang CXX=clang++ scons build/RISCV/gem5.opt -j 48 --gold-linker + - name: difftest check + run: | + export GCBV_REF_SO="/nfs-nvme/home/share/zhenhao/ref-h/build-error/riscv64-nemu-interpreter-so" + export GCB_RESTORER="/nfs-nvme/home/share/zhenhao/LibCheckpointAlpha/build/gcpt.bin" + export GEM5_HOME=$(pwd) + mkdir -p $GEM5_HOME/util/xs_scripts/test + cd $GEM5_HOME/util/xs_scripts/test + bash ../kmh_6wide.sh /nfs/home/share/jiaxiaoyu/simpoint_checkpoint_archive/spec06_rv64gcb_O3_20m_gcc12.2.0-intFpcOff-jeMalloc/zstd-checkpoint-0-0-0/xalancbmk/133/_133_0.006424_.zstd 2>log.txt || exit_code=$? + if [ ${exit_code} -eq 0 ]; then echo "Difftest is broken, it should report error!" exit 1; fi + match=$(grep ".*Difftest failed!.*" log.txt -c) + if [ ${match} -eq 0 ]; then echo "Difftest is broken, it should report at least one agnostic related difference!" exit 1; fi