search for: do_test

Displaying 20 results from an estimated 54 matches for "do_test".

2019 Sep 03
0
[PATCH v2 07/27] drm/dp_mst: Add sideband down request tracing + selftests
...that we can actually discern what's happening when sideband requests timeout. Since there wasn't really a good way of testing that any of this worked, I ended up writing simple selftests that lightly test sideband message encoding and decoding as well. Enjoy! Changes since v1: * Clean up DO_TEST() and sideband_msg_req_encode_decode() - danvet * Get rid of pr_fmt(), just define a prefix string instead and use drm_printf() * Check highest bit of VCPI in drm_dp_decode_sideband_req() - danvet * Make the switch case order between drm_dp_decode_sideband_req() and drm_dp_encode_sideband_req()...
2007 Jul 30
1
random number generator in batch jobs
Dear sir, I want to submit R batch jobs (e.g. 5) under the linux cluster by the script file "do_mul". The script file "do_mul" " #!/bin/bash export var for var in $(seq 1 5) do qsub -v var do_test done exit 0 " Through "do_mul", 5 "do_test" script files are submitted to the cluster. The script file "do_test": " #!/bin/bash -l #PBS -l ncpus=1 #PBS -l walltime=0:05:00 cd $PBS_O_WORKDIR mkdir test$var cd test$var module load R/2.5.0 R --vanilla< test e...
2019 Mar 28
0
[PATCH nbdkit v5 FINAL 14/19] data, memory: Implement extents.
...inition. + +source ./functions.sh +set -e +set -x + +requires jq --version +requires qemu-img --version +requires qemu-img map --help + +out="test-data-extents.out" +expected="test-data-extents.expected" +files="$out $expected" +rm -f $files +cleanup_fn rm -f $files + +do_test () +{ + # We use jq to normalize the output and convert it to plain text. + nbdkit -U - data data="$1" size="$2" \ + --run 'qemu-img map -f raw --output=json $nbd' | + jq -c '.[] | {start:.start, length:.length, data:.data, zero:.zero}' \ +...
2019 Apr 25
0
[nbdkit PATCH v2 5/5] nbd: Test .extents
...st-nbd-extents.pid1" +pid2="test-nbd-extents.pid2" +pid3="test-nbd-extents.pid3" +pid4="test-nbd-extents.pid4" +pid5="test-nbd-extents.pid5" +files="$out $expected $socket $pid1 $pid2 $pid3 $pid4 $pid5" +rm -f $files +cleanup_fn rm -f $files + +do_test () +{ + start_nbdkit -P "$4" -U "$socket" \ + --filter=truncate \ + data data="$1" size="$2" \ + truncate="$3" + # We use jq to normalize the output and convert it to plain text. + nbdkit -U - nbd socket="...
2017 Sep 12
0
[PATCH v2 2/5] lib: qemu: Factor out common code for reading and writing cache files.
.../* Did we previously test the same version of qemu? */ debug (g, "checking for previously cached test results of %s, in %s", g->hv, cachedir); - { - CLEANUP_FCLOSE FILE *fp = NULL; - fp = fopen (qemu_stat_filename, "r"); - if (fp == NULL) - goto do_test; - if (fscanf (fp, "%d %" SCNu64 " %" SCNu64, - &generation, &prev_size, &prev_mtime) != 3) { - goto do_test; - } - } - - if (generation == MEMO_GENERATION && - (uint64_t) statbuf.st_size == prev_size && - (uint64...
2016 May 12
0
[PATCH 4/4] lib: qemu: Memoize qemu feature detection.
...(g, "%s/qemu.devices", cachedir); + + /* Did we previously test the same version of qemu? */ + debug (g, "checking for previously cached test results of %s, in %s", + g->hv, cachedir); + + fp = fopen (qemu_stat_filename, "r"); + if (fp == NULL) + goto do_test; + if (fscanf (fp, "%d %" SCNu64 " %" SCNu64, + &generation, &prev_size, &prev_mtime) != 3) { + fclose (fp); + goto do_test; + } + fclose (fp); + + if (generation == MEMO_GENERATION && + (uint64_t) statbuf.st_size == prev_size &amp...
2017 Sep 11
4
[PATCH 0/4] lib: qemu: Add test for mandatory locking.
The patch I posted last week to disable mandatory locking for readonly drives (https://www.redhat.com/archives/libguestfs/2017-September/msg00013.html) was wrong in a couple of respects. Firstly it didn't work, which I didn't detect because my tests were testing the wrong thing. Oops. Secondly it used a simple version number check to detect qemu binaries implementing mandatory locking.
2019 Oct 07
6
[nbdkit PATCH 0/5] More retry fixes
I think this is my last round of patches for issues I identified with the retry filter. With this in place, it should be safe to interject another filter in between retry and the plugin. Eric Blake (5): retry: Don't call into closed plugin tests: Refactor test-retry-reopen-fail.sh tests: Enhance retry test to cover failed reopen server: Move prepare/finalize/close recursion to
2017 Mar 06
7
[PATCH 0/6] Various Coverity fixes #2
Hi, this patch series fixes few more issues discovered by Coverity. Thanks, Pino Toscano (6): tail: check the return value pf guestfs_set_pgroup daemon: btrfs: check end_stringsbuf return values everywhere java: use cleanup handlers for structs (lists) as return values lib: qemu: improve handling of FILE* p2v: check more return values p2v: fix possible close(-1) issue cat/tail.c
2019 Nov 21
2
[ARM] Peephole optimization ( instructions tst + add )
...============================================================== #define NULL ((void*)0) typedef struct { unsigned long * res_in; unsigned long * proc; } fd_set_bits; fd_set_bits *gv_fds; int g_max_i; int LOOP_ITERS_COUNT; unsigned DEF_MASK; __attribute__((noinline)) int do_test(const int max_iters_count, const unsigned long in, const unsigned long out, const unsigned long ex, const unsigned long bit_init_val,...
2017 Sep 12
8
[PATCH v3 0/6] launch: direct: Disable qemu locking when opening drives readonly.
v2 -> v3: - I addressed everything that Pino mentioned last time. - It's tricky to get a stable run when multiple copies of qemu are involved, because the same cache files get overwritten by parallel libguestfs. So I changed the names of the cache files to include the qemu binary key (size, mtime), which removes this conflict. This is in new patch 4/6. Rich.
2017 Sep 12
9
[PATCH v2 0/5] launch: direct: Disable qemu locking when opening drives readonly (RHBZ#1417306)
Patches 1-4 are almost the same as they are when previously posted here: https://www.redhat.com/archives/libguestfs/2017-September/msg00039.html Patch 5 actually uses the mandatory locking test to turn off locking in the narrow case where a drive is opened readonly, and then only for the drive being inspected. Passes ordinary tests (‘check-direct’ and ‘check-valgrind-direct’). Rich.
2017 Jun 19
2
LLVM behavior different depending on function symbol name
using `opt --print-after-all -O3` I see that EarlyCSE is interpreting the call to `ceil` and constant fold: *** IR Dump After Early CSE *** ; Function Attrs: nobuiltin nounwind define i1 @do_test() #2 { Entry: %0 = call fastcc float @ceil(float 0.000000e+00) #6 %1 = call fastcc float @ceil32(float 0.000000e+00) #6 %2 = fcmp fast oeq float 0.000000e+00, %1 ret i1 %2 } So just running `opt -early-cse -debug` seems enough: EarlyCSE Simplify: %0 = call fastcc float @ceil(float 0.000...
2017 Jun 19
2
LLVM behavior different depending on function symbol name
...trs: argmemonly nounwind declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly, i8* nocapture readonly, i64, i32, i1) #1 ; Function Attrs: argmemonly nounwind declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i32, i1) #1 ; Function Attrs: nobuiltin nounwind define i1 @do_test() #2 !dbg !16 { Entry: %0 = call fastcc float @ceil(float 0.000000e+00) #6, !dbg !21 %1 = call fastcc float @ceil32(float 0.000000e+00) #6, !dbg !23 %2 = fcmp fast oeq float %0, %1, !dbg !24 ret i1 %2, !dbg !25 } ; Function Attrs: cold nobuiltin noreturn nounwind define linkonce coldcc voi...
2019 Nov 22
2
[ARM] Peephole optimization ( instructions tst + add )
...============================================================== #define NULL ((void*)0) typedef struct { unsigned long * res_in; unsigned long * proc; } fd_set_bits; fd_set_bits *gv_fds; int g_max_i; int LOOP_ITERS_COUNT; unsigned DEF_MASK; __attribute__((noinline)) int do_test(const int max_iters_count, const unsigned long in, const unsigned long out, const unsigned long ex, const unsigned long bit_init_val,...
2010 Jun 13
1
[PATCHv2] kmmio/mmiotrace: fix double free of kmmio_fault_pages
...ease), GFP_ATOMIC); if (!drelease) { pr_crit("leaking kmmio_fault_page objects.\n"); diff --git a/arch/x86/mm/testmmiotrace.c b/arch/x86/mm/testmmiotrace.c index 8565d94..e6cc5be 100644 --- a/arch/x86/mm/testmmiotrace.c +++ b/arch/x86/mm/testmmiotrace.c @@ -90,6 +90,27 @@ static void do_test(unsigned long size) iounmap(p); } +/* + * Tests how mmiotrace behaves in face of multiple ioremap / iounmaps in + * a short time. We had a bug in deferred freeing procedure which tried + * to free this region multiple times (ioremap can reuse the same address + * for many mappings). + */ +stat...
2010 Jun 05
2
[PATCH] kmmio/mmiotrace: fix double free of kmmio_fault_pages
After every iounmap mmiotrace has to free kmmio_fault_pages, but it can't do it directly, so it defers freeing by RCU. It usually works, but when mmiotraced code calls ioremap-iounmap multiple times without sleeping between (so RCU won't kick in and start freeing) it can be given the same virtual address, so at every iounmap mmiotrace will schedule the same pages for release. Obviously it
2019 Sep 03
50
[PATCH v2 00/27] DP MST Refactors + debugging tools + suspend/resume reprobing
This is the large series for adding MST suspend/resume reprobing that I've been working on for quite a while now. In addition, I: - Refactored and cleaned up any code I ended up digging through in the process of understanding how some parts of these helpers worked. - Added some debugging tools along the way that I ended up needing to figure out some issues in my own code Note that
2019 Apr 25
6
[nbdkit PATCH v2 0/5] structured replies/.extents for nbd plugin
Updated based on other changes that have happened in the meantime: - rely more on cleanup.h (throughout) - split structured read for easier review (patch 2 and 3 were combined in v1) - rely on nbdkit not leaking a server's partial answer (patch 3) - add tests (patch 5) - other bug fixes I found while testing it - drop EOVERFLOW patch for now; it will be separate once upstream NBD protocol
2019 Mar 28
32
[PATCH nbdkit v5 FINAL 00/19] Implement extents.
This has already been pushed upstream. I am simply posting these here so we have a reference in the mailing list in case we find bugs later (as I'm sure we will - it's a complex patch series). Great thanks to Eric Blake for tireless review on this one. It also seems to have identified a few minor bugs in qemu along the way. Rich.