Add litmus tests for MTTCG consistency tests
v5 cover Add litmus tests for MTTCG consistency tests
Hello,
The following patch series adds litmus tests to test consistency for MTTCG enabled qemu. These patches apply on top of the clean up tests/tcg folder made by my previous patch series.
The tests were generated using the litmus tool. The sources and instructions on how to generate these sources can be found in this
repository: https://github.com/pranith/qemu-litmus
I tested these on both an x86 and an Aarch64 machine. These tests are currently enabled for the trusty configuration on travis.
Thanks,
--
Pranith
*** BLURB HERE ***
Pranith Kumar (3):
tests/tcg: Add i386 litmus test
tests/tcg: Add aarch64 litmus tests
travis: Enable litmus tests
.travis.yml | 8 + tests/tcg/aarch64/litmus/ARMARM00.c | 501 +++++++++++++ tests/tcg/aarch64/litmus/ARMARM01.c | 504 +++++++++++++ tests/tcg/aarch64/litmus/ARMARM02.c | 571 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM03.c | 498 +++++++++++++ tests/tcg/aarch64/litmus/ARMARM04+BIS.c | 556 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM04+TER.c | 538 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM04.c | 556 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM05.c | 553 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM06+AP+AA.c | 581 +++++++++++++++ tests/tcg/aarch64/litmus/ARMARM06+AP+AP.c | 581 +++++++++++++++ tests/tcg/aarch64/litmus/ARMARM06.c | 581 +++++++++++++++ tests/tcg/aarch64/litmus/ARMARM07+SAL.c | 497 +++++++++++++ tests/tcg/aarch64/litmus/Makefile | 53 ++ tests/tcg/aarch64/litmus/README.txt | 22 + tests/tcg/aarch64/litmus/affinity.c | 159 ++++ tests/tcg/aarch64/litmus/affinity.h | 34 + tests/tcg/aarch64/litmus/comp.sh | 30 + tests/tcg/aarch64/litmus/litmus_rand.c | 64 ++ tests/tcg/aarch64/litmus/litmus_rand.h | 29 + tests/tcg/aarch64/litmus/outs.c | 148 ++++ tests/tcg/aarch64/litmus/outs.h | 49 ++ tests/tcg/aarch64/litmus/run.sh | 378 ++++++++++ tests/tcg/aarch64/litmus/show.awk | 2 + tests/tcg/aarch64/litmus/utils.c | 1148 +++++++++++++++++++++++++++++ tests/tcg/aarch64/litmus/utils.h | 275 +++++++ tests/tcg/i386/litmus/Makefile | 42 ++ tests/tcg/i386/litmus/README.txt | 22 + tests/tcg/i386/litmus/SAL.c | 491 ++++++++++++ tests/tcg/i386/litmus/affinity.c | 159 ++++ tests/tcg/i386/litmus/affinity.h | 34 + tests/tcg/i386/litmus/comp.sh | 10 + tests/tcg/i386/litmus/litmus_rand.c | 64 ++ tests/tcg/i386/litmus/litmus_rand.h | 29 + tests/tcg/i386/litmus/outs.c | 148 ++++ tests/tcg/i386/litmus/outs.h | 49 ++ tests/tcg/i386/litmus/run.sh | 55 ++ tests/tcg/i386/litmus/show.awk | 2 + tests/tcg/i386/litmus/utils.c | 1148 +++++++++++++++++++++++++++++ tests/tcg/i386/litmus/utils.h | 275 +++++++ 40 files changed, 11444 insertions(+) create mode 100644 tests/tcg/aarch64/litmus/ARMARM00.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM01.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM02.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM03.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM04+BIS.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM04+TER.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM04.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM05.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM06+AP+AA.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM06+AP+AP.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM06.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM07+SAL.c create mode 100644 tests/tcg/aarch64/litmus/Makefile create mode 100644 tests/tcg/aarch64/litmus/README.txt create mode 100644 tests/tcg/aarch64/litmus/affinity.c create mode 100644 tests/tcg/aarch64/litmus/affinity.h create mode 100644 tests/tcg/aarch64/litmus/comp.sh create mode 100644 tests/tcg/aarch64/litmus/litmus_rand.c create mode 100644 tests/tcg/aarch64/litmus/litmus_rand.h create mode 100644 tests/tcg/aarch64/litmus/outs.c create mode 100644 tests/tcg/aarch64/litmus/outs.h create mode 100755 tests/tcg/aarch64/litmus/run.sh create mode 100644 tests/tcg/aarch64/litmus/show.awk create mode 100644 tests/tcg/aarch64/litmus/utils.c create mode 100644 tests/tcg/aarch64/litmus/utils.h create mode 100644 tests/tcg/i386/litmus/Makefile create mode 100644 tests/tcg/i386/litmus/README.txt create mode 100644 tests/tcg/i386/litmus/SAL.c create mode 100644 tests/tcg/i386/litmus/affinity.c create mode 100644 tests/tcg/i386/litmus/affinity.h create mode 100644 tests/tcg/i386/litmus/comp.sh create mode 100644 tests/tcg/i386/litmus/litmus_rand.c create mode 100644 tests/tcg/i386/litmus/litmus_rand.h create mode 100644 tests/tcg/i386/litmus/outs.c create mode 100644 tests/tcg/i386/litmus/outs.h create mode 100755 tests/tcg/i386/litmus/run.sh create mode 100644 tests/tcg/i386/litmus/show.awk create mode 100644 tests/tcg/i386/litmus/utils.c create mode 100644 tests/tcg/i386/litmus/utils.h
Signature · 1 line
2.10.2
PATCH v5 3/3 travis: Enable litmus tests
--- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+)
.travis.yml +8 -0
@@ -99,6 +99,7 @@ matrix: before_install: - sudo apt-get update -qq - sudo apt-get build-dep -qq qemu + - sudo apt-get install gcc-aarch64-linux-gnu - wget -O - http://people.linaro.org/~alex.bennee/qemu-submodule-git-seed.tar.xz | tar -xvJ - git submodule update --init --recursive # Using newer GCC with sanitizers
@@ -144,3 +145,10 @@ matrix: - TEST_CMD="" before_script: - ./configure ${CONFIG} --extra-cflags="-g3 -O0 -fsanitize=thread -fuse-ld=gold" || cat config.log + after_success: + - cd tests/tcg/i386/litmus + - export QEMU=../../../../x86_64-linux-user/qemu-x86_64 + - make tests + - cd ../../aarch64/litmus + - export QEMU=../../../../aarch64-linux-user/qemu-aarch64 + - make tests
Signature · 1 line
2.10.2
PATCH v5 1/3 tests/tcg: Add i386 litmus test
In reply to Pranith Kumar--- tests/tcg/i386/litmus/Makefile | 42 ++ tests/tcg/i386/litmus/README.txt | 22 + tests/tcg/i386/litmus/SAL.c | 491 +++++++++++++++ tests/tcg/i386/litmus/affinity.c | 159 +++++ tests/tcg/i386/litmus/affinity.h | 34 ++ tests/tcg/i386/litmus/comp.sh | 10 + tests/tcg/i386/litmus/litmus_rand.c | 64 ++ tests/tcg/i386/litmus/litmus_rand.h | 29 + tests/tcg/i386/litmus/outs.c | 148 +++++ tests/tcg/i386/litmus/outs.h | 49 ++ tests/tcg/i386/litmus/run.sh | 55 ++ tests/tcg/i386/litmus/show.awk | 2 + tests/tcg/i386/litmus/utils.c | 1148 +++++++++++++++++++++++++++++++++++ tests/tcg/i386/litmus/utils.h | 275 +++++++++ 14 files changed, 2528 insertions(+) create mode 100644 tests/tcg/i386/litmus/Makefile create mode 100644 tests/tcg/i386/litmus/README.txt create mode 100644 tests/tcg/i386/litmus/SAL.c create mode 100644 tests/tcg/i386/litmus/affinity.c create mode 100644 tests/tcg/i386/litmus/affinity.h create mode 100644 tests/tcg/i386/litmus/comp.sh create mode 100644 tests/tcg/i386/litmus/litmus_rand.c create mode 100644 tests/tcg/i386/litmus/litmus_rand.h create mode 100644 tests/tcg/i386/litmus/outs.c create mode 100644 tests/tcg/i386/litmus/outs.h create mode 100755 tests/tcg/i386/litmus/run.sh create mode 100644 tests/tcg/i386/litmus/show.awk create mode 100644 tests/tcg/i386/litmus/utils.c create mode 100644 tests/tcg/i386/litmus/utils.h
tests/tcg/i386/litmus/Makefile new file +42 -0
@@ -0,0 +1,42 @@ +GCC=gcc +GCCOPTS=-D_GNU_SOURCE -DFORCE_AFFINITY -Wall -std=gnu99 -fomit-frame-pointer -O2 -pthread +LINKOPTS= +SRC=\ + SAL.c\ + +EXE=$(SRC:.c=.exe) +T=$(SRC:.c=.t) + +all: $(EXE) $(T) + +clean: + /bin/rm -f *.o *.s *.t *.exe *~ + +cleansource: + /bin/rm -f *.o *.c *.h *.s *~ + +affinity.o: affinity.c + $(GCC) $(GCCOPTS) -O2 -c affinity.c + +outs.o: outs.c + $(GCC) $(GCCOPTS) -O2 -c outs.c + +utils.o: utils.c + $(GCC) $(GCCOPTS) -O2 -c utils.c + +litmus_rand.o: litmus_rand.c + $(GCC) $(GCCOPTS) -O2 -c litmus_rand.c + +UTILS=affinity.o outs.o utils.o litmus_rand.o + +%.exe:%.s $(UTILS) + $(GCC) $(GCCOPTS) $(LINKOPTS) -o $@ $(UTILS) $< + +%.s:%.c + $(GCC) $(GCCOPTS) -S $< + +%.t:%.s + awk -f show.awk $< > $@ + +tests: all + ./run.sh
tests/tcg/i386/litmus/README.txt new file +22 -0
@@ -0,0 +1,22 @@ +Tests produced by litmus for architecture X86 on linux + +COMPILING + with command 'make [-j N]' or 'sh comp.sh' + +RUNNING ALL TESTS + with command 'sh run.sh'. Test result on standard output. + +RUNNING ONE TEST + Tests are .exe files, for instance SAL.exe, run it by './SAL.exe' + +RUNNING OPTIONS + Main options to the run.sh script and to .exe files: + -v be verbose (can be repeated). + -a <n> number of (logical) processors available, default 0. + The default value of 0 means that .exe files attempt + to infer the actual number of logical threads. + -s <n> one run operates on arrays of size <n>, default 100000. + -r <n> number of runs, default 10. + + For more options see for instance './SAL.exe -help' and litmus documentation + <http://diy.inria.fr/doc/litmus.html>
tests/tcg/i386/litmus/SAL.c new file +491 -0
491 lines not on this page · raw message
tests/tcg/i386/litmus/affinity.c new file +159 -0
159 lines not on this page · raw message
tests/tcg/i386/litmus/affinity.h new file +34 -0
@@ -0,0 +1,34 @@ +/****************************************************************************/ +/* the diy toolsuite */ +/* */ +/* Jade Alglave, University College London, UK. */ +/* Luc Maranget, INRIA Paris-Rocquencourt, France. */ +/* */ +/* Copyright 2015-present Institut National de Recherche en Informatique et */ +/* en Automatique and the authors. All rights reserved. */ +/* */ +/* This software is governed by the CeCILL-B license under French law and */ +/* abiding by the rules of distribution of free software. You can use, */ +/* modify and/ or redistribute the software under the terms of the CeCILL-B */ +/* license as circulated by CEA, CNRS and INRIA at the following URL */ +/* "http://www.cecill.info". We also give a copy in LICENSE.txt. */ +/****************************************************************************/ +#ifndef _AFFINITY_H +#define _AFFINITY_H 1 + +#include "utils.h" + +#ifdef CPUS_DEFINED +cpus_t *read_affinity (void ) ; +#ifdef FORCE_AFFINITY +cpus_t *read_force_affinity (int n_avail,int verbose) ; +#endif +void write_affinity (cpus_t *p) ; +#endif + +void write_one_affinity (int cpu) ; +#ifdef FORCE_AFFINITY +void force_one_affinity (int cpu,int sz,int verbose,char *name) ; +#endif + +#endif
tests/tcg/i386/litmus/comp.sh new file +10 -0
@@ -0,0 +1,10 @@ +GCC=gcc +GCCOPTS="-D_GNU_SOURCE -DFORCE_AFFINITY -Wall -std=gnu99 -fomit-frame-pointer -O2 -pthread" +LINKOPTS="" +/bin/rm -f *.exe *.s +$GCC $GCCOPTS -O2 -c affinity.c +$GCC $GCCOPTS -O2 -c outs.c +$GCC $GCCOPTS -O2 -c utils.c +$GCC $GCCOPTS -O2 -c litmus_rand.c +$GCC $GCCOPTS $LINKOPTS -o SAL.exe affinity.o outs.o utils.o litmus_rand.o SAL.c +$GCC $GCCOPTS -S SAL.c && awk -f show.awk SAL.s > SAL.t && /bin/rm SAL.s
tests/tcg/i386/litmus/litmus_rand.c new file +64 -0
64 lines not on this page · raw message
tests/tcg/i386/litmus/litmus_rand.h new file +29 -0
@@ -0,0 +1,29 @@ +/****************************************************************************/ +/* the diy toolsuite */ +/* */ +/* Jade Alglave, University College London, UK. */ +/* Luc Maranget, INRIA Paris-Rocquencourt, France. */ +/* */ +/* Copyright 2015-present Institut National de Recherche en Informatique et */ +/* en Automatique and the authors. All rights reserved. */ +/* */ +/* This software is governed by the CeCILL-B license under French law and */ +/* abiding by the rules of distribution of free software. You can use, */ +/* modify and/ or redistribute the software under the terms of the CeCILL-B */ +/* license as circulated by CEA, CNRS and INRIA at the following URL */ +/* "http://www.cecill.info". We also give a copy in LICENSE.txt. */ +/****************************************************************************/ +#ifndef _LITMUS_RAND_H +#define _LITMUS_RAND_H 1 + +#include <stdint.h> + +/* type of state for pseudorandom generators */ +typedef uint32_t st_t ; + +/* Unlocked random bit */ + +int rand_bit (st_t *st) ; +uint32_t rand_k (st_t *st,uint32_t n) ; + +#endif
tests/tcg/i386/litmus/outs.c new file +148 -0
148 lines not on this page · raw message
tests/tcg/i386/litmus/outs.h new file +49 -0
49 lines not on this page · raw message
tests/tcg/i386/litmus/run.sh new file +55 -0
55 lines not on this page · raw message
tests/tcg/i386/litmus/show.awk new file +2 -0
@@ -0,0 +1,2 @@ +/START _litmus_P/ { print $0 } +/_litmus_P[0-9]+_[0-9]+/ { getline; print $0 ; }
tests/tcg/i386/litmus/utils.c new file +1148 -0
1,148 lines not on this page · raw message
tests/tcg/i386/litmus/utils.h new file +275 -0
275 lines not on this page · raw message
Signature · 1 line
2.10.2
PATCH v5 2/3 tests/tcg: Add aarch64 litmus tests
In reply to Pranith Kumar--- tests/tcg/aarch64/litmus/ARMARM00.c | 501 +++++++++++++ tests/tcg/aarch64/litmus/ARMARM01.c | 504 +++++++++++++ tests/tcg/aarch64/litmus/ARMARM02.c | 571 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM03.c | 498 +++++++++++++ tests/tcg/aarch64/litmus/ARMARM04+BIS.c | 556 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM04+TER.c | 538 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM04.c | 556 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM05.c | 553 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM06+AP+AA.c | 581 +++++++++++++++ tests/tcg/aarch64/litmus/ARMARM06+AP+AP.c | 581 +++++++++++++++ tests/tcg/aarch64/litmus/ARMARM06.c | 581 +++++++++++++++ tests/tcg/aarch64/litmus/ARMARM07+SAL.c | 497 +++++++++++++ tests/tcg/aarch64/litmus/Makefile | 53 ++ tests/tcg/aarch64/litmus/README.txt | 22 + tests/tcg/aarch64/litmus/affinity.c | 159 ++++ tests/tcg/aarch64/litmus/affinity.h | 34 + tests/tcg/aarch64/litmus/comp.sh | 30 + tests/tcg/aarch64/litmus/litmus_rand.c | 64 ++ tests/tcg/aarch64/litmus/litmus_rand.h | 29 + tests/tcg/aarch64/litmus/outs.c | 148 ++++ tests/tcg/aarch64/litmus/outs.h | 49 ++ tests/tcg/aarch64/litmus/run.sh | 378 ++++++++++ tests/tcg/aarch64/litmus/show.awk | 2 + tests/tcg/aarch64/litmus/utils.c | 1148 +++++++++++++++++++++++++++++ tests/tcg/aarch64/litmus/utils.h | 275 +++++++ 25 files changed, 8908 insertions(+) create mode 100644 tests/tcg/aarch64/litmus/ARMARM00.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM01.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM02.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM03.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM04+BIS.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM04+TER.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM04.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM05.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM06+AP+AA.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM06+AP+AP.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM06.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM07+SAL.c create mode 100644 tests/tcg/aarch64/litmus/Makefile create mode 100644 tests/tcg/aarch64/litmus/README.txt create mode 100644 tests/tcg/aarch64/litmus/affinity.c create mode 100644 tests/tcg/aarch64/litmus/affinity.h create mode 100644 tests/tcg/aarch64/litmus/comp.sh create mode 100644 tests/tcg/aarch64/litmus/litmus_rand.c create mode 100644 tests/tcg/aarch64/litmus/litmus_rand.h create mode 100644 tests/tcg/aarch64/litmus/outs.c create mode 100644 tests/tcg/aarch64/litmus/outs.h create mode 100755 tests/tcg/aarch64/litmus/run.sh create mode 100644 tests/tcg/aarch64/litmus/show.awk create mode 100644 tests/tcg/aarch64/litmus/utils.c create mode 100644 tests/tcg/aarch64/litmus/utils.h
tests/tcg/aarch64/litmus/ARMARM00.c new file +501 -0
@@ -0,0 +1,501 @@ +/****************************************************************************/ +/* the diy toolsuite */ +/* */ +/* Jade Alglave, University College London, UK. */ +/* Luc Maranget, INRIA Paris-Rocquencourt, France. */ +/* */ +/* This C source is a product of litmus7 and includes source that is */ +/* governed by the CeCILL-B license. */ +/****************************************************************************/ +/* Parameters */ +#define SIZE_OF_TEST 100000 +#define NUMBER_OF_RUN 10 +#define AVAIL 0 +#define STRIDE 1 +#define MAX_LOOP 0 +#define N 2 +#define AFF_INCR (0) +/* Includes */ +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <errno.h> +#include <assert.h> +#include <time.h> +#include <limits.h> +#include "utils.h" +#include "outs.h" +#include "affinity.h" + +/* params */ +typedef struct { +int verbose; +int size_of_test,max_run; +int stride; +aff_mode_t aff_mode; +int ncpus, ncpus_used; +int do_change; +}param_t ; + + +/* Full memory barrier */ +inline static void mbar (void ) { + asm __volatile__ ("dsb sy" :::"memory" ); +} + +/* Barriers macros */ +inline static void barrier_wait (unsigned int id,unsigned int k,int volatile *b) { +if ((k %N ) == id) { + *b =1 ; + }else { +while (*b ==0 ) ; + } +} + +/**********************/ +/* Context definition */ +/**********************/ + + +typedef struct { +/* Shared variables */ +int *y; +int *x; +/* Final content of observed registers */ +int *out_1_x0; +int *out_1_x2; +/* Check data */ +pb_t *fst_barrier; +/* Barrier for litmus loop */ +int volatile *barrier; +/* Instance seed */ +st_t seed; +/* Parameters */ +param_t *_p; +}ctx_t ; + +inline static int final_cond (int _out_1_x0,int _out_1_x2) { +switch (_out_1_x0) { +case 1 : +switch (_out_1_x2) { +case 0 : +return 1 ; +default : +return 0 ; + } +default : +return 0 ; + } +} + +inline static int final_ok (int cond) { +return cond; +} + +/**********************/ +/* Outcome collection */ +/**********************/ +#define NOUTS 2 +typedef intmax_t outcome_t [NOUTS ]; + +static const int out_1_x0_f =0 ; +static const int out_1_x2_f =1 ; + + +typedef struct hist_t { +outs_t *outcomes ; +count_t n_pos,n_neg ; +}hist_t ; + +static hist_t *alloc_hist (void ) { +hist_t *p =malloc_check (sizeof (*p)) ; + p->outcomes =NULL ; + p->n_pos = p->n_neg =0 ; +return p ; +} + +static void free_hist (hist_t *h) { +free_outs (h->outcomes) ; +free (h) ; +} + +static void add_outcome (hist_t *h,count_t v,outcome_t o,int show) { + h->outcomes =add_outcome_outs (h->outcomes,o,NOUTS ,v,show) ; +} + +static void merge_hists (hist_t *h0,hist_t *h1) { + h0->n_pos += h1->n_pos ; + h0->n_neg += h1->n_neg ; + h0->outcomes =merge_outs (h0->outcomes,h1->outcomes,NOUTS ) ; +} + +static count_t sum_hist (hist_t *h) { +return sum_outs (h->outcomes) ; +} + + +static void do_dump_outcome (FILE *fhist,intmax_t *o,count_t c,int show) { +fprintf (fhist,"%-6" PCTR "%c>1:X0=%i; 1:X2=%i;\n" ,c,show ?'*' :':' ,(int )o[out_1_x0_f],(int )o[out_1_x2_f]); +} + +static void just_dump_outcomes (FILE *fhist,hist_t *h) { +outcome_t buff ; +dump_outs (fhist,do_dump_outcome,h->outcomes,buff,NOUTS ) ; +} + +/*******************************************************/ +/* Context allocation, freeing and reinitialization */ +/*******************************************************/ + +static void init (ctx_t *_a) { +int size_of_test = _a->_p->size_of_test; + + _a->seed =rand (); + _a->out_1_x0 =malloc_check (size_of_test*sizeof (*(_a->out_1_x0))); + _a->out_1_x2 =malloc_check (size_of_test*sizeof (*(_a->out_1_x2))); + _a->y =malloc_check (size_of_test*sizeof (*(_a->y))); + _a->x =malloc_check (size_of_test*sizeof (*(_a->x))); + _a->fst_barrier =pb_create (N ); + _a->barrier =malloc_check (size_of_test*sizeof (*(_a->barrier))); +} + +static void finalize (ctx_t *_a) { +free ((void *)_a->y); +free ((void *)_a->x); +free ((void *)_a->out_1_x0); +free ((void *)_a->out_1_x2); +pb_free (_a->fst_barrier); +free ((void *)_a->barrier); +} + +static void reinit (ctx_t *_a) { +for (int _i = _a->_p->size_of_test-1 ; _i >=0 ; _i--) { + _a->y[_i] =0 ; + _a->x[_i] =0 ; + _a->out_1_x0[_i] =-239487 ; + _a->out_1_x2[_i] =-239487 ; + _a->barrier[_i] =0 ; + } +} + +/**************************************/ +/* Prefetch (and check) global values */ +/**************************************/ + +static void check_globals (ctx_t *_a) { +int *y = _a->y; +int *x = _a->x; +for (int _i = _a->_p->size_of_test-1 ; _i >=0 ; _i--) { +if (rand_bit (&(_a->seed)) && y[_i] !=0 )fatal ("ARMARM00, check_globals failed" ); +if (rand_bit (&(_a->seed)) && x[_i] !=0 )fatal ("ARMARM00, check_globals failed" ); + } +pb_wait (_a->fst_barrier); +} + +/***************/ +/* Litmus code */ +/***************/ + +typedef struct { +int th_id;/* I am running on this thread */ +int *cpu;/* On this cpu */ +ctx_t *_a;/* In this context */ +}parg_t ; + + + + + +static void *P0 (void *_vb) { +mbar (); +parg_t *_b = (parg_t *)_vb; +ctx_t *_a = _b->_a; +int _ecpu = _b->cpu[_b->th_id]; +force_one_affinity (_ecpu,AVAIL ,_a->_p->verbose,"ARMARM00" ); +check_globals (_a); +int _th_id = _b->th_id; +int volatile *barrier = _a->barrier; +int _size_of_test = _a->_p->size_of_test; +int _stride = _a->_p->stride; +for (int _j = _stride ; _j >0 ; _j--) { +for (int _i = _size_of_test-_j ; _i >=0 ; _i -= _stride) { +barrier_wait (_th_id,_i,&barrier[_i]); +int trashed_x0; +int trashed_x2; +asm __volatile__ ( +"\n" +"#START _litmus_P0\n" +"#_litmus_P0_0\n\t" +"mov %w[x0],#1\n" +"#_litmus_P0_1\n\t" +"str %w[x0],[%[x1]]\n" +"#_litmus_P0_2\n\t" +"mov %w[x2],#1\n" +"#_litmus_P0_3\n\t" +"stlr %w[x2],[%[x3]]\n" +"#END _litmus_P0\n\t" +:[x2]"=&r" (trashed_x2),[x0]"=&r" (trashed_x0) +:[x1]"r" (&_a->x[_i]),[x3]"r" (&_a->y[_i]) +:"cc" ,"memory" +); + } + } +mbar (); +return NULL ; +} + +static void *P1 (void *_vb) { +mbar (); +parg_t *_b = (parg_t *)_vb; +ctx_t *_a = _b->_a; +int _ecpu = _b->cpu[_b->th_id]; +force_one_affinity (_ecpu,AVAIL ,_a->_p->verbose,"ARMARM00" ); +check_globals (_a); +int _th_id = _b->th_id; +int volatile *barrier = _a->barrier; +int _size_of_test = _a->_p->size_of_test; +int _stride = _a->_p->stride; +int *out_1_x0 = _a->out_1_x0; +int *out_1_x2 = _a->out_1_x2; +for (int _j = _stride ; _j >0 ; _j--) { +for (int _i = _size_of_test-_j ; _i >=0 ; _i -= _stride) { +barrier_wait (_th_id,_i,&barrier[_i]); +asm __volatile__ ( +"\n" +"#START _litmus_P1\n" +"#_litmus_P1_0\n\t" +"ldar %w[x0],[%[x1]]\n" +"#_litmus_P1_1\n\t" +"cmp %w[x0],#1\n" +"#_litmus_P1_2\n\t" +"b.ne 0f\n" +"#_litmus_P1_3\n\t" +"ldr %w[x2],[%[x3]]\n" +"#_litmus_P1_4\n" +"0:\n" +"#END _litmus_P1\n\t" +:[x2]"=&r" (out_1_x2[_i]),[x0]"=&r" (out_1_x0[_i]) +:[x1]"r" (&_a->y[_i]),"[x2]" (-1 ),[x3]"r" (&_a->x[_i]) +:"cc" ,"memory" +); + } + } +mbar (); +return NULL ; +} + +typedef struct { +pm_t *p_mutex; +pb_t *p_barrier; +param_t *_p; +int z_id; +int *cpus; +}zyva_t ; + +#define NT N + +static void *zyva (void *_va) { +zyva_t *_a = (zyva_t *) _va; +param_t *_b = _a->_p; +pb_wait (_a->p_barrier); +pthread_t thread[NT ]; +parg_t parg[N ]; +f_t *fun[] = {&P0 ,&P1 }; +hist_t *hist =alloc_hist (); +ctx_t ctx; + ctx._p = _b; + +init (&ctx); +for (int _p =N -1 ; _p >=0 ; _p--) { + parg[_p].th_id = _p; parg[_p]._a = &ctx; + parg[_p].cpu = &(_a->cpus[0 ]); + } + +for (int n_run =0 ; n_run < _b->max_run ; n_run++) { +if (_b->aff_mode == aff_random) { +pb_wait (_a->p_barrier); +if (_a->z_id ==0 )perm_prefix_ints (&ctx.seed,_a->cpus,_b->ncpus_used,_b->ncpus); +pb_wait (_a->p_barrier); + }else { + } +if (_b->verbose>1 )fprintf (stderr,"Run %i of %i\r" , n_run, _b->max_run); +reinit (&ctx); +if (_b->do_change)perm_funs (&ctx.seed,fun,N ); +for (int _p =NT -1 ; _p >=0 ; _p--) { +launch (&thread[_p],fun[_p],&parg[_p]); + } +if (_b->do_change)perm_threads (&ctx.seed,thread,NT ); +for (int _p =NT -1 ; _p >=0 ; _p--) { +join (&thread[_p]); + } +/* Log final states */ +for (int _i = _b->size_of_test-1 ; _i >=0 ; _i--) { +int _out_1_x0_i = ctx.out_1_x0[_i]; +int _out_1_x2_i = ctx.out_1_x2[_i]; +outcome_t o; +int cond; + + cond =final_ok (final_cond (_out_1_x0_i,_out_1_x2_i)); + o[out_1_x0_f] = _out_1_x0_i; + o[out_1_x2_f] = _out_1_x2_i; +add_outcome (hist,1 ,o,cond); +if (cond) { hist->n_pos++; }else { hist->n_neg++; } + } + } + +finalize (&ctx); +return hist; +} + +#define ENOUGH 10 + +static int postlude (FILE *out,cmd_t *cmd,hist_t *hist,count_t p_true,count_t p_false,tsc_t total) { +fprintf (out,"Test ARMARM00 Forbidden\n" ); +fprintf (out,"Histogram (%i states)\n" ,finals_outs (hist->outcomes)); +just_dump_outcomes (out,hist); +int cond = p_true ==0 ; +fprintf (out,"%s\n" ,cond?"Ok" :"No" ); +fprintf (out,"\nWitnesses\n" ); +fprintf (out,"Positive: %" PCTR ", Negative: %" PCTR "\n" ,p_false,p_true); +fprintf (out,"Condition ~exists (1:X0=1 /\\ 1:X2=0) is %svalidated\n" ,cond ?"" :"NOT " ); +fprintf (out,"Hash=8b05db686103708c048891dddc96e8bd\n" ); +fprintf (out,"Com=Rf Fr\n" ); +fprintf (out,"Orig=PodWWPL RfeLA PodRRAP Fre\n" ); +count_t cond_true = p_true; +count_t cond_false = p_false; +fprintf (out,"Observation ARMARM00 %s %" PCTR " %" PCTR "\n" ,!cond_true ?"Never" : !cond_false ?"Always" :"Sometimes" ,cond_true,cond_false); +if (p_true >0 ) { + } +fprintf (out,"Time ARMARM00 %.2f\n" ,total /1000000.0 ); +fflush (out); +return cond; +} + +static int run (cmd_t *cmd,cpus_t *def_all_cpus,FILE *out) { +tsc_t start =timeofday (); +param_t prm ; +/* Set some parameters */ + prm.verbose = cmd->verbose; + prm.size_of_test = cmd->size_of_test; + prm.max_run = cmd->max_run; + prm.stride = cmd->stride; + prm.do_change =1 ; +if (cmd->fix) prm.do_change =0 ; +/* Computes number of test concurrent instances */ +int n_avail = cmd->avail >0 ? cmd->avail : cmd->aff_cpus->sz; +if (n_avail > cmd->aff_cpus->sz)log_error ("Warning: avail=%i, available=%i\n" ,n_avail, cmd->aff_cpus->sz); +int n_exe; +if (cmd->n_exe >0 ) { + n_exe = cmd->n_exe; + }else { + n_exe = n_avail <N ?1 : n_avail /N ; + } +/* Set affinity parameters */ +cpus_t *all_cpus = cmd->aff_cpus; +int aff_cpus_sz = cmd->aff_mode == aff_random ?max (all_cpus->sz,N *n_exe) :N *n_exe; +int aff_cpus[aff_cpus_sz]; + prm.aff_mode = cmd->aff_mode; + prm.ncpus = aff_cpus_sz; + prm.ncpus_used =N *n_exe; +/* Show parameters to user */ +if (prm.verbose) { +log_error ("ARMARM00: n=%i, r=%i, s=%i" ,n_exe,prm.max_run,prm.size_of_test); +log_error (", st=%i" ,prm.stride); +if (cmd->aff_mode == aff_incr) { +log_error (", i=%i" ,cmd->aff_incr); + }else if (cmd->aff_mode == aff_random) { +log_error (", +ra" ); + }else if (cmd->aff_mode == aff_custom) { +log_error (", +ca" ); + }else if (cmd->aff_mode == aff_scan) { +log_error (", +sa" ); + } +log_error (", p='" ); +cpus_dump (stderr,cmd->aff_cpus); +log_error ("'" ); +log_error ("\n" ); + } +if (cmd->aff_mode == aff_random) { +for (int k =0 ; k < aff_cpus_sz ; k++) { + aff_cpus[k] = all_cpus->cpu[k % all_cpus->sz]; + } + } +hist_t *hist =NULL ; +int n_th = n_exe-1 ; +pthread_t th[n_th]; +zyva_t zarg[n_exe]; +pm_t *p_mutex =pm_create (); +pb_t *p_barrier =pb_create (n_exe); +int next_cpu =0 ; +int delta = cmd->aff_incr; +if (delta <=0 ) { +for (int k=0 ; k < all_cpus->sz ; k++) all_cpus->cpu[k] =-1 ; + delta =1 ; + }else { + delta %= all_cpus->sz; + } +int start_scan=0 , max_start=gcd (delta,all_cpus->sz); +int *aff_p = aff_cpus; +for (int k=0 ; k < n_exe ; k++) { +zyva_t *p = &zarg[k]; + p->_p = &prm; + p->p_mutex = p_mutex; p->p_barrier = p_barrier; + p->z_id = k; + p->cpus = aff_p; +if (cmd->aff_mode != aff_incr) { + aff_p +=N ; + }else { +for (int i=0 ; i <N ; i++) { + *aff_p = all_cpus->cpu[next_cpu]; aff_p++; + next_cpu += delta; next_cpu %= all_cpus->sz; +if (next_cpu == start_scan) { + start_scan++ ; start_scan %= max_start; + next_cpu = start_scan; + } + } + } +if (k < n_th) { +launch (&th[k],zyva,p); + }else { + hist = (hist_t *)zyva (p); + } + } + +count_t n_outs = prm.size_of_test; n_outs *= prm.max_run; +for (int k=0 ; k < n_th ; k++) { +hist_t *hk = (hist_t *)join (&th[k]); +if (sum_hist (hk) != n_outs || hk->n_pos + hk->n_neg != n_outs) { +fatal ("ARMARM00, sum_hist" ); + } +merge_hists (hist,hk); +free_hist (hk); + } +cpus_free (all_cpus); +tsc_t total =timeofday () - start; +pm_free (p_mutex); +pb_free (p_barrier); + + n_outs *= n_exe ; +if (sum_hist (hist) != n_outs || hist->n_pos + hist->n_neg != n_outs) { +fatal ("ARMARM00, sum_hist" ) ; + } +count_t p_true = hist->n_pos, p_false = hist->n_neg; +int cond =postlude (out,cmd,hist,p_true,p_false,total); +free_hist (hist); +return cond; +} + + +int main (int argc,char **argv) { +cpus_t *def_all_cpus =read_force_affinity (AVAIL ,0 ); +if (def_all_cpus->sz <N ) { +cpus_free (def_all_cpus); +return EXIT_SUCCESS ; + } +cmd_t def = {0 ,NUMBER_OF_RUN ,SIZE_OF_TEST ,STRIDE ,AVAIL ,0 ,0 , aff_incr,0 ,0 ,AFF_INCR , def_all_cpus,NULL ,-1 ,MAX_LOOP ,NULL ,NULL ,-1 ,-1 ,-1 ,0 ,0 }; +cmd_t cmd = def; +parse_cmd (argc,argv,&def,&cmd); +int cond =run (&cmd,def_all_cpus,stdout); +if (def_all_cpus != cmd.aff_cpus)cpus_free (def_all_cpus); +return cond ?EXIT_SUCCESS :EXIT_FAILURE ; +}
tests/tcg/aarch64/litmus/ARMARM01.c new file +504 -0
504 lines not on this page · raw message
tests/tcg/aarch64/litmus/ARMARM02.c new file +571 -0
571 lines not on this page · raw message
tests/tcg/aarch64/litmus/ARMARM03.c new file +498 -0
498 lines not on this page · raw message
tests/tcg/aarch64/litmus/ARMARM04+BIS.c new file +556 -0
556 lines not on this page · raw message
tests/tcg/aarch64/litmus/ARMARM04+TER.c new file +538 -0
370 lines not on this page · raw message
tests/tcg/aarch64/litmus/ARMARM04.c new file +556 -0
556 lines not on this page · raw message
tests/tcg/aarch64/litmus/ARMARM05.c new file +553 -0
553 lines not on this page · raw message
tests/tcg/aarch64/litmus/ARMARM06+AP+AA.c new file +581 -0
581 lines not on this page · raw message
tests/tcg/aarch64/litmus/ARMARM06+AP+AP.c new file +581 -0
581 lines not on this page · raw message
tests/tcg/aarch64/litmus/ARMARM06.c new file +581 -0
581 lines not on this page · raw message
tests/tcg/aarch64/litmus/ARMARM07+SAL.c new file +497 -0
497 lines not on this page · raw message
tests/tcg/aarch64/litmus/Makefile new file +53 -0
53 lines not on this page · raw message
tests/tcg/aarch64/litmus/README.txt new file +22 -0
Lines of this file are not shown. View the raw message.
tests/tcg/aarch64/litmus/affinity.c new file +159 -0
159 lines not on this page · raw message
tests/tcg/aarch64/litmus/affinity.h new file +34 -0
Lines of this file are not shown. View the raw message.
tests/tcg/aarch64/litmus/comp.sh new file +30 -0
Lines of this file are not shown. View the raw message.
tests/tcg/aarch64/litmus/litmus_rand.c new file +64 -0
64 lines not on this page · raw message
tests/tcg/aarch64/litmus/litmus_rand.h new file +29 -0
Lines of this file are not shown. View the raw message.
tests/tcg/aarch64/litmus/outs.c new file +148 -0
148 lines not on this page · raw message
tests/tcg/aarch64/litmus/outs.h new file +49 -0
49 lines not on this page · raw message
tests/tcg/aarch64/litmus/run.sh new file +378 -0
378 lines not on this page · raw message
tests/tcg/aarch64/litmus/show.awk new file +2 -0
Lines of this file are not shown. View the raw message.
tests/tcg/aarch64/litmus/utils.c new file +1148 -0
1,148 lines not on this page · raw message
tests/tcg/aarch64/litmus/utils.h new file +275 -0
275 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.10.2
Part of the diff is not shown here. View the raw message.
Quoted 6 lines · Pranith Kumar
Hello,
The following patch series adds litmus tests to test consistency for MTTCG enabled qemu. These patches apply on top of the clean up tests/tcg folder made by my previous patch series.
Quoted 6 lines
The tests were generated using the litmus tool. The sources and instructions on how to generate these sources can be found in this
repository: https://github.com/pranith/qemu-litmusI tested these on both an x86 and an Aarch64 machine. These tests are currently enabled for the trusty configuration on travis.
But how do I build them? The Makefile seems to be directly what the litmus tool output. We either need the makefile in ../ to call the litmus Makefile appropriately or massage the litmus Makefile to work with out build system.
Quoted 84 lines
Thanks,
--
Pranith*** BLURB HERE ***
Pranith Kumar (3):
tests/tcg: Add i386 litmus test
tests/tcg: Add aarch64 litmus tests
travis: Enable litmus tests.travis.yml | 8 + tests/tcg/aarch64/litmus/ARMARM00.c | 501 +++++++++++++ tests/tcg/aarch64/litmus/ARMARM01.c | 504 +++++++++++++ tests/tcg/aarch64/litmus/ARMARM02.c | 571 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM03.c | 498 +++++++++++++ tests/tcg/aarch64/litmus/ARMARM04+BIS.c | 556 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM04+TER.c | 538 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM04.c | 556 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM05.c | 553 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM06+AP+AA.c | 581 +++++++++++++++ tests/tcg/aarch64/litmus/ARMARM06+AP+AP.c | 581 +++++++++++++++ tests/tcg/aarch64/litmus/ARMARM06.c | 581 +++++++++++++++ tests/tcg/aarch64/litmus/ARMARM07+SAL.c | 497 +++++++++++++ tests/tcg/aarch64/litmus/Makefile | 53 ++ tests/tcg/aarch64/litmus/README.txt | 22 + tests/tcg/aarch64/litmus/affinity.c | 159 ++++ tests/tcg/aarch64/litmus/affinity.h | 34 + tests/tcg/aarch64/litmus/comp.sh | 30 + tests/tcg/aarch64/litmus/litmus_rand.c | 64 ++ tests/tcg/aarch64/litmus/litmus_rand.h | 29 + tests/tcg/aarch64/litmus/outs.c | 148 ++++ tests/tcg/aarch64/litmus/outs.h | 49 ++ tests/tcg/aarch64/litmus/run.sh | 378 ++++++++++ tests/tcg/aarch64/litmus/show.awk | 2 + tests/tcg/aarch64/litmus/utils.c | 1148 +++++++++++++++++++++++++++++ tests/tcg/aarch64/litmus/utils.h | 275 +++++++ tests/tcg/i386/litmus/Makefile | 42 ++ tests/tcg/i386/litmus/README.txt | 22 + tests/tcg/i386/litmus/SAL.c | 491 ++++++++++++ tests/tcg/i386/litmus/affinity.c | 159 ++++ tests/tcg/i386/litmus/affinity.h | 34 + tests/tcg/i386/litmus/comp.sh | 10 + tests/tcg/i386/litmus/litmus_rand.c | 64 ++ tests/tcg/i386/litmus/litmus_rand.h | 29 + tests/tcg/i386/litmus/outs.c | 148 ++++ tests/tcg/i386/litmus/outs.h | 49 ++ tests/tcg/i386/litmus/run.sh | 55 ++ tests/tcg/i386/litmus/show.awk | 2 + tests/tcg/i386/litmus/utils.c | 1148 +++++++++++++++++++++++++++++ tests/tcg/i386/litmus/utils.h | 275 +++++++ 40 files changed, 11444 insertions(+) create mode 100644 tests/tcg/aarch64/litmus/ARMARM00.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM01.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM02.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM03.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM04+BIS.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM04+TER.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM04.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM05.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM06+AP+AA.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM06+AP+AP.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM06.c create mode 100644 tests/tcg/aarch64/litmus/ARMARM07+SAL.c create mode 100644 tests/tcg/aarch64/litmus/Makefile create mode 100644 tests/tcg/aarch64/litmus/README.txt create mode 100644 tests/tcg/aarch64/litmus/affinity.c create mode 100644 tests/tcg/aarch64/litmus/affinity.h create mode 100644 tests/tcg/aarch64/litmus/comp.sh create mode 100644 tests/tcg/aarch64/litmus/litmus_rand.c create mode 100644 tests/tcg/aarch64/litmus/litmus_rand.h create mode 100644 tests/tcg/aarch64/litmus/outs.c create mode 100644 tests/tcg/aarch64/litmus/outs.h create mode 100755 tests/tcg/aarch64/litmus/run.sh create mode 100644 tests/tcg/aarch64/litmus/show.awk create mode 100644 tests/tcg/aarch64/litmus/utils.c create mode 100644 tests/tcg/aarch64/litmus/utils.h create mode 100644 tests/tcg/i386/litmus/Makefile create mode 100644 tests/tcg/i386/litmus/README.txt create mode 100644 tests/tcg/i386/litmus/SAL.c create mode 100644 tests/tcg/i386/litmus/affinity.c create mode 100644 tests/tcg/i386/litmus/affinity.h create mode 100644 tests/tcg/i386/litmus/comp.sh
Quoted 8 lines
create mode 100644 tests/tcg/i386/litmus/litmus_rand.c create mode 100644 tests/tcg/i386/litmus/litmus_rand.h create mode 100644 tests/tcg/i386/litmus/outs.c create mode 100644 tests/tcg/i386/litmus/outs.h create mode 100755 tests/tcg/i386/litmus/run.sh create mode 100644 tests/tcg/i386/litmus/show.awk create mode 100644 tests/tcg/i386/litmus/utils.c create mode 100644 tests/tcg/i386/litmus/utils.h
--
Alex Bennée
Your series seems to have some coding style problems. See output below for more information:
Hi,
Your series seems to have some coding style problems. See output below for more information:
Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v5 0/3] Add litmus tests for MTTCG consistency tests
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0
# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True
commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do
echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
failed=1
echo
fi
n=$((n+1))done
exit $failed
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
fatal: unable to access 'https://github.com/patchew-project/qemu/': The requested URL returned error: 504
error: Could not fetch 3c8cf5a9c21ff8782164d1def7f44bd888713384
Traceback (most recent call last):
File "/usr/bin/patchew", line 406, in test_one
git_clone_repo(clone, r["repo"], r["head"], logf)
File "/usr/bin/patchew", line 47, in git_clone_repo
stdout=logf, stderr=logf)
File "/usr/lib64/python3.4/subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'remote', 'add', '-f', '--mirror=fetch', '3c8cf5a9c21ff8782164d1def7f44bd888713384', 'https://github.com/patchew-project/qemu']' returned non-zero exit status 1
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Your series seems to have some coding style problems. See output below for more information:
Hi,
Your series seems to have some coding style problems. See output below for more information:
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v5 0/3] Add litmus tests for MTTCG consistency tests
Type: series
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0
# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True
commits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do
echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
failed=1
echo
fi
n=$((n+1))done
exit $failed
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
fatal: unable to access 'https://github.com/patchew-project/qemu/': Failed connect to github.com:443; Operation now in progress
error: Could not fetch 3c8cf5a9c21ff8782164d1def7f44bd888713384
Traceback (most recent call last):
File "/usr/bin/patchew", line 406, in test_one
git_clone_repo(clone, r["repo"], r["head"], logf)
File "/usr/bin/patchew", line 47, in git_clone_repo
stdout=logf, stderr=logf)
File "/usr/lib64/python3.4/subprocess.py", line 561, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'remote', 'add', '-f', '--mirror=fetch', '3c8cf5a9c21ff8782164d1def7f44bd888713384', 'https://github.com/patchew-project/qemu']' returned non-zero exit status 1
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Quoted 4 lines · On Wed, 01/18 00:00, [email protected] wrote:
Hi,
Your series seems to have some coding style problems. See output below for more information:
Sorry for the noise, looks like it's a network issue during preparation, unrelated to this series. I'll look into suppressing such errors in the future.
Fam
Quoted 47 lines
Message-id: [email protected]
Subject: [Qemu-devel] [PATCH v5 0/3] Add litmus tests for MTTCG consistency tests
Type: series=== TEST SCRIPT BEGIN ===
#!/bin/bashBASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames Truecommits="$(git log --format=%H --reverse $BASE..)" for c in $commits; do
echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..." if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then failed=1 echo fi n=$((n+1))done
exit $failed
=== TEST SCRIPT END ===Updating
3c8cf5a9c21ff8782164d1def7f44bd888713384
fatal: unable to access 'https://github.com/patchew-project/qemu/': Failed connect to github.com:443; Operation now in progress
error: Could not fetch3c8cf5a9c21ff8782164d1def7f44bd888713384
Traceback (most recent call last):
File "/usr/bin/patchew", line 406, intest_onegit_clone_repo(clone, r["repo"], r["head"], logf)File "
/usr/bin/patchew", line 47, ingit_clone_repo
stdout=logf, stderr=logf)
File "/usr/lib64/python3.4/subprocess.py", line 561, incheck_call
raiseCalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['git', 'remote', 'add', '-f', '--mirror=fetch', '3c8cf5a9c21ff8782164d1def7f44bd888713384', 'https://github.com/patchew-project/qemu']' returned non-zero exit status 1---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Hi Pranith,
Quoted 43 lines · Pranith Kumar
Hello,
The following patch series adds litmus tests to test consistency for MTTCG enabled qemu. These patches apply on top of the clean up tests/tcg folder made by my previous patch series.
The tests were generated using the litmus tool. The sources and instructions on how to generate these sources can be found in this
repository: https://github.com/pranith/qemu-litmusI tested these on both an x86 and an Aarch64 machine. These tests are currently enabled for the trusty configuration on travis.
Thanks,
--
Pranith*** BLURB HERE ***
Pranith Kumar (3):
tests/tcg: Add i386 litmus test
tests/tcg: Add aarch64 litmus tests
travis: Enable litmus tests.travis.yml | 8 + tests/tcg/aarch64/litmus/ARMARM00.c | 501 +++++++++++++ tests/tcg/aarch64/litmus/ARMARM01.c | 504 +++++++++++++ tests/tcg/aarch64/litmus/ARMARM02.c | 571 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM03.c | 498 +++++++++++++ tests/tcg/aarch64/litmus/ARMARM04+BIS.c | 556 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM04+TER.c | 538 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM04.c | 556 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM05.c | 553 ++++++++++++++ tests/tcg/aarch64/litmus/ARMARM06+AP+AA.c | 581 +++++++++++++++ tests/tcg/aarch64/litmus/ARMARM06+AP+AP.c | 581 +++++++++++++++ tests/tcg/aarch64/litmus/ARMARM06.c | 581 +++++++++++++++ tests/tcg/aarch64/litmus/ARMARM07+SAL.c | 497 +++++++++++++ tests/tcg/aarch64/litmus/Makefile | 53 ++ tests/tcg/aarch64/litmus/README.txt | 22 + tests/tcg/aarch64/litmus/affinity.c | 159 ++++ tests/tcg/aarch64/litmus/affinity.h | 34 + tests/tcg/aarch64/litmus/comp.sh | 30 + tests/tcg/aarch64/litmus/litmus_rand.c | 64 ++
Quoted 8 lines
tests/tcg/aarch64/litmus/litmus_rand.h | 29 + tests/tcg/aarch64/litmus/outs.c | 148 ++++ tests/tcg/aarch64/litmus/outs.h | 49 ++ tests/tcg/aarch64/litmus/run.sh | 378 ++++++++++ tests/tcg/aarch64/litmus/show.awk | 2 + tests/tcg/aarch64/litmus/utils.c | 1148 +++++++++++++++++++++++++++++ tests/tcg/aarch64/litmus/utils.h | 275 +++++++ tests/tcg/i386/litmus/Makefile | 42 ++
can you add an entry for both folders into MAINTAINERS please?
Quoted 54 lines
tests/tcg/i386/litmus/README.txt | 22 + tests/tcg/i386/litmus/SAL.c | 491 ++++++++++++ tests/tcg/i386/litmus/affinity.c | 159 ++++ tests/tcg/i386/litmus/affinity.h | 34 + tests/tcg/i386/litmus/comp.sh | 10 + tests/tcg/i386/litmus/litmus_rand.c | 64 ++ tests/tcg/i386/litmus/litmus_rand.h | 29 + tests/tcg/i386/litmus/outs.c | 148 ++++ tests/tcg/i386/litmus/outs.h | 49 ++ tests/tcg/i386/litmus/run.sh | 55 ++ tests/tcg/i386/litmus/show.awk | 2 + tests/tcg/i386/litmus/utils.c | 1148 +++++++++++++++++++++++++++++ tests/tcg/i386/litmus/utils.h | 275 +++++++ 40 files changed, 11444 insertions(+)create mode 100644
tests/tcg/aarch64/litmus/ARMARM00.ccreate mode 100644tests/tcg/aarch64/litmus/ARMARM01.ccreate mode 100644tests/tcg/aarch64/litmus/ARMARM02.ccreate mode 100644tests/tcg/aarch64/litmus/ARMARM03.ccreate mode 100644tests/tcg/aarch64/litmus/ARMARM04+BIS.ccreate mode 100644tests/tcg/aarch64/litmus/ARMARM04+TER.ccreate mode 100644tests/tcg/aarch64/litmus/ARMARM04.ccreate mode 100644tests/tcg/aarch64/litmus/ARMARM05.ccreate mode 100644tests/tcg/aarch64/litmus/ARMARM06+AP+AA.ccreate mode 100644tests/tcg/aarch64/litmus/ARMARM06+AP+AP.ccreate mode 100644tests/tcg/aarch64/litmus/ARMARM06.ccreate mode 100644tests/tcg/aarch64/litmus/ARMARM07+SAL.ccreate mode 100644 tests/tcg/aarch64/litmus/Makefile create mode 100644tests/tcg/aarch64/litmus/README.txtcreate mode 100644tests/tcg/aarch64/litmus/affinity.ccreate mode 100644tests/tcg/aarch64/litmus/affinity.hcreate mode 100644tests/tcg/aarch64/litmus/comp.shcreate mode 100644tests/tcg/aarch64/litmus/litmus_rand.ccreate mode 100644tests/tcg/aarch64/litmus/litmus_rand.hcreate mode 100644tests/tcg/aarch64/litmus/outs.ccreate mode 100644tests/tcg/aarch64/litmus/outs.hcreate mode 100755tests/tcg/aarch64/litmus/run.shcreate mode 100644tests/tcg/aarch64/litmus/show.awkcreate mode 100644tests/tcg/aarch64/litmus/utils.ccreate mode 100644tests/tcg/aarch64/litmus/utils.hcreate mode 100644 tests/tcg/i386/litmus/Makefile create mode 100644tests/tcg/i386/litmus/README.txtcreate mode 100644tests/tcg/i386/litmus/SAL.ccreate mode 100644tests/tcg/i386/litmus/affinity.ccreate mode 100644tests/tcg/i386/litmus/affinity.hcreate mode 100644tests/tcg/i386/litmus/comp.shcreate mode 100644tests/tcg/i386/litmus/litmus_rand.ccreate mode 100644tests/tcg/i386/litmus/litmus_rand.hcreate mode 100644tests/tcg/i386/litmus/outs.ccreate mode 100644tests/tcg/i386/litmus/outs.hcreate mode 100755tests/tcg/i386/litmus/run.shcreate mode 100644tests/tcg/i386/litmus/show.awkcreate mode 100644tests/tcg/i386/litmus/utils.ccreate mode 100644tests/tcg/i386/litmus/utils.h