History log of /openbmc/obmc-console/test/test-ringbuffer-boundary-read.c (Results 1 – 5 of 5)
Revision Date Author Comments
# b70f8713 18-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix readability-isolate-declaration

For example:

```
/usr/bin/clang-tidy -checks=-*, readability-isolate-declaration -export-fixes /tmp/tmpoo7fbs72/tmpo8xiwfxs.yaml -p=build /mnt/host

obmc-console: Fix readability-isolate-declaration

For example:

```
/usr/bin/clang-tidy -checks=-*, readability-isolate-declaration -export-fixes /tmp/tmpoo7fbs72/tmpo8xiwfxs.yaml -p=build /mnt/host/andrew/home/andrew/src/openbmc/obmc-console/test/test-client-escape.c
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:61:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
char *name, *value;
^~~~~~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:62:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
char *p, *line;
^~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:110:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
size_t size, len;
^~~~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../config.c:170:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
struct config_item *item, *next;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../console-client.c:263:2: error: multiple declarations in a single statement reduces readability [readability-isolate-declaration,-warnings-as-errors]
struct console_client _client, *client;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ia7829b1672ea2dfb3fa020c7c48bd8266e6a1769

show more ...


# 2834c5b1 18-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix readability-braces-around-statements

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I88d2bdcb15106298d83a1cf7176e069092820f1d


# 4ee419df 18-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Fix cert-dcl03-c,misc-static-assert

```
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../test/test-ringbuffer-boundary-read.c:17:2: error: found assert() that could be re

obmc-console: Fix cert-dcl03-c,misc-static-assert

```
/mnt/host/andrew/home/andrew/src/openbmc/obmc-console/build/../test/test-ringbuffer-boundary-read.c:17:2: error: found assert() that could be replaced by static_assert() [cert-dcl03-c,misc-static-assert,-warnings-as-errors]
assert(sizeof(in_buf) * 2 > 10);
^~~~~~
static_assert , ""
```

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I53954938355723fb559c28285c88807b44a44d22

show more ...


# a72711af 18-Apr-2023 Andrew Jeffery <andrew@aj.id.au>

obmc-console: Add clang-format configuration

And apply the formatting.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I75251051affa5129c8698185baf8d151302b19d6


# c9775ce7 07-Feb-2017 Jeremy Kerr <jk@ozlabs.org>

server: Use ringbuffer for socket backlog

Currently, the socket handler uses a linear buffer for the backlog data;
this means we need to shift up to 128kB of data after each socket
w

server: Use ringbuffer for socket backlog

Currently, the socket handler uses a linear buffer for the backlog data;
this means we need to shift up to 128kB of data after each socket
write().

This change introduces a single-producer-multiple-consumer ringbuffer,
to avoid the need for memmove()ing data around; we can simply update
pointers instead of shifting data.

We add this as a new file (ringbuffer.c), to make it a little more
modular. To mitigate the risk of subtle pointer arithmetic issues, we
add a set of tests too.

Change-Id: Ib7c5151d3cf1f588436f5461000b6fed22d0681c
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>

show more ...