Hello community, here is the log from the commit of package fabtests for openSUSE:Factory checked in at 2018-11-08 09:48:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/fabtests (Old) and /work/SRC/openSUSE:Factory/.fabtests.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "fabtests" Thu Nov 8 09:48:18 2018 rev:9 rq:646010 version:1.6.2 Changes: -------- --- /work/SRC/openSUSE:Factory/fabtests/fabtests.changes 2018-03-18 21:44:43.277980320 +0100 +++ /work/SRC/openSUSE:Factory/.fabtests.new/fabtests.changes 2018-11-08 09:48:27.941101560 +0100 @@ -1,0 +2,6 @@ +Thu Oct 25 10:57:07 UTC 2018 - nmoreychaisemar...@suse.com + +- Update to version 1.6.2 (fate#325852) + * No release notes available + +------------------------------------------------------------------- Old: ---- fabtests-1.6.0.0.d0916cc3f2c0.tar.bz2 New: ---- fabtests-1.6.2.0.e32c9faa95a5.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ fabtests.spec ++++++ --- /var/tmp/diff_new_pack.qrwcRh/_old 2018-11-08 09:48:28.477100928 +0100 +++ /var/tmp/diff_new_pack.qrwcRh/_new 2018-11-08 09:48:28.481100924 +0100 @@ -16,13 +16,13 @@ # -%define git_ver .0.d0916cc3f2c0 +%define git_ver .0.e32c9faa95a5 Name: fabtests -Version: 1.6.0 +Version: 1.6.2 Release: 0 Summary: Test suite for libfabric API -License: BSD-2-Clause or GPL-2.0 +License: BSD-2-Clause OR GPL-2.0-only Group: Development/Tools/Other Url: http://www.github.com/ofiwg/fabtests Source: %{name}-%{version}%{git_ver}.tar.bz2 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.qrwcRh/_old 2018-11-08 09:48:28.505100895 +0100 +++ /var/tmp/diff_new_pack.qrwcRh/_new 2018-11-08 09:48:28.509100891 +0100 @@ -8,7 +8,7 @@ <param name="versionformat">@PARENT_TAG@.@TAG_OFFSET@.%h</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="versionrewrite-replacement">\1</param> - <param name="revision">d0916cc3f2c04748043b96fb6f1c1a46655a522d</param> + <param name="revision">e32c9faa95a558fc0505d82764af1991bfcde9d5</param> </service> <service name="recompress" mode="disabled"> <param name="file">fabtests*.tar</param> ++++++ fabtests-1.6.0.0.d0916cc3f2c0.tar.bz2 -> fabtests-1.6.2.0.e32c9faa95a5.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fabtests-1.6.0.0.d0916cc3f2c0/common/shared.c new/fabtests-1.6.2.0.e32c9faa95a5/common/shared.c --- old/fabtests-1.6.0.0.d0916cc3f2c0/common/shared.c 2018-03-14 14:23:56.000000000 +0100 +++ new/fabtests-1.6.2.0.e32c9faa95a5/common/shared.c 2018-09-24 12:15:48.000000000 +0200 @@ -494,8 +494,7 @@ } if (opts.options & FT_OPT_TX_CNTR) { - ft_cntr_set_wait_attr(); - ret = fi_cntr_open(domain, &cntr_attr, &txcntr, &txcntr); + ret = ft_cntr_open(&txcntr); if (ret) { FT_PRINTERR("fi_cntr_open", ret); return ret; @@ -517,8 +516,7 @@ } if (opts.options & FT_OPT_RX_CNTR) { - ft_cntr_set_wait_attr(); - ret = fi_cntr_open(domain, &cntr_attr, &rxcntr, &rxcntr); + ret = ft_cntr_open(&rxcntr); if (ret) { FT_PRINTERR("fi_cntr_open", ret); return ret; @@ -1963,6 +1961,65 @@ return ret; } +static int ft_spin_for_cntr(struct fid_cntr *cntr, uint64_t total, int timeout) +{ + struct timespec a, b; + uint64_t cur; + + if (timeout >= 0) + clock_gettime(CLOCK_MONOTONIC, &a); + + for (;;) { + cur = fi_cntr_read(cntr); + if (cur >= total) + return 0; + + if (timeout >= 0) { + clock_gettime(CLOCK_MONOTONIC, &b); + if ((b.tv_sec - a.tv_sec) > timeout) + break; + } + } + + fprintf(stderr, "%ds timeout expired\n", timeout); + return -FI_ENODATA; +} + +static int ft_wait_for_cntr(struct fid_cntr *cntr, uint64_t total, int timeout) +{ + int ret; + + while (fi_cntr_read(cntr) < total) { + ret = fi_cntr_wait(cntr, total, timeout); + if (ret) + FT_PRINTERR("fi_cntr_wait", ret); + else + break; + } + return 0; +} + +static int ft_get_cntr_comp(struct fid_cntr *cntr, uint64_t total, int timeout) +{ + int ret = 0; + + switch (opts.comp_method) { + case FT_COMP_SREAD: + case FT_COMP_WAITSET: + case FT_COMP_WAIT_FD: + ret = ft_wait_for_cntr(cntr, total, timeout); + break; + default: + ret = ft_spin_for_cntr(cntr, total, timeout); + break; + } + + if (ret) + FT_PRINTERR("fs_get_cntr_comp", ret); + + return ret; +} + int ft_get_rx_comp(uint64_t total) { int ret = FI_SUCCESS; @@ -1970,13 +2027,7 @@ if (opts.options & FT_OPT_RX_CQ) { ret = ft_get_cq_comp(rxcq, &rx_cq_cntr, total, timeout); } else if (rxcntr) { - while (fi_cntr_read(rxcntr) < total) { - ret = fi_cntr_wait(rxcntr, total, timeout); - if (ret) - FT_PRINTERR("fi_cntr_wait", ret); - else - break; - } + ret = ft_get_cntr_comp(rxcntr, total, timeout); } else { FT_ERR("Trying to get a RX completion when no RX CQ or counter were opened"); ret = -FI_EOTHER; @@ -1991,9 +2042,7 @@ if (opts.options & FT_OPT_TX_CQ) { ret = ft_get_cq_comp(txcq, &tx_cq_cntr, total, -1); } else if (txcntr) { - ret = fi_cntr_wait(txcntr, total, -1); - if (ret) - FT_PRINTERR("fi_cntr_wait", ret); + ret = ft_get_cntr_comp(txcntr, total, -1); } else { FT_ERR("Trying to get a TX completion when no TX CQ or counter were opened"); ret = -FI_EOTHER; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fabtests-1.6.0.0.d0916cc3f2c0/configure.ac new/fabtests-1.6.2.0.e32c9faa95a5/configure.ac --- old/fabtests-1.6.0.0.d0916cc3f2c0/configure.ac 2018-03-14 14:23:56.000000000 +0100 +++ new/fabtests-1.6.2.0.e32c9faa95a5/configure.ac 2018-09-24 12:15:48.000000000 +0200 @@ -5,7 +5,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) -AC_INIT([fabtests], [1.6.0], [of...@lists.openfabrics.org]) +AC_INIT([fabtests], [1.6.2], [of...@lists.openfabrics.org]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_MACRO_DIR(config) AC_CONFIG_HEADERS(config.h) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fabtests-1.6.0.0.d0916cc3f2c0/scripts/run_with_output.cmd new/fabtests-1.6.2.0.e32c9faa95a5/scripts/run_with_output.cmd --- old/fabtests-1.6.0.0.d0916cc3f2c0/scripts/run_with_output.cmd 2018-03-14 14:23:56.000000000 +0100 +++ new/fabtests-1.6.2.0.e32c9faa95a5/scripts/run_with_output.cmd 2018-09-24 12:15:48.000000000 +0200 @@ -1,11 +1,11 @@ -set cmdline=%1 -set out_file=%2 -set result_file=%3 - - -for /f "tokens=*" %%n in (%cmdline%) do set test_cmdline=%%n -%test_cmdline% >%out_file% 2>&1 -echo %errorlevel% >%result_file%.tmp -ren %result_file%.tmp %result_file% - -exit +set cmdline=%1 +set out_file=%2 +set result_file=%3 + + +for /f "tokens=*" %%n in (%cmdline%) do set test_cmdline=%%n +%test_cmdline% >%out_file% 2>&1 +echo %errorlevel% >%result_file%.tmp +ren %result_file%.tmp %result_file% + +exit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/fabtests-1.6.0.0.d0916cc3f2c0/simple/poll.c new/fabtests-1.6.2.0.e32c9faa95a5/simple/poll.c --- old/fabtests-1.6.0.0.d0916cc3f2c0/simple/poll.c 2018-03-14 14:23:56.000000000 +0100 +++ new/fabtests-1.6.2.0.e32c9faa95a5/simple/poll.c 2018-09-24 12:15:48.000000000 +0200 @@ -115,7 +115,7 @@ struct fi_cq_entry comp; int ret; int ret_count = 0; - int i, tx_cntr_done = 0, rx_cntr_done = 0; + int i, tx_cntr_val = 0, rx_cntr_val = 0; fprintf(stdout, "Posting a send...\n"); ret = ft_post_tx(ep, remote_fi_addr, tx_size, NO_CQ_DATA, &tx_ctx); @@ -123,9 +123,9 @@ return ret; while (((opts.options & FT_OPT_TX_CQ) && (tx_cq_cntr < tx_seq)) || - ((opts.options & FT_OPT_TX_CNTR) && (!tx_cntr_done)) || + ((opts.options & FT_OPT_TX_CNTR) && (tx_cntr_val < tx_seq)) || ((opts.options & FT_OPT_RX_CQ) && (rx_cq_cntr < rx_seq)) || - ((opts.options & FT_OPT_RX_CNTR) && (!rx_cntr_done))) { + ((opts.options & FT_OPT_RX_CNTR) && (rx_cntr_val < rx_seq))) { /* Poll send and recv CQs/Cntrs */ do { @@ -149,27 +149,19 @@ rx_cq_cntr++; } else if (context[i] == &txcntr) { printf("Send counter poll-event\n"); - if (tx_cntr_done) { + tx_cntr_val = fi_cntr_read(txcntr); + if (tx_cntr_val > tx_seq) { printf("Invalid tx counter event\n"); return -1; } - - if (tx_seq == fi_cntr_read(txcntr)) { - printf("Send counter done\n"); - tx_cntr_done = 1; - } continue; } else if (context[i] == &rxcntr) { printf("Recv counter poll-event\n"); - if (rx_cntr_done) { + rx_cntr_val = fi_cntr_read(rxcntr); + if (rx_cntr_val > rx_seq) { printf("Invalid rx counter event\n"); return -1; } - - if (rx_seq == fi_cntr_read(rxcntr)) { - printf("Receive counter done\n"); - rx_cntr_done = 1; - } continue; } else { printf("Unknown completion received\n");