search for: test_opts

Displaying 20 results from an estimated 39 matches for "test_opts".

2019 Aug 01
13
[PATCH v2 00/11] VSOCK: add vsock_test test suite
The vsock_diag.ko module already has a test suite but the core AF_VSOCK functionality has no tests. This patch series adds several test cases that exercise AF_VSOCK SOCK_STREAM socket semantics (send/recv, connect/accept, half-closed connections, simultaneous connections). Stefan: Do you think we should have a single application or is better to split it in single tests (e.g.
2019 Dec 18
13
[PATCH net-next v3 00/11] VSOCK: add vsock_test test suite
The vsock_diag.ko module already has a test suite but the core AF_VSOCK functionality has no tests. This patch series adds several test cases that exercise AF_VSOCK SOCK_STREAM socket semantics (send/recv, connect/accept, half-closed connections, simultaneous connections). The v1 of this series was originally sent by Stefan. v3: - Patch 6: * check the byte received in the recv_byte() * use
2019 Aug 01
0
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
...t;getopt.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <errno.h> +#include <unistd.h> + +#include "timeout.h" +#include "control.h" +#include "util.h" + +static void test_stream_connection_reset(const struct test_opts *opts) +{ + union { + struct sockaddr sa; + struct sockaddr_vm svm; + } addr = { + .svm = { + .svm_family = AF_VSOCK, + .svm_port = 1234, + .svm_cid = opts->peer_cid, + }, + }; + int ret; + int fd; + + fd = socket(AF_VSOCK, SOCK_STREAM, 0); + + timeout_begin(TIMEOUT); + do { + ret = c...
2019 Aug 01
0
[PATCH v2 10/11] vsock_test: skip read() in test_stream*close tests on a VMCI host
...tions(+), 2 deletions(-) diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c index cb606091489f..64adf45501ca 100644 --- a/tools/testing/vsock/vsock_test.c +++ b/tools/testing/vsock/vsock_test.c @@ -71,6 +71,7 @@ static void test_stream_client_close_client(const struct test_opts *opts) static void test_stream_client_close_server(const struct test_opts *opts) { + unsigned int local_cid; int fd; fd = vsock_stream_accept(VMADDR_CID_ANY, 1234, NULL); @@ -79,16 +80,27 @@ static void test_stream_client_close_server(const struct test_opts *opts) exit(EXIT_FAILURE);...
2023 Aug 31
0
[RFC PATCH v2 2/2] test/vsock: shutdowned socket test
...@ -19,6 +19,7 @@ > #include <time.h> > #include <sys/mman.h> > #include <poll.h> >+#include <signal.h> > > #include "timeout.h" > #include "control.h" >@@ -1170,6 +1171,133 @@ static void test_seqpacket_msg_peek_server(const struct test_opts *opts) > return test_msg_peek_server(opts, true); > } > >+static sig_atomic_t have_sigpipe; >+ >+static void sigpipe(int signo) >+{ >+ have_sigpipe = 1; >+} >+ >+static void test_stream_check_sigpipe(int fd) >+{ >+ ssize_t res; >+ >+ have_sigpipe = 0; &...
2019 Oct 09
2
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
...clude <stdlib.h> > +#include <string.h> > +#include <errno.h> > +#include <unistd.h> > + > +#include "timeout.h" > +#include "control.h" > +#include "util.h" > + > +static void test_stream_connection_reset(const struct test_opts *opts) > +{ > + union { > + struct sockaddr sa; > + struct sockaddr_vm svm; > + } addr = { > + .svm = { > + .svm_family = AF_VSOCK, > + .svm_port = 1234, > +...
2019 Oct 09
2
[PATCH v2 07/11] VSOCK: add AF_VSOCK test cases
...clude <stdlib.h> > +#include <string.h> > +#include <errno.h> > +#include <unistd.h> > + > +#include "timeout.h" > +#include "control.h" > +#include "util.h" > + > +static void test_stream_connection_reset(const struct test_opts *opts) > +{ > + union { > + struct sockaddr sa; > + struct sockaddr_vm svm; > + } addr = { > + .svm = { > + .svm_family = AF_VSOCK, > + .svm_port = 1234, > +...
2009 Sep 17
2
[LLVMdev] Forcing function inline not working
I have the following code: static inline void foo() __attribute((always_inline)); int a; static inline void foo() { a++; } int main(int argc, char *argv[]) { foo(); return 0; } However, the code generated by llvm 2.4 toolchain does not inline this function. opt retains the function call. Here is the output when I try to compile with -debug-only=inline:
2016 Jun 24
2
Strange opt result
Hi, opt -O1 converts the attached test.ll to test_opt.ll. " opt --version LLVM (http://llvm.org/): LLVM version 3.8.0 DEBUG build with assertions. Built Jun 23 2016 (18:32:09). Default target: i686-pc-linux-gnu Host CPU: k8-sse3 " test.ll: " ; ModuleID = 'test.bc' @__mla__system.1 = global i32 0 @0 = internal global [12 x i8] zeroinitializer @1 = internal global
2009 Sep 17
0
[LLVMdev] Forcing function inline not working
On Sep 16, 2009, at 6:55 PM, madiyaan wrote: > > I have the following code: > > static inline void foo() __attribute((always_inline)); > > int a; > static inline void foo() > { > a++; > } > > int main(int argc, char *argv[]) > { > foo(); > return 0; > } This works fine in current sources. You should upgrade; 2.5 has been out for a while and
2005 Jan 18
0
[PATCH] ext3: commit superblock before panicking
Hi, I have a problem with errors=panic on ext3. When a panic occurs, the error event is not recorded anywhere. So after the reboot, e2fsck doesn't kick in, the file system gets mounted again and the box panics again... Patch below moves the ERRORS_PANIC test down a bit so the journal is aborted before panic() is called. Eric Signed-off-by: Eric Lammerts <eric at lammerts.org> ---
2023 Mar 20
0
[RFC PATCH v1 3/3] test/vsock: skbuff merging test
...> >diff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c >index 3de10dbb50f5..00216c52d8b6 100644 >--- a/tools/testing/vsock/vsock_test.c >+++ b/tools/testing/vsock/vsock_test.c >@@ -968,6 +968,82 @@ static void test_seqpacket_inv_buf_server(const struct test_opts *opts) > test_inv_buf_server(opts, false); > } > >+static void test_stream_virtio_skb_merge_client(const struct test_opts *opts) >+{ >+ ssize_t res; >+ int fd; >+ >+ fd = vsock_stream_connect(opts->peer_cid, 1234); >+ if (fd < 0) { >+ perror("connect&qu...
2011 Jan 26
0
[PATCH 2/3] jbd2: Remove barrier feature conditional flag (or: always issue flushes)
As part of migrating the FLUSH/FUA knob to the block layer, remove the journal flags and various conditionals in jbd2 that surround flush issue calls in favor of always issuing the flush. The block layer will handle gracefully the situation where a FLUSH or FUA request is issued to a device that doesn't support it. Signed-off-by: Darrick J. Wong <djwong at us.ibm.com> ---
2012 Nov 05
2
[LLVMdev] Adding function attributes
Hello everyone, I am coding a ModulePass in which I want to add an AlwaysInline attribute to every function so that they can be later inlined by the -always-inline pass. However, the changes to the function seem to be lost after exiting my pass because the AlwaysInline attribute is not in the output LLVM IR. Maybe the function iterator passed by the module object actually points to copies of
2009 Sep 17
2
[LLVMdev] Forcing function inline not working
Thanks for your message. However, even with using version 2.5 of llvm the function is not inlined. Can you try this with your llvm with the same opt flags, which are as follows? -O3 -debug-only=inline -mem2reg If it does work for you, can you tell me the exact flags you used for clang or llvm-gcc to produce the .bc file and the exact flags you specified when you invoked opt? Does the inlining
2012 Nov 05
2
[LLVMdev] Adding function attributes
Hi Duncan, thanks for the quick answer. Yes I'm sure the runOnModule is being called, and when I dump the functions before exiting the method I can see the AlwaysInline attribute. I'll check InlineAlways.cpp and will reimplement as last resource but I still wonder why this is not working. On Mon, Nov 5, 2012 at 5:03 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Arnaldo,
2019 Aug 01
1
[PATCH v2 10/11] vsock_test: skip read() in test_stream*close tests on a VMCI host
...ff --git a/tools/testing/vsock/vsock_test.c b/tools/testing/vsock/vsock_test.c > index cb606091489f..64adf45501ca 100644 > --- a/tools/testing/vsock/vsock_test.c > +++ b/tools/testing/vsock/vsock_test.c [...] > @@ -79,16 +80,27 @@ static void test_stream_client_close_server(const struct test_opts *opts) > exit(EXIT_FAILURE); > } > > + local_cid = vsock_get_local_cid(fd); > + > control_expectln("CLOSED"); > > send_byte(fd, -EPIPE); > - recv_byte(fd, 1); > + > + /* Skip the read of data wrote by the peer if we are on VMCI and s/wrote...
2012 Nov 05
0
[LLVMdev] Adding function attributes
Hi Arnaldo, > I am coding a ModulePass in which I want to add an AlwaysInline attribute to > every function so that they can be later inlined by the -always-inline pass. why not just do the inlining yourself. The always inliner code is at lib/Transforms/IPO/InlineAlways.cpp, and it's pretty short. > However, the changes to the function seem to be lost after exiting my pass >
2012 Nov 05
0
[LLVMdev] Adding function attributes
Hi Arnaldo, On 05/11/12 10:02, Arnaldo wrote: > Hi Duncan, thanks for the quick answer. > > Yes I'm sure the runOnModule is being called, and when I dump the functions > before exiting the method I can see the AlwaysInline attribute. > > I'll check InlineAlways.cpp and will reimplement as last resource but I still > wonder why this is not working. if you want more
2009 Sep 17
0
[LLVMdev] Forcing function inline not working
I got the code to work in a LLVM 2.5. I think the reason your code wasn't working is that the function definition and declaration for foo were missing 'void'. This is perfectly legal C but maybe there's a bug in the inliner pass that sees the function in the module and the symbol table as different. Here are the files I used: [test.c] int a; void foo(void); int main(int argc,