Skip to content

Commit

Permalink
tests: move rdpmc tests to own directory
Browse files Browse the repository at this point in the history
  • Loading branch information
deater committed Oct 11, 2013
1 parent 438eced commit ff96937
Show file tree
Hide file tree
Showing 7 changed files with 71 additions and 33 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
11 October 2013
+ Add tests/error_returns/e2big
+ Move non-existent test to tests/error_returns
+ Move rdpmc tests to own directory

18 September 2013
+ Fix breakpoint_support test that was broken by too-clever gcc 4.8
Expand Down
8 changes: 4 additions & 4 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,12 @@ $TESTS_DIR/corner_cases/check_reset_mpx

echo
echo "* Checking for fast RDPMC support"
echo " + $TESTS_DIR/validation/rdpmc_support"
echo " + $TESTS_DIR/rdpmc/rdpmc_support"
echo -n " "
$TESTS_DIR/validation/rdpmc_support
echo " + $TESTS_DIR/validation/rdpmc_validation"
$TESTS_DIR/rdpmc/rdpmc_support
echo " + $TESTS_DIR/rdpmc/rdpmc_validation"
echo -n " "
$TESTS_DIR/validation/rdpmc_validation
$TESTS_DIR/rdpmc/rdpmc_validation

echo
echo "* Checking proposed interface updates (not in any released kernel)"
Expand Down
7 changes: 5 additions & 2 deletions tests/README
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ There are various subdirectories:
common perf usage patterns but are still important
to get right

+ error_returns -- TODO
+ error_returns -- tests various cases to make sure the proper
error returns happen

+ generalized_events -- tests that check the validity of the various
perf_event generalized events, such as "instructions"
Expand All @@ -27,6 +28,8 @@ There are various subdirectories:

+ overflow -- tests involving counter overflow functionality

+ rdpmc -- tests user-space counter access w/o syscall

+ record_sample -- tests that check the functionality of sample
recording

Expand All @@ -46,4 +49,4 @@ There are various subdirectories:
---

Vince
17 September 2013
11 October 2013
59 changes: 59 additions & 0 deletions tests/rdpmc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
CC = gcc
CFLAGS = -Wall -O2 -g -I../../include
LFLAGS =
LIB = ../../lib

all: \
rdpmc_support \
rdpmc_validation

###

$(LIB)/test_utils.o: $(LIB)/test_utils.c
cd $(LIB) && make

$(LIB)/branches_testcode.o: $(LIB)/branches_testcode.c
cd $(LIB) && make

$(LIB)/matrix_multiply.o: $(LIB)/matrix_multiply.c
cd $(LIB) && make

$(LIB)/perf_helpers.o: $(LIB)/perf_helpers.c
cd $(LIB) && make

$(LIB)/detect_cache.o: $(LIB)/detect_cache.c
cd $(LIB) && make

###

rdpmc_support: rdpmc_support.o $(LIB)/test_utils.o \
$(LIB)/perf_helpers.o \
$(LIB)/matrix_multiply.o
$(CC) $(LFLAGS) -o rdpmc_support rdpmc_support.o \
$(LIB)/test_utils.o \
$(LIB)/perf_helpers.o \
$(LIB)/matrix_multiply.o

rdpmc_support.o: rdpmc_support.c
$(CC) $(CFLAGS) -c rdpmc_support.c

###

rdpmc_validation: rdpmc_validation.o $(LIB)/test_utils.o \
$(LIB)/perf_helpers.o \
$(LIB)/instructions_testcode.o
$(CC) $(LFLAGS) -o rdpmc_validation rdpmc_validation.o \
$(LIB)/test_utils.o \
$(LIB)/perf_helpers.o \
$(LIB)/instructions_testcode.o

rdpmc_validation.o: rdpmc_validation.c
$(CC) $(CFLAGS) -c rdpmc_validation.c

###


clean:
rm -f *~ *.o \
rdpmc_support \
rdpmc_validation
File renamed without changes.
File renamed without changes.
29 changes: 2 additions & 27 deletions tests/validation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ all: \
inherit \
inherit_stat \
offcore_response \
offcore_response_mask \
rdpmc_support \
rdpmc_validation
offcore_response_mask


###

Expand Down Expand Up @@ -154,30 +153,6 @@ format_id_support.o: format_id_support.c

###

rdpmc_support: rdpmc_support.o $(LIB)/test_utils.o \
$(LIB)/perf_helpers.o \
$(LIB)/matrix_multiply.o
$(CC) $(LFLAGS) -o rdpmc_support rdpmc_support.o \
$(LIB)/test_utils.o \
$(LIB)/perf_helpers.o \
$(LIB)/matrix_multiply.o

rdpmc_support.o: rdpmc_support.c
$(CC) $(CFLAGS) -c rdpmc_support.c

###

rdpmc_validation: rdpmc_validation.o $(LIB)/test_utils.o \
$(LIB)/perf_helpers.o \
$(LIB)/instructions_testcode.o
$(CC) $(LFLAGS) -o rdpmc_validation rdpmc_validation.o \
$(LIB)/test_utils.o \
$(LIB)/perf_helpers.o \
$(LIB)/instructions_testcode.o

rdpmc_validation.o: rdpmc_validation.c
$(CC) $(CFLAGS) -c rdpmc_validation.c


clean:
rm -f *~ *.o \
Expand Down

0 comments on commit ff96937

Please sign in to comment.