diff --git a/scripts/runFileTest.sh b/scripts/runFileTest.sh index d6a4b149bb97a6b3033095f071120daf94d46532..e69338450a882a795daf2c262c77280c69543cf2 100755 --- a/scripts/runFileTest.sh +++ b/scripts/runFileTest.sh @@ -8,6 +8,10 @@ function scdaq_test { echo "Starting scdaq test with CALO P5 capture file: check for crash" timeout 10s src/scdaq --config test/config/scdaq-calo.conf | uniq -uc CALORET="${PIPESTATUS[0]}" + echo "#############################################################################" + echo "Starting scdaq test with 2 passthrough P5 capture files: check for crash" + timeout 10s src/scdaq --config test/config/scdaq-passthrough.conf --nstreams 2 | uniq + MULTI_PIPELINE_RET="${PIPESTATUS[0]}" if [[ "$GMTRET" -ne 124 ]]; then # We expect to fail with a timeout because scdaq isn't supposed to return. echo "SCDAQ test for GMT failed with exit code ${GMTRET}!" GMT_FAILED=true @@ -22,6 +26,13 @@ function scdaq_test { echo "SCDAQ test for CALO failed, no output files found!" CALO_FAILED=true fi + if [[ "$MULTI_PIPELINE_RET" -ne 124 ]]; then + echo "SCDAQ test for MULTIPLE PIPELINES failed with exit code ${MULTI_PIPELINE_RET}!" + MULTI_PIPELINE_FAILED=true + elif [[ $(find test/data -name "*scout_PASS1_CALO*" | wc -l) -eq 0 || $(find test/data -name "*scout_PASS2_GMT*" | wc -l) -eq 0 ]]; then + echo "SCDAQ test for MULTIPLE PIPELINES failed, no output files found!" + MULTI_PIPELINE_FAILED=true + fi } echo "building scdaq locally" @@ -34,26 +45,29 @@ tar -xzvf gmt_testfile.tar.gz cd ../../ OUTPUT_EXPECTED=false scdaq_test -echo "Starting second set of test files" echo $GMT_FAILED echo $CALO_FAILED +echo $MULTI_PIPELINE_FAILED +echo "Starting second set of test files" OUTPUT_EXPECTED=true cd test/data rm calo_testfile.dat rm gmt_testfile.dat tar -xzvf calo_testfile_mod.tar.gz tar -xzvf gmt_testfile_mod.tar.gz -rm ../test/data/run000000/in_progress/* +rm -rf run000000/in_progress/* cd ../../ -#next line needed because older GMT files were taken with 5 orbits per packet +#next line needed because older GMT files were taken with 5 orbits per packet sed -i 's/nOrbitsPerPacket:1/nOrbitsPerPacket:5/' test/config/scdaq-gmt.conf scdaq_test echo $GMT_FAILED echo $CALO_FAILED +echo $MULTI_PIPELINE_FAILED + -if [[ $GMT_FAILED = true || $CALO_FAILED = true ]]; then +if [[ $GMT_FAILED = true || $CALO_FAILED = true || $MULTI_PIPELINE_FAILED = true ]]; then exit 1 fi diff --git a/scripts/scdaqrpm.sh b/scripts/scdaqrpm.sh index 65cc978347d39f7d726edb2ea12dde0930a1d9a1..1021a9376e35abee1f377d99c7e6a5cd29251d12 100755 --- a/scripts/scdaqrpm.sh +++ b/scripts/scdaqrpm.sh @@ -133,7 +133,7 @@ cp -R $BASEDIR/src SOURCES/ echo $RPM_SOURCE_DIR cd SOURCES pwd -make +make all %install echo $RPM_SOURCE_DIR diff --git a/test/config/scdaq-passthrough.conf b/test/config/scdaq-passthrough.conf new file mode 100644 index 0000000000000000000000000000000000000000..865f229003ce3da87113078136b798b8be87df76 --- /dev/null +++ b/test/config/scdaq-passthrough.conf @@ -0,0 +1,127 @@ +################################################################################ +## +## Input settings +## +################################################################################ + +# Input settings, allowed values are: +# "wzdma" for DMA driver from Wojciech M. Zabolotny +# "dma" for XILINX DMA driver +# "filedma" for reading from file and simulating DMA +# "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving + +input:filedma + +## Settings for DMA input + +# DMA device +dma_dev:/dev/xdma0_c2h_0 + +# Max received packet size in bytes (buffer to reserve) +dma_packet_buffer_size:1261568 + +# Number of packet buffers to allocate +dma_number_of_packet_buffers:1000 + +# Print report each N packets, use 0 to disable +packets_per_report:2000 + +# number of orbits per packet, in decimal +nOrbitsPerPacket:4 + +## Extra settings for "filedma" input +input_file:./test/data/calo_testfile.dat + +## Extra settings for "tcpip" input +tcpDestPort:10000 + + +################################################################################ +## +## Stream processor settings +## +################################################################################ + +enable_stream_processor:yes + +# Define processing type (unpacking), allowed values are: +# "PASS_THROUGH" +# "GMT" +# "CALO" +# Note: When changing the processing type, change also "output_filename_prefix" +# in the file output section. +# +processor_type:PASS_THROUGH + +# Enable software zero-supression +doZS:yes + +################################################################################ +## +## File output settings +## +################################################################################ + +output_filename_prefix:scout_PASS0_GMT + +output_filename_base:test/data + +max_file_size:8589934592 + +# Always write data to a file regardless of the run status, useful for debugging +output_force_write:yes + + +################################################################################ +## +## Elastics processor settings (obsolete) +## +################################################################################ + +enable_elastic_processor:no + +port:8000 +elastic_url:http://something.somewhere +pt_cut:7 +quality_cut:12 + + +################################################################################ +## +## SCDAQ Generic Settings +## +################################################################################ + +# enable development functionalities (e.g. TCP input filter) +dev_TCPAutoReconnectOnFailure:false + +## Logging, supported LOG severities: +# TRACE +# DEBUG +# INFO +# WARNING +# ERROR +# FATAL +# +# Log only severities at the same level or more severe than the log_min_severity +# Use TRACE to log everything +# +log_min_severity:ERROR + +# Pipeline settings +threads:8 + +# N orbits to store to each file +# Configured to store fixed number of orbits per file when nOrbitsPerFile > 1 +# Set to 0 to use fixed file size instead +nOrbitsPerFile:0 + +# Headers for cmssw support +cmsswHeaders:no + +## Information necessary to issue a reset request for the board +scone_host:localhost +scone_port:8080 +# Currently can be one of kcu1500_ugmt and kcu1500_demux +scone_board:kcu1500_ugmt diff --git a/test/config/scdaq-passthrough1.conf b/test/config/scdaq-passthrough1.conf new file mode 100644 index 0000000000000000000000000000000000000000..9139d7d0abc89dd8e2ae450fda936d764ab4b5fd --- /dev/null +++ b/test/config/scdaq-passthrough1.conf @@ -0,0 +1,127 @@ +################################################################################ +## +## Input settings +## +################################################################################ + +# Input settings, allowed values are: +# "wzdma" for DMA driver from Wojciech M. Zabolotny +# "filedma" for reading from file and simulating DMA +# "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving + +input:filedma + +## Settings for DMA input + +# DMA device +dma_dev:/dev/xdma0_c2h_0 + +# Max received packet size in bytes (buffer to reserve) +dma_packet_buffer_size:1261568 + +# Number of packet buffers to allocate +dma_number_of_packet_buffers:1000 + +# Print report each N packets, use 0 to disable +packets_per_report:2000 + +# number of orbits per packet, in decimal +nOrbitsPerPacket:4 + +## Extra settings for "filedma" input +input_file:./test/data/calo_testfile.dat + +## Extra settings for "tcpip" input +tcpDestPort:10000 + + +################################################################################ +## +## Stream processor settings +## +################################################################################ + +enable_stream_processor:yes + +# Define processing type (unpacking), allowed values are: +# "PASS_THROUGH" +# "GMT" +# "CALO" +# "BRIL" +# Note: When changing the processing type, change also "output_filename_prefix" +# in the file output section. +# +processor_type:PASS_THROUGH + +# Enable software zero-supression +doZS:yes + +################################################################################ +## +## File output settings +## +################################################################################ + +output_filename_prefix:scout_PASS1_CALO + +output_filename_base:test/data + +max_file_size:8589934592 + +# Always write data to a file regardless of the run status, useful for debugging +output_force_write:yes + + +################################################################################ +## +## Elastics processor settings (obsolete) +## +################################################################################ + +enable_elastic_processor:no + +port:8000 +elastic_url:http://something.somewhere +pt_cut:7 +quality_cut:12 + + +################################################################################ +## +## SCDAQ Generic Settings +## +################################################################################ + +# enable development functionalities (e.g. TCP input filter) +dev_TCPAutoReconnectOnFailure:false + +## Logging, supported LOG severities: +# TRACE +# DEBUG +# INFO +# WARNING +# ERROR +# FATAL +# +# Log only severities at the same level or more severe than the log_min_severity +# Use TRACE to log everything +# +log_min_severity:ERROR + +# Pipeline settings +threads:8 + +# N orbits to store to each file +# Configured to store fixed number of orbits per file when nOrbitsPerFile > 1 +# Set to 0 to use fixed file size instead +nOrbitsPerFile:0 + +# Headers for cmssw support +cmsswHeaders:no + +## Information necessary to issue a reset request for the board +scone_host:localhost +scone_port:8080 +# Currently can be one of kcu1500_ugmt and kcu1500_demux +scone_board:kcu1500_ugmt diff --git a/test/config/scdaq-passthrough2.conf b/test/config/scdaq-passthrough2.conf new file mode 100644 index 0000000000000000000000000000000000000000..6e4e0e665b60943ce6d93e6363ea1f4239a09ae5 --- /dev/null +++ b/test/config/scdaq-passthrough2.conf @@ -0,0 +1,131 @@ +################################################################################ +## +## Input settings +## +################################################################################ + +# Input settings, allowed values are: +# "wzdma" for DMA driver from Wojciech M. Zabolotny +# "dma" for XILINX DMA driver +# "filedma" for reading from file and simulating DMA +# "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving + +input:filedma + +## Settings for DMA input + +# DMA device +dma_dev:/dev/xdma0_c2h_0 + +# Max received packet size in bytes (buffer to reserve) +dma_packet_buffer_size:1261568 + +# Number of packet buffers to allocate +dma_number_of_packet_buffers:1000 + +# Print report each N packets, use 0 to disable +packets_per_report:2000 + +# number of orbits per packet, in decimal +nOrbitsPerPacket:4 + +# Extra settings for "filedma" input +input_file:./test/data/gmt_testfile.dat + +## Extra settings for "tcpip" input +tcpDestPort:10001 + + +################################################################################ +## +## Stream processor settings +## +################################################################################ + +enable_stream_processor:yes + +# Define processing type (unpacking), allowed values are: +# "PASS_THROUGH" +# "GMT" +# "CALO" +# "BRIL" +# Note: When changing the processing type, change also "output_filename_prefix" +# in the file output section. + +processor_type:PASS_THROUGH + +# Enable software zero-supression +doZS:yes + +################################################################################ +## +## File output settings +## +################################################################################ + +output_filename_prefix:scout_PASS2_GMT + +output_filename_base:test/data + +max_file_size:8589934592 + +# Always write data to a file regardless of the run status, useful for debugging +output_force_write:yes + + +################################################################################ +## +## Elastics processor settings (obsolete) +## +################################################################################ + +enable_elastic_processor:no + +port:8000 +elastic_url:http://something.somewhere +pt_cut:7 +quality_cut:12 + + +################################################################################ +## +## SCDAQ Generic Settings +## +################################################################################ + +# enable development functionalities (e.g. TCP input filter) +dev_TCPAutoReconnectOnFailure:false + +## Logging, supported LOG severities: +# TRACE +# DEBUG +# INFO +# WARNING +# ERROR +# FATAL +# +# Log only severities at the same level or more severe than the log_min_severity +# Use TRACE to log everything +# +log_min_severity:ERROR + +# Pipeline settings +threads:8 + +# verbosity level, currently supports 0 and 1 +verbosity:0 + +# N orbits to store to each file +# Configured to store fixed number of orbits per file when nOrbitsPerFile > 1 +# Set to 0 to use fixed file size instead +nOrbitsPerFile:0 + +# Headers for cmssw support +cmsswHeaders:no + +## Information necessary to issue a reset request for the board +scone_host:localhost +scone_port:8080 +# Currently can be one of kcu1500_ugmt and kcu1500_demux +scone_board:kcu1500_ugmt diff --git a/test/config/tcp-test.conf b/test/config/tcp-test.conf new file mode 100644 index 0000000000000000000000000000000000000000..23d30532b1be5dd55c41dba91a12d6a067894be6 --- /dev/null +++ b/test/config/tcp-test.conf @@ -0,0 +1,112 @@ +################################################################################ +## +## Input settings +## +################################################################################ + +# Input settings, allowed values are: +# "wzdma" for DMA driver from Wojciech M. Zabolotny +# "filedma" for reading from file and simulating DMA +# "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving + +input:filedma + +## Settings for DMA input + +# DMA device +dma_dev:/dev/xdma0_c2h_0 + +# Max received packet size in bytes (buffer to reserve) +dma_packet_buffer_size:1261568 + +# Number of packet buffers to allocate +dma_number_of_packet_buffers:1000 + +# Print report each N packets, use 0 to disable +packets_per_report:2000 + +# number of orbits per packet, in decimal +nOrbitsPerPacket:1 + +## Extra settings for "filedma" input +input_file:./test/data/calo_testfile.dat + +## Extra settings for "tcpip" input +tcpDestPort:9000 + + +################################################################################ +## +## Stream processor settings +## +################################################################################ + +enable_stream_processor:yes + +# Define processing type (unpacking), allowed values are: +# "PASS_THROUGH" +# "GMT" +# "CALO" +# "BRIL" +# Note: When changing the processing type, change also "output_filename_prefix" +# in the file output section. +# +processor_type:PASS_THROUGH + +# Enable software zero-supression +doZS:yes + +################################################################################ +## +## File output settings +## +################################################################################ + +output_filename_prefix:tcp-single-scouting_gmt_1 + +output_filename_base:test/in_progress + +max_file_size:8589934592 + +# Always write data to a file regardless of the run status, useful for debugging +output_force_write:no + +################################################################################ +## +## SCDAQ Generic Settings +## +################################################################################ + +# enable development functionalities (e.g. TCP input filter) +dev_TCPAutoReconnectOnFailure:true + +## Logging, supported LOG severities: +# TRACE +# DEBUG +# INFO +# WARNING +# ERROR +# FATAL +# +# Log only severities at the same level or more severe than the log_min_severity +# Use TRACE to log everything +# +log_min_severity:TRACE + +# Pipeline settings +threads:8 + +# N orbits to store to each file +# Configured to store fixed number of orbits per file when nOrbitsPerFile > 1 +# Set to 0 to use fixed file size instead +nOrbitsPerFile:4096 + +# Headers for cmssw support +cmsswHeaders:no + +## Information necessary to issue a reset request for the board +scone_host:localhost +scone_port:8080 +# Currently can be one of kcu1500_ugmt and kcu1500_demux +scone_board:vcu128_bmtf_tcp diff --git a/test/config/tcp-test1.conf b/test/config/tcp-test1.conf new file mode 100644 index 0000000000000000000000000000000000000000..0d2a67ebb29018e5f385af25bbf8c1d33bd9edcc --- /dev/null +++ b/test/config/tcp-test1.conf @@ -0,0 +1,112 @@ +################################################################################ +## +## Input settings +## +################################################################################ + +# Input settings, allowed values are: +# "wzdma" for DMA driver from Wojciech M. Zabolotny +# "filedma" for reading from file and simulating DMA +# "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving + +input:tcpip + +## Settings for DMA input + +# DMA device +dma_dev:/dev/xdma0_c2h_0 + +# Max received packet size in bytes (buffer to reserve) +dma_packet_buffer_size:1261568 + +# Number of packet buffers to allocate +dma_number_of_packet_buffers:1000 + +# Print report each N packets, use 0 to disable +packets_per_report:2000 + +# number of orbits per packet, in decimal +nOrbitsPerPacket:1 + +## Extra settings for "filedma" input +input_file:./test/data/calo_testfile.dat + +## Extra settings for "tcpip" input +tcpDestPort:10000 + + +################################################################################ +## +## Stream processor settings +## +################################################################################ + +enable_stream_processor:yes + +# Define processing type (unpacking), allowed values are: +# "PASS_THROUGH" +# "GMT" +# "CALO" +# "BRIL" +# Note: When changing the processing type, change also "output_filename_prefix" +# in the file output section. +# +processor_type:PASS_THROUGH + +# Enable software zero-supression +doZS:yes + +################################################################################ +## +## File output settings +## +################################################################################ + +output_filename_prefix:tcp-mp1-scouting_calo_1 + +output_filename_base:test/in_progress + +max_file_size:8589934592 + +# Always write data to a file regardless of the run status, useful for debugging +output_force_write:no + +################################################################################ +## +## SCDAQ Generic Settings +## +################################################################################ + +# enable development functionalities (e.g. TCP input filter) +dev_TCPAutoReconnectOnFailure:true + +## Logging, supported LOG severities: +# TRACE +# DEBUG +# INFO +# WARNING +# ERROR +# FATAL +# +# Log only severities at the same level or more severe than the log_min_severity +# Use TRACE to log everything +# +log_min_severity:TRACE + +# Pipeline settings +threads:8 + +# N orbits to store to each file +# Configured to store fixed number of orbits per file when nOrbitsPerFile > 1 +# Set to 0 to use fixed file size instead +nOrbitsPerFile:4096 + +# Headers for cmssw support +cmsswHeaders:no + +## Information necessary to issue a reset request for the board +scone_host:localhost +scone_port:8080 +# Currently can be one of kcu1500_ugmt and kcu1500_demux +scone_board:vcu128_bmtf_tcp diff --git a/test/config/tcp-test2.conf b/test/config/tcp-test2.conf new file mode 100644 index 0000000000000000000000000000000000000000..5ccc067f9036f5c1bfe46545bc90b7e0263aaab7 --- /dev/null +++ b/test/config/tcp-test2.conf @@ -0,0 +1,112 @@ +################################################################################ +## +## Input settings +## +################################################################################ + +# Input settings, allowed values are: +# "wzdma" for DMA driver from Wojciech M. Zabolotny +# "filedma" for reading from file and simulating DMA +# "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving + +input:tcpip + +## Settings for DMA input + +# DMA device +dma_dev:/dev/xdma0_c2h_0 + +# Max received packet size in bytes (buffer to reserve) +dma_packet_buffer_size:1261568 + +# Number of packet buffers to allocate +dma_number_of_packet_buffers:1000 + +# Print report each N packets, use 0 to disable +packets_per_report:2000 + +# number of orbits per packet, in decimal +nOrbitsPerPacket:1 + +## Extra settings for "filedma" input +input_file:./test/data/gmt_testfile2.dat + +## Extra settings for "tcpip" input +tcpDestPort:10010 + + +################################################################################ +## +## Stream processor settings +## +################################################################################ + +enable_stream_processor:yes + +# Define processing type (unpacking), allowed values are: +# "PASS_THROUGH" +# "GMT" +# "CALO" +# "BRIL" +# Note: When changing the processing type, change also "output_filename_prefix" +# in the file output section. +# +processor_type:PASS_THROUGH + +# Enable software zero-supression +doZS:yes + +################################################################################ +## +## File output settings +## +################################################################################ + +output_filename_prefix:tcp-mp2-scouting_gmt + +output_filename_base:test/in_progress + +max_file_size:8589934592 + +# Always write data to a file regardless of the run status, useful for debugging +output_force_write:no + +################################################################################ +## +## SCDAQ Generic Settings +## +################################################################################ + +# enable development functionalities (e.g. TCP input filter) +dev_TCPAutoReconnectOnFailure:true + +## Logging, supported LOG severities: +# TRACE +# DEBUG +# INFO +# WARNING +# ERROR +# FATAL +# +# Log only severities at the same level or more severe than the log_min_severity +# Use TRACE to log everything +# +log_min_severity:TRACE + +# Pipeline settings +threads:8 + +# N orbits to store to each file +# Configured to store fixed number of orbits per file when nOrbitsPerFile > 1 +# Set to 0 to use fixed file size instead +nOrbitsPerFile:4096 + +# Headers for cmssw support +cmsswHeaders:no + +## Information necessary to issue a reset request for the board +scone_host:localhost +scone_port:8080 +# Currently can be one of kcu1500_ugmt and kcu1500_demux +scone_board:vcu128_bmtf_tcp