message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
replaced UBUNTU by Debian based distributions | @@ -34,18 +34,9 @@ make
make install (as super user)
```
-## Ubuntu 18.04
+## Debian based distributions:
-For Ubuntu to compile you need to do the following before running `make`:
-
-Add the following to the beginning of `hcxpcapngtool.c`:
-
-```
-#define __STDC_FORMAT_MACROS
-#include <inttypes.h>
-```
-
-Install missing dependencies:
+You need install missing dependencies before running `make`:
```
sudo apt-get install libcurl4-openssl-dev
|
Another update to a README. | @@ -202,15 +202,17 @@ Issues:
state (like grabbing and dragging or resizing). There is also a
possibility of using auto-raise with a mouse as well. All of this
logic is in place, but none has been verified.
- 8. I am suspecting that NxTerm processes are not being shut down
- properly when an NxTerm window is closed, but I have not yet
- investigated this.
- 9. NxTerm windows really need to be scrollable. They are difficult to
+ 8. NxTerm windows really need to be scrollable. They are difficult to
use with only a few lines on a small display. A related usability
issue is the font height: The fonts report a maximum font height
that results in a large line spacing on the display and, hence,
fewer lines visible in the small window. This is latter issues is
a problem with the fonts not Twm4Nx, however.
+ 9. There is a trivial rounding error in the calculation of the LCD
+ width in SLcd::CSLcd::getWidth(). It currently truncates down.
+ It needs to round up. This sometimes leaves a small, one-pixel-
+ wide sliver on the clock display. This display always recovers and
+ this only cosmetic.
Adding Twm4Nx Applications
==========================
|
arvo: only allow a single %whom | (~(put by van) way (mint $:u.bod way /sys/vane/[p]/hoon q))
==
::
- %whom ..poke(who `p.gub)
+ %whom ..poke(who ~|(%whom-once ?>(?=(~ who) `p.gub)))
%wyrd %- %+ wyrd kel.p.gub
^- (list (pair term @))
:* hoon/hoon-version
|
Get and Set transitiontime of a scene | @@ -1553,6 +1553,7 @@ bool DeRestPluginPrivate::groupToMap(const Group *group, QVariantMap &map)
QString sid = QString::number(si->id);
scene["id"] = sid;
scene["name"] = si->name;
+ scene["transitiontime"] = si->transitiontime();
scenes.append(scene);
}
@@ -1998,6 +1999,12 @@ int DeRestPluginPrivate::storeScene(const ApiRequest &req, ApiResponse &rsp)
Group *group = getGroupForId(gid);
rsp.httpStatus = HttpStatusOk;
+ QVariant var = Json::parse(req.content, ok);
+ QVariantMap map = var.toMap();
+
+ uint tt = 0;
+ bool hasTt = false;
+
userActivity();
if (!isInNetwork())
@@ -2014,6 +2021,13 @@ int DeRestPluginPrivate::storeScene(const ApiRequest &req, ApiResponse &rsp)
return REQ_READY_SEND;
}
+ if (!ok)
+ {
+ rsp.list.append(errorToMap(ERR_INVALID_JSON, QString("/groups/%1/scenes/%2").arg(gid).arg(sid), QString("body contains invalid JSON")));
+ rsp.httpStatus = HttpStatusBadRequest;
+ return REQ_READY_SEND;
+ }
+
// check if scene exists
uint8_t sceneId = sid.toUInt(&ok);
Scene *scene = ok ? group->getScene(sceneId) : 0;
@@ -2025,6 +2039,23 @@ int DeRestPluginPrivate::storeScene(const ApiRequest &req, ApiResponse &rsp)
return REQ_READY_SEND;
}
+ if (map.contains("transitiontime"))
+ {
+ tt = map["transitiontime"].toUInt(&ok);
+
+ if (ok && tt < 0xFFFFUL)
+ {
+ hasTt = true;
+ scene->setTransitiontime(tt);
+ }
+ else
+ {
+ rsp.list.append(errorToMap(ERR_INVALID_VALUE, QString("/groups/%1/scenes/%2/transitiontime").arg(gid).arg(sid), QString("invalid value, %1, for parameter transitiontime").arg(tt)));
+ rsp.httpStatus = HttpStatusBadRequest;
+ return REQ_READY_SEND;
+ }
+ }
+
if (scene->externalMaster)
{
// we take control over scene
@@ -2102,7 +2133,15 @@ int DeRestPluginPrivate::storeScene(const ApiRequest &req, ApiResponse &rsp)
}
- if (ls->transitionTime() != 10)
+ if (hasTt)
+ {
+ if (ls->transitionTime() != tt)
+ {
+ ls->setTransitionTime(tt);
+ needModify = true;
+ }
+ }
+ else if (ls->transitionTime() != 10)
{
ls->setTransitionTime(10);
needModify = true;
|
test_clang: initialize format string arg on stack
With local LLVM (4.0ish), inline strings in this test case would
segfault. Fix the crash by constructing explicitly on the stack. | @@ -471,7 +471,8 @@ int trace_entry(struct pt_regs *ctx) {
text = """
#include <uapi/linux/ptrace.h>
int trace_entry(struct pt_regs *ctx) {
- bpf_trace_printk("%s %s\\n", "hello", "world");
+ char s1[] = "hello", s2[] = "world";
+ bpf_trace_printk("%s %s\\n", s1, s2);
return 0;
}
"""
|
Add EnableGraphMaxScale, Update default colors | @@ -48,7 +48,8 @@ VOID PhAddDefaultSettings(
PhpAddIntegerSetting(L"EnableNetworkResolve", L"1");
PhpAddIntegerSetting(L"EnableNetworkResolveDoH", L"0");
PhpAddIntegerSetting(L"EnablePlugins", L"1");
- PhpAddIntegerSetting(L"EnableScaleCpuGraph", L"0");
+ PhpAddIntegerSetting(L"EnableGraphMaxScale", L"0");
+ PhpAddIntegerSetting(L"EnableGraphMaxText", L"1");
PhpAddIntegerSetting(L"EnableServiceNonPoll", L"0");
PhpAddIntegerSetting(L"EnableShellExecuteSkipIfeoDebugger", L"1");
PhpAddIntegerSetting(L"EnableStage2", L"1");
@@ -298,9 +299,9 @@ VOID PhAddDefaultSettings(
PhpAddIntegerSetting(L"ColorPrivate", L"0077ff");
PhpAddIntegerSetting(L"ColorPhysical", L"ff8000"); // Blue
- PhpAddIntegerSetting(L"ColorPowerUsage", L"77ff77");
- PhpAddIntegerSetting(L"ColorTemperature", L"7777ff");
- PhpAddIntegerSetting(L"ColorFanRpm", L"ff7777");
+ PhpAddIntegerSetting(L"ColorPowerUsage", L"00ff00");
+ PhpAddIntegerSetting(L"ColorTemperature", L"0000ff");
+ PhpAddIntegerSetting(L"ColorFanRpm", L"ff0077");
PhpAddStringSetting(L"KphObjectName", L"");
PhpAddStringSetting(L"KphPortName", L"");
|
[chainmaker]add wallet type err check | @@ -125,6 +125,8 @@ __BOATSTATIC BOAT_RESULT chainmaker_create_keypair()
#elif defined(USE_CREATE_PERSIST_WALLET)
BoatLog(BOAT_LOG_NORMAL, "create keypair persist");
result = BoatKeypairCreate(&keypair_config, "keypairPersist", BOAT_STORE_TYPE_FLASH);
+#else
+ result = BOAT_ERROR;
#endif
if (result < 0)
|
Fix minimap flicker patch | @@ -13,7 +13,7 @@ void MinimapFlickerPatch(const Image* apImage)
return;
}
- pLocation += 0xEB;
+ pLocation += 0xEC;
DWORD oldProtect = 0;
VirtualProtect(pLocation, 32, PAGE_EXECUTE_WRITECOPY, &oldProtect);
|
Fix copy byte count | @@ -643,7 +643,6 @@ static bool audiod_decode_type_I_pcm(uint8_t rhport, audiod_function_t* audio, u
// Determine amount of samples
uint8_t const n_ff_used = audio->n_ff_used_rx;
- uint16_t const nBytesToCopy = audio->n_channels_per_ff_rx * audio->n_bytes_per_sampe_rx;
uint16_t const nBytesPerFFToRead = n_bytes_received / n_ff_used;
uint8_t cnt_ff;
@@ -662,14 +661,14 @@ static bool audiod_decode_type_I_pcm(uint8_t rhport, audiod_function_t* audio, u
info.len_lin = tu_min16(nBytesPerFFToRead, info.len_lin);
src = &audio->lin_buf_out[cnt_ff*audio->n_channels_per_ff_rx * audio->n_bytes_per_sampe_rx];
dst_end = info.ptr_lin + info.len_lin;
- src = audiod_interleaved_copy_bytes_fast_decode(nBytesToCopy, info.ptr_lin, dst_end, src, n_ff_used);
+ src = audiod_interleaved_copy_bytes_fast_decode(audio->n_bytes_per_sampe_rx, info.ptr_lin, dst_end, src, n_ff_used);
// Handle wrapped part of FIFO
info.len_wrap = tu_min16(nBytesPerFFToRead - info.len_lin, info.len_wrap);
if (info.len_wrap != 0)
{
dst_end = info.ptr_wrap + info.len_wrap;
- audiod_interleaved_copy_bytes_fast_decode(nBytesToCopy, info.ptr_wrap, dst_end, src, n_ff_used);
+ audiod_interleaved_copy_bytes_fast_decode(audio->n_bytes_per_sampe_rx, info.ptr_wrap, dst_end, src, n_ff_used);
}
tu_fifo_advance_write_pointer(&audio->rx_supp_ff[cnt_ff], info.len_lin + info.len_wrap);
}
@@ -994,7 +993,7 @@ static uint16_t audiod_encode_type_I_pcm(uint8_t rhport, audiod_function_t* audi
{
info.len_lin = tu_min16(nBytesPerFFToSend, info.len_lin); // Limit up to desired length
src_end = (uint8_t *)info.ptr_lin + info.len_lin;
- dst = audiod_interleaved_copy_bytes_fast_encode(nBytesToCopy, info.ptr_lin, src_end, dst, n_ff_used);
+ dst = audiod_interleaved_copy_bytes_fast_encode(audio->n_bytes_per_sampe_tx, info.ptr_lin, src_end, dst, n_ff_used);
// Limit up to desired length
info.len_wrap = tu_min16(nBytesPerFFToSend - info.len_lin, info.len_wrap);
@@ -1003,7 +1002,7 @@ static uint16_t audiod_encode_type_I_pcm(uint8_t rhport, audiod_function_t* audi
if (info.len_wrap != 0)
{
src_end = (uint8_t *)info.ptr_wrap + info.len_wrap;
- audiod_interleaved_copy_bytes_fast_encode(nBytesToCopy, info.ptr_wrap, src_end, dst, n_ff_used);
+ audiod_interleaved_copy_bytes_fast_encode(audio->n_bytes_per_sampe_tx, info.ptr_wrap, src_end, dst, n_ff_used);
}
tu_fifo_advance_read_pointer(&audio->tx_supp_ff[cnt_ff], info.len_lin + info.len_wrap);
|
extmod/pupdevices/ColorSensor: add hsv method | @@ -211,6 +211,25 @@ STATIC mp_obj_t pupdevices_ColorSensor_make_new(const mp_obj_type_t *type, size_
return MP_OBJ_FROM_PTR(self);
}
+// pybricks.builtins.ColorSensor.hsv
+STATIC mp_obj_t pupdevices_ColorSensor_hsv(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
+ PB_PARSE_ARGS_METHOD(n_args, pos_args, kw_args,
+ pupdevices_ColorSensor_obj_t, self,
+ PB_ARG_DEFAULT_TRUE(illuminate));
+
+ if (mp_obj_is_true(illuminate)) {
+ int32_t hsv[3];
+ pbdevice_get_values(self->pbdev, PBIO_IODEV_MODE_PUP_COLOR_SENSOR__HSV, hsv);
+ mp_obj_t ret[3];
+ ret[0] = mp_obj_new_int(hsv[0]);
+ ret[1] = mp_obj_new_int(bound_percentage(hsv[1] >> 3));
+ ret[2] = mp_obj_new_int(bound_percentage(hsv[2] / 5));
+ return mp_obj_new_tuple(3, ret);
+ }
+ return mp_const_none;
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_KW(pupdevices_ColorSensor_hsv_obj, 1, pupdevices_ColorSensor_hsv);
+
// pybricks.builtins.ColorSensor.color_map
STATIC mp_obj_t pupdevices_ColorSensor_color_map(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
PB_PARSE_ARGS_METHOD(n_args, pos_args, kw_args,
@@ -253,6 +272,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(pupdevices_ColorSensor_ambient_obj, pupdevices_ColorSe
// dir(pybricks.pupdevices.ColorSensor)
STATIC const mp_rom_map_elem_t pupdevices_ColorSensor_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_lights), MP_ROM_ATTRIBUTE_OFFSET(pupdevices_ColorSensor_obj_t, lights)},
+ { MP_ROM_QSTR(MP_QSTR_hsv), MP_ROM_PTR(&pupdevices_ColorSensor_hsv_obj) },
{ MP_ROM_QSTR(MP_QSTR_reflection), MP_ROM_PTR(&pupdevices_ColorSensor_reflection_obj) },
{ MP_ROM_QSTR(MP_QSTR_ambient), MP_ROM_PTR(&pupdevices_ColorSensor_ambient_obj) },
{ MP_ROM_QSTR(MP_QSTR_color_map), MP_ROM_PTR(&pupdevices_ColorSensor_color_map_obj) },
|
Set ConfigPending flag for Heiman Watersensor
This fix the problem that Heiman water sensor could not be paired.
It will still join as "unreachable" until it is activated once.
TODO: remove the unreachable state after pairing | @@ -6047,6 +6047,12 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const SensorFi
node->nodeDescriptor().manufacturerCode() == VENDOR_HEIMAN)
{
sensorNode.setManufacturer("Heiman");
+
+ if (fingerPrint.hasInCluster(IAS_ZONE_CLUSTER_ID)) // POLL_CONTROL_CLUSTER_ID
+ {
+ item = sensorNode.addItem(DataTypeUInt8, RConfigPending);
+ item->setValue(item->toNumber() | R_PENDING_WRITE_POLL_CHECKIN_INTERVAL | R_PENDING_SET_LONG_POLL_INTERVAL);
+ }
}
else if (modelId.startsWith(QLatin1String("45127")))
{
|
Fix for pulse width bug when changing from high to low frequencies if there was an overrun | @@ -387,7 +387,7 @@ void PWMCluster::load_pwm() {
// Invert this channel's initial state if it's polarity invert is set
if(state.polarity) {
- pin_states |= (1u << channel); // Set the pin
+ pin_states |= (1u << channel_to_pin_map[channel]); // Set the pin
}
uint channel_start = state.offset;
@@ -404,19 +404,21 @@ void PWMCluster::load_pwm() {
// Did the previous sequence overrun the wrap level?
if(state.overrun > 0) {
// Flip the initial state so the pin starts "high" (or "low" if polarity inverted)
- pin_states ^= (1u << channel);
+ pin_states ^= (1u << channel_to_pin_map[channel]);
// Check for a few edge cases when pulses change length across the wrap level
// Not entirely sure I understand which statements does what, but they seem to work
if((channel_end >= channel_start) || (state.overrun > channel_end)) {
// Add a transition to "low" (or "high" if polarity inverted) at the overrun level of the previous sequence
PWMCluster::sorted_insert(transitions, data_size, TransitionData(channel, state.overrun, state.polarity));
+ //printf("C = %d, Added Low at %d\n", channel, state.overrun);
}
}
if(state.level > 0 && channel_start < wrap_level) {
// Add a transition to "high" (or "low" if polarity inverted) at the start level
PWMCluster::sorted_insert(transitions, data_size, TransitionData(channel, channel_start, !state.polarity));
+ //printf("C = %d, Added High at %d\n", channel, channel_start);
// If the channel has overrun the wrap level, record by how much
if(channel_end < channel_start) {
@@ -427,7 +429,10 @@ void PWMCluster::load_pwm() {
if(state.level < wrap_level) {
// Add a transition to "low" (or "high" if polarity inverted) at the end level
PWMCluster::sorted_insert(transitions, data_size, TransitionData(channel, channel_end, state.polarity));
+ //printf("C = %d, Added Low at %d\n", channel, channel_end);
}
+
+ //printf("C = %d, Start = %d, End = %d, Overrun = %d\n", channel, channel_start, channel_end, state.overrun);
}
// Introduce "Loading Zone" transitions to the end of the sequence to
@@ -518,6 +523,9 @@ void PWMCluster::load_pwm() {
// Record the looping pin states
looping_mask[write_index] = pin_states;
+ //BUG It's not just the first one that needs overriding! D'oh!
+ // It could be a whole load of pulses that need updating to account for when multiple pulses pass the looping line
+ // May be best to have an intermediary sequence?
}
else {
// There were no transitions (either because there was a zero wrap, or no channels because there was a zero wrap?),
|
divert to using malloc / free if necessary | @@ -253,12 +253,18 @@ void do_write(h2o_socket_t *_sock, h2o_iovec_t *_bufs, size_t bufcnt, h2o_socket
{
struct st_h2o_evloop_socket_t *sock = (struct st_h2o_evloop_socket_t *)_sock;
h2o_iovec_t *bufs;
+ h2o_iovec_t *tofree = NULL;
assert(sock->super._cb.write == NULL);
assert(sock->_wreq.cnt == 0);
sock->super._cb.write = cb;
+ /* cap the number of buffers, since we're using alloca */
+ if (bufcnt > 10000)
+ bufs = tofree = h2o_mem_alloc(sizeof(*bufs) * bufcnt);
+ else
bufs = alloca(sizeof(*bufs) * bufcnt);
+
memcpy(bufs, _bufs, sizeof(*bufs) * bufcnt);
/* try to write now */
@@ -269,15 +275,16 @@ void do_write(h2o_socket_t *_sock, h2o_iovec_t *_bufs, size_t bufcnt, h2o_socket
*sock->_wreq.bufs = h2o_iovec_init(H2O_STRLIT("deadbeef"));
sock->_flags |= H2O_SOCKET_FLAG_IS_WRITE_NOTIFY;
link_to_pending(sock);
- return;
+ goto Out;
}
if (bufcnt == 0) {
/* write complete, schedule the callback */
sock->_flags |= H2O_SOCKET_FLAG_IS_WRITE_NOTIFY;
link_to_pending(sock);
- return;
+ goto Out;
}
+
/* setup the buffer to send pending data */
if (bufcnt <= sizeof(sock->_wreq.smallbufs) / sizeof(sock->_wreq.smallbufs[0])) {
sock->_wreq.bufs = sock->_wreq.smallbufs;
@@ -290,6 +297,8 @@ void do_write(h2o_socket_t *_sock, h2o_iovec_t *_bufs, size_t bufcnt, h2o_socket
/* schedule the write */
link_to_statechanged(sock);
+Out:
+ free(tofree);
}
int h2o_socket_get_fd(h2o_socket_t *_sock)
|
chat: pad unread marker more evenly | import React, { Component, PureComponent } from "react";
import moment from "moment";
import _ from "lodash";
-import { Box, Row, Text } from "@tlon/indigo-react";
+import { Box, Row, Text, Rule } from "@tlon/indigo-react";
import { OverlaySigil } from './overlay-sigil';
import { uxToHex, cite, writeText } from '~/logic/lib/util';
@@ -14,15 +14,15 @@ import RemoteContent from '~/views/components/RemoteContent';
export const DATESTAMP_FORMAT = '[~]YYYY.M.D';
export const UnreadMarker = React.forwardRef(({ dayBreak, when }, ref) => (
- <div ref={ref} style={{ color: "#219dff" }} className="flex items-center f9 absolute w-100 left-0 pv0">
- <hr style={{ borderColor: "#219dff" }} className="dn-s ma0 w2 bt-0" />
- <p className="mh4 z-2" style={{ whiteSpace: 'normal' }}>New messages below</p>
- <hr style={{ borderColor: "#219dff" }} className="ma0 flex-grow-1 bt-0" />
+ <Row ref={ref} color='blue' alignItems='center' fontSize='0' position='absolute' width='100%' py='2'>
+ <Rule borderColor='blue' display={['none', 'block']} m='0' width='2rem' />
+ <Text flexShrink='0' display='block' zIndex='2' mx='4' color='blue'>New messages below</Text>
+ <Rule borderColor='blue' flexGrow='1' m='0'/>
{dayBreak
- ? <p className="gray2 mh4">{moment(when).calendar()}</p>
+ ? <Text display='block' gray mx='4'>{moment(when).calendar()}</Text>
: null}
- <hr style={{ width: "calc(50% - 48px)" }} style={{ borderColor: "#219dff" }} className="ma0 bt-0" />
- </div>
+ <Rule style={{ width: "calc(50% - 48px)" }} borderColor='blue' m='0' />
+ </Row>
));
export const DayBreak = ({ when }) => (
@@ -125,7 +125,7 @@ export default class ChatMessage extends Component<ChatMessageProps> {
};
const unreadContainerStyle = {
- height: isLastRead ? '1.66em' : '0',
+ height: isLastRead ? '2rem' : '0',
};
return (
|
libbpf-tools: Add verbose option to mountsnoop
Support verbose mode and set custom libbpf print callback
in mountsnoop. | @@ -38,6 +38,7 @@ static volatile sig_atomic_t exiting = 0;
static pid_t target_pid = 0;
static bool emit_timestamp = false;
static bool output_vertically = false;
+static bool verbose = false;
static const char *flag_names[] = {
[0] = "MS_RDONLY",
[1] = "MS_NOSUID",
@@ -91,6 +92,7 @@ static const struct argp_option opts[] = {
{ "pid", 'p', "PID", 0, "Process ID to trace" },
{ "timestamp", 't', NULL, 0, "Include timestamp on output" },
{ "detailed", 'd', NULL, 0, "Output result in detail mode" },
+ { "verbose", 'v', NULL, 0, "Verbose debug output" },
{ NULL, 'h', NULL, OPTION_HIDDEN, "Show the full help" },
{},
};
@@ -115,6 +117,9 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state)
case 'd':
output_vertically = true;
break;
+ case 'v':
+ verbose = true;
+ break;
case 'h':
argp_state_help(state, stderr, ARGP_HELP_STD_HELP);
break;
@@ -124,6 +129,13 @@ static error_t parse_arg(int key, char *arg, struct argp_state *state)
return 0;
}
+static int libbpf_print_fn(enum libbpf_print_level level, const char *format, va_list args)
+{
+ if (level == LIBBPF_DEBUG && !verbose)
+ return 0;
+ return vfprintf(stderr, format, args);
+}
+
static void sig_int(int signo)
{
exiting = 1;
@@ -246,6 +258,7 @@ int main(int argc, char **argv)
return err;
libbpf_set_strict_mode(LIBBPF_STRICT_ALL);
+ libbpf_set_print(libbpf_print_fn);
obj = mountsnoop_bpf__open();
if (!obj) {
|
Added notes about round-robin scheduling. | @@ -290,6 +290,9 @@ a blocking RTOS-call execution is switched back to thread 3 immediately during t
At time index 5 thread 3 uses a blocking RTOS-call as well. Thus the scheduler switches back to thread 2 for time index 6.
At time index 7 the scheduler uses the round-robin mechanism to switch to thread 1 and so on.
+\note Refer to limitations this type of scheduling in the \ref systemConfig_rr configuration section.
+
+
\section MemoryAllocation Memory Allocation
RTX5 objects (thread, mutex, semaphore, timer, message queue, thread and event flags, as well as memory pool) require
@@ -798,7 +801,10 @@ In other words, threads execute for the duration of their time slice (unless a t
switches to the next thread that is in \b READY state and has the same priority. If no other thread with the same priority is
ready to run, the current running thread resumes it execution.
-\note When switching to higher priority threads, the round-robin timeout value is reset.
+\note
+When switching to higher priority threads, the round-robin timeout value is reset. This might lead to conditions where
+threads with the same priority as the interrupted thread are blocked for a longer period of time or even never called
+again. You can avoid this by using \ref osThreadYield to pass control to the next thread in the \b READY state.
Round-Robin multitasking is controlled with the <b>\#define OS_ROBIN_ENABLE</b>. The time slice period is configured (in RTX
timer ticks) with the <b>\#define OS_ROBIN_TIMEOUT</b>.
|
Fix off-by-one error when updating old messages. | :: changed message
%_ +>.$
grams %+ welp
- (scag (dec (max u.old 1)) grams)
- [gam (slag u.old grams)]
+ (scag u.old grams)
+ [gam (slag +(u.old) grams)]
==
::
++ sa-change-remote ::< apply remote's delta
|
SOVERSION bump to version 2.26.3 | @@ -66,7 +66,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
set(LIBYANG_MINOR_SOVERSION 26)
-set(LIBYANG_MICRO_SOVERSION 2)
+set(LIBYANG_MICRO_SOVERSION 3)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
|
config tool: update virtio block setting
add support for more than one virtio block setting
for specific vm | @@ -459,7 +459,7 @@ address is optional.</xs:documentation>
<xs:documentation>The virtio input device setting.</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="block" type="xs:string" minOccurs="0">
+ <xs:element name="block" type="xs:string" minOccurs="0" maxOccurs="unbounded">
<xs:annotation acrn:views="basic">
<xs:documentation>The virtio block device setting.
Format: ``[blk partition:][img path]``. Example: ``/dev/sda3:./a/b.img``.</xs:documentation>
|
removed unneeded checks | @@ -1004,16 +1004,11 @@ _cw_eval_get_input(FILE* fp, size_t size)
str = c3_realloc(NULL, size);//size is start size
- if( !str )
- return str;
-
while( EOF != (ch=fgetc(fp)) ){
str[len++]=ch;
if( len == size ){
size +=16;
- str = realloc(str, (size));
- if(!str)
- return str;
+ str = c3_realloc(str, (size));
}
}
|
interface: disable clicking notes if they are pending and gray them out | @@ -49,8 +49,10 @@ export function NotePreview(props: NotePreviewProps) {
const commColor = (props.unreads.graph?.[appPath]?.[`/${noteId}`]?.unreads ?? 0) > 0 ? 'blue' : 'gray';
return (
- <Box width='100%'>
- <Link to={url}>
+ <Box width='100%' opacity={post.pending ? '0.5' : '1'}>
+ <Link
+ to={post.pending ? '#' : url}
+ cursor={post.pending ? 'none' : 'pointer'}>
<Col
lineHeight='tall'
width='100%'
|
fix-macOS-completions-installation: additional ifs for osx directories | @@ -35,7 +35,11 @@ install (PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/install-sh-completion" DESTINATIO
if (INSTALL_SYSTEM_FILES)
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set (BASH_COMPLETION_COMPLETIONSDIR "/usr/local/share/bash-completion/completions" CACHE INTERNAL "bash completions dir")
+ else ()
set (BASH_COMPLETION_COMPLETIONSDIR "/usr/share/bash-completion/completions" CACHE INTERNAL "bash completions dir")
+ endif ()
find_package (bash-completion QUIET)
unset (bash-completion_DIR CACHE)
if (NOT BASH_COMPLETION_FOUND)
@@ -51,8 +55,11 @@ if (INSTALL_SYSTEM_FILES)
install (FILES kdb-bash-completion
DESTINATION ${BASH_COMPLETION_COMPLETIONSDIR}
RENAME kdb)
-
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+ set (FISH_COMPLETION_COMPLETIONSDIR "/usr/local/share/fish/completions")
+ else ()
set (FISH_COMPLETION_COMPLETIONSDIR "/usr/share/fish/vendor_completions.d")
+ endif ()
find_package (PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules (FISH_FOUND fish QUIET)
|
Add test to build pipeline | @@ -23,19 +23,31 @@ jobs:
solution: build/libmimalloc.sln
- upload: $(Build.SourcesDirectory)/build
artifact: windows
+
- job:
displayName: Linux
pool:
vmImage:
ubuntu-16.04
+ strategy:
+ matrix:
+ Debug:
+ CC: gcc
+ BuildType: Debug
+ Release:
+ CC: gcc
+ BuildType: Release
+
steps:
- task: CMake@1
inputs:
- workingDirectory: 'build'
+ workingDirectory: $(BuildType)
cmakeArgs: ..
- - script: make -j$(nproc) -C build
- - upload: $(Build.SourcesDirectory)/build
+ - script: make -j$(nproc) -C $(BuildType)
+ - script: ctest -C $(BuildType)
+ - upload: $(Build.SourcesDirectory)/$(BuildType)
artifact: ubuntu
+
- job:
displayName: macOS
pool:
|
Print error when write directory fails; | @@ -206,7 +206,10 @@ int lovrFilesystemSetIdentity(const char* identity) {
snprintf(state.savePathRelative, LOVR_PATH_MAX, "LOVR%s%s", sep, identity);
snprintf(state.savePathFull, LOVR_PATH_MAX, "%s%s%s", state.savePathFull, sep, state.savePathRelative);
PHYSFS_mkdir(state.savePathRelative);
- PHYSFS_setWriteDir(state.savePathRelative);
+ if (!PHYSFS_setWriteDir(state.savePathFull)) {
+ error("Could not set write directory");
+ }
+
PHYSFS_mount(state.savePathFull, NULL, 0);
return 0;
|
reduce temporary memory | @@ -417,10 +417,20 @@ static complex float* compute_psf2(int N, const long psf_dims[N + 1], unsigned l
struct linop_s* lop_fft = NULL;
- if ((NULL != lop_fftuc) && (NULL != *lop_fftuc))
+ if ((NULL != lop_fftuc) && (NULL != *lop_fftuc)) {
+
lop_fft = *lop_fftuc;
- else
- lop_fft = linop_fftc_create(ND, img2_dims, flags);
+
+ } else {
+
+ long loop_dims[ND];
+ long fft_dims[ND];
+
+ md_select_dims(ND, flags, fft_dims, img2_dims);
+ md_select_dims(ND, ~flags, loop_dims, img2_dims);
+
+ lop_fft = linop_loop_F(ND, loop_dims, linop_fftc_create(ND, fft_dims, flags));
+ }
linop_forward_unchecked(lop_fft, psft, psft);
|
bugid:16796279:http2:enlarge init remote windows size to accelerate the upload | @@ -186,7 +186,7 @@ typedef struct {
*
* The initial window size for connection level flow control.
*/
-#define NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE ((1 << 16) - 1)
+#define NGHTTP2_INITIAL_CONNECTION_WINDOW_SIZE ((1 << 24) - 1)
/**
* @macro
|
[net][sal] add socket set multicast group support and format code. | @@ -120,14 +120,28 @@ typedef uint16_t in_port_t;
#define TCP_KEEPINTVL 0x04 /* set pcb->keep_intvl - Use seconds for get/setsockopt */
#define TCP_KEEPCNT 0x05 /* set pcb->keep_cnt - Use number of probes sent for get/setsockopt */
-struct sockaddr {
+/*
+ * Options and types related to multicast membership
+ */
+#define IP_ADD_MEMBERSHIP 3
+#define IP_DROP_MEMBERSHIP 4
+
+typedef struct ip_mreq
+{
+ struct in_addr imr_multiaddr; /* IP multicast address of group */
+ struct in_addr imr_interface; /* local IP address of interface */
+} ip_mreq;
+
+struct sockaddr
+{
uint8_t sa_len;
sa_family_t sa_family;
char sa_data[14];
};
/* members are in network byte order */
-struct sockaddr_in {
+struct sockaddr_in
+{
uint8_t sin_len;
sa_family_t sin_family;
in_port_t sin_port;
@@ -136,7 +150,8 @@ struct sockaddr_in {
char sin_zero[SIN_ZERO_LEN];
};
-struct sockaddr_storage {
+struct sockaddr_storage
+{
uint8_t s2_len;
sa_family_t ss_family;
char s2_data1[2];
|
Only associate a provider with a store once it has been added to it
This means we can distinguish providers that have been added to the
store, and those which haven't yet been. | @@ -498,7 +498,6 @@ OSSL_PROVIDER *ossl_provider_new(OSSL_LIB_CTX *libctx, const char *name,
return NULL;
prov->libctx = libctx;
- prov->store = store;
#ifndef FIPS_MODULE
prov->error_lib = ERR_get_next_error_library();
#endif
@@ -530,6 +529,7 @@ int ossl_provider_add_to_store(OSSL_PROVIDER *prov, int retain_fallbacks)
ossl_provider_free(prov);
ret = 0;
}
+ prov->store = store;
if (!retain_fallbacks)
store->use_fallbacks = 0;
CRYPTO_THREAD_unlock(store->lock);
@@ -1102,7 +1102,6 @@ static int provider_activate_fallbacks(struct provider_store_st *store)
if (prov == NULL)
goto err;
prov->libctx = store->libctx;
- prov->store = store;
#ifndef FIPS_MODULE
prov->error_lib = ERR_get_next_error_library();
#endif
@@ -1113,8 +1112,12 @@ static int provider_activate_fallbacks(struct provider_store_st *store)
* we try to avoid calling a user callback while holding a lock.
* However, fallbacks are never third party providers so we accept this.
*/
- if (provider_activate(prov, 0, 0) < 0
- || sk_OSSL_PROVIDER_push(store->providers, prov) == 0) {
+ if (provider_activate(prov, 0, 0) < 0) {
+ ossl_provider_free(prov);
+ goto err;
+ }
+ prov->store = store;
+ if (sk_OSSL_PROVIDER_push(store->providers, prov) == 0) {
ossl_provider_free(prov);
goto err;
}
|
SOVERSION bump to version 2.27.0 | @@ -65,8 +65,8 @@ set(LIBYANG_MICRO_VERSION 12)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
-set(LIBYANG_MINOR_SOVERSION 26)
-set(LIBYANG_MICRO_SOVERSION 6)
+set(LIBYANG_MINOR_SOVERSION 27)
+set(LIBYANG_MICRO_SOVERSION 0)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
|
Add "trace " prefix missed out from previous commit | ,;(map (fn [form]
~(do
(def ,var ,form)
- (eprintf (string (dyn :pretty-format "%q")
+ (eprintf (string "trace "
+ (dyn :pretty-format "%q")
" is "
(dyn :pretty-format "%q"))
',form
|
CMake: move_dll works with empty arguments; | @@ -522,12 +522,12 @@ if(WIN32)
target_compile_definitions(lovr PUBLIC -Dinline=__inline -Dsnprintf=_snprintf)
endif()
- function(move_dll ARG_TARGET)
- if(TARGET ${ARG_TARGET})
+ function(move_dll)
+ if(TARGET ${ARGV0})
add_custom_command(TARGET lovr POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
- $<TARGET_FILE:${ARG_TARGET}>
- ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/$<TARGET_FILE_NAME:${ARG_TARGET}>
+ $<TARGET_FILE:${ARGV0}>
+ ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>/$<TARGET_FILE_NAME:${ARGV0}>
)
endif()
endfunction()
|
build: Add flow explanations to build.bat | @@ -77,6 +77,15 @@ for %%N in (%SUPPORTED_BUILD_SPECS%) do (
)
rem Silently exit if the build target could not be matched
+rem
+rem The reason for ignoring build target mismatch are projects
+rem like NetKVM, viostor, and vioscsi, which build different
+rem sln/vcxproj for different targets. Higher level script
+rem does not have information about specific sln/vcproj and
+rem platform bindings, therefore it invokes this script once
+rem for each sln/vcproj to make it decide when the actual build
+rem should be invoked.
+
goto :eof
rem Figure out which targets we're building
|
SR: Only run replay tests if `kdb` is available | @@ -3,6 +3,7 @@ if (ENABLE_KDB_TESTING)
SET(USE_CMAKE_KDB_COMMAND "")
if (BUILD_SHARED)
set (KDB_COMMAND "${CMAKE_BINARY_DIR}/bin/kdb")
+ set (ENABLE_REPLAY_TESTS TRUE)
elseif (BUILD_FULL)
set (KDB_COMMAND "${CMAKE_BINARY_DIR}/bin/kdb-full")
elseif (BUILD_STATIC)
@@ -74,6 +75,7 @@ if (ENABLE_KDB_TESTING)
list (APPEND SCRIPT_TESTS "selftest.esr")
endif (${PLUGIN_INDEX} EQUAL -1)
+ if (ENABLE_REPLAY_TESTS)
file (GLOB REPLAY_TESTS replay_tests/*.esr)
foreach (file ${REPLAY_TESTS})
get_filename_component (directory ${file} DIRECTORY)
@@ -86,6 +88,7 @@ if (ENABLE_KDB_TESTING)
)
set_property(TEST testshell_replay_${name_without_extension} PROPERTY LABELS memleak kdbtests)
endforeach (file ${SCRIPT_TESTS})
+ endif (ENABLE_REPLAY_TESTS)
endif (NOT (${ASAN_LINUX} AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5))
add_subdirectory (tutorial_wrapper)
|
restore plainClient | @@ -4,17 +4,12 @@ import (
"bufio"
"fmt"
"net/http"
- "os"
)
func main() {
- fd, err := os.Open(".")
- fmt.Println(fd)
-
resp, err := http.Get("http://cribl.io")
if err != nil {
-
panic(err)
}
defer resp.Body.Close()
|
Hii: Fix for incorrect password prompt not showing up
In HII when security state is locked | @@ -2413,6 +2413,7 @@ SetSecurityState(
)
{
EFI_STATUS ReturnCode = EFI_UNSUPPORTED;
+ EFI_STATUS TempReturnCode = EFI_UNSUPPORTED;
DIMM *pDimms[MAX_DIMMS];
UINT32 DimmsNum = 0;
UINT16 PayloadBufferSize = 0;
@@ -2693,6 +2694,7 @@ SetSecurityState(
NVDIMM_DBG("Failed on SetDimmSecurityState, ReturnCode=" FORMAT_EFI_STATUS "", ReturnCode);
if (ReturnCode == EFI_ACCESS_DENIED) {
SetObjStatusForDimm(pCommandStatus, pDimms[Index], NVM_ERR_INVALID_PASSPHRASE);
+ goto Finish;
} else {
SetObjStatusForDimm(pCommandStatus, pDimms[Index], NVM_ERR_OPERATION_FAILED);
}
@@ -2734,9 +2736,9 @@ SetSecurityState(
Finish:
if (SecurityOperation == SECURITY_OPERATION_UNLOCK_DEVICE) {
- ReturnCode = ReenumerateNamespacesAndISs();
- if (EFI_ERROR(ReturnCode)) {
- NVDIMM_DBG("Unable to re-enumerate namespace on unlocked DIMMs. ReturnCode=" FORMAT_EFI_STATUS "", ReturnCode);
+ TempReturnCode = ReenumerateNamespacesAndISs();
+ if (EFI_ERROR(TempReturnCode)) {
+ NVDIMM_DBG("Unable to re-enumerate namespace on unlocked DIMMs. ReturnCode=" FORMAT_EFI_STATUS "", TempReturnCode);
}
}
|
test/recipes/81-test_cmp_cli.t: use app() rather than cmd()
Fixes | @@ -28,7 +28,7 @@ plan skip_all => "These tests are not supported in a fuzz build"
plan skip_all => "These tests are not supported in a no-cmp build"
if disabled("cmp");
-my $app = bldtop_dir("apps/openssl cmp");
+my @app = qw(openssl cmp);
my @cmp_basic_tests = (
[ "show help", [ "-help" ], 1 ],
@@ -53,7 +53,7 @@ foreach (@cmp_basic_tests) {
my $title = $$_[0];
my $params = $$_[1];
my $expected = $$_[2];
- ok($expected == run(cmd([$app, "-config", '', @$params])),
+ ok($expected == run(app([@app, "-config", '', @$params])),
$title);
}
@@ -66,7 +66,7 @@ foreach (@cmp_server_tests) {
my $rsp_cert = srctop_file('test', 'certs', 'ee-cert-1024.pem');
my $outfile = result_file("test.certout.pem");
ok($expected ==
- run(cmd([$app, "-config", '', @$extra_args,
+ run(app([@app, "-config", '', @$extra_args,
"-use_mock_srv", "-srv_ref", "mock server",
"-srv_secret", $secret,
"-rsp_cert", $rsp_cert,
|
Test single stray ] doesn't close a CDATA section
Also uses multi-byte characters around the ] to exercise more code. | @@ -5996,6 +5996,16 @@ START_TEST(test_utf8_in_cdata_section)
}
END_TEST
+/* Test that little-endian UTF-16 in a CDATA section is handled */
+START_TEST(test_utf8_in_cdata_section_2)
+{
+ const char *text = "<doc><![CDATA[\xc3\xa9]\xc3\xa9two]]></doc>";
+ const XML_Char *expected = "\xc3\xa9]\xc3\xa9two";
+
+ run_character_check(text, expected);
+}
+END_TEST
+
/*
* Namespaces tests.
*/
@@ -11317,6 +11327,7 @@ make_suite(void)
tcase_add_test(tc_basic, test_ext_entity_utf16_unknown);
tcase_add_test(tc_basic, test_ext_entity_utf8_non_bom);
tcase_add_test(tc_basic, test_utf8_in_cdata_section);
+ tcase_add_test(tc_basic, test_utf8_in_cdata_section_2);
suite_add_tcase(s, tc_namespace);
tcase_add_checked_fixture(tc_namespace,
|
fixed segmentation fault on big PMKID hashes | @@ -1311,7 +1311,7 @@ if(testzeroedpmkid(macclient, macap, pmkid) == false)
exit(EXIT_FAILURE);
}
pmkidlist = pmkidlistnew;
- pmkidlistptr = pmkidlistnew +maclistmax;
+ pmkidlistptr = pmkidlistnew +pmkidlistmax;
pmkidlistmax += PMKIDLIST_MAX;
}
memset(pmkidlistptr, 0, PMKIDLIST_SIZE);
|
Remove library suffix fix for C# on macOS | @@ -1236,16 +1236,6 @@ function(tinyspline_add_swig_library)
)
endif()
endif()
- # Fix library suffix for C# on macOS.
- if(${ARGS_LANG} STREQUAL "csharp" AND ${TINYSPLINE_PLATFORM_NAME} STREQUAL
- "macosx"
- )
- set_property(
- TARGET ${ARGS_TARGET}
- APPEND
- PROPERTY SUFFIX ".dylib"
- )
- endif()
# Fix library suffix for Ruby on Windows.
if(${ARGS_LANG} STREQUAL "ruby" AND ${TINYSPLINE_PLATFORM_IS_WINDOWS})
set_property(
|
test: add platon test case test_004ParametersInit_0008TxInitFailureRecipientErrorHexFormat
fix the issue
teambition task id | @@ -211,6 +211,23 @@ START_TEST(test_004ParametersInit_0007TxInitSuccessGasLimitHexNullOx)
}
END_TEST
+START_TEST(test_004ParametersInit_0008TxInitFailureRecipientErrorHexFormat)
+{
+ BSINT32 rtnVal;
+ BoatPlatONTx tx_ptr;
+
+ BoatIotSdkInit();
+
+ rtnVal = platonWalletPrepare();
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+
+ rtnVal = BoatPlatONTxInit(g_platon_wallet_ptr, &tx_ptr, TEST_IS_SYNC_TX, TEST_GAS_PRICE,
+ TEST_GAS_LIMIT, "0xABCDG", hrp);
+ ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT);
+ BoatIotSdkDeInit();
+}
+END_TEST
+
Suite *make_parameters_suite(void)
{
/* Create Suite */
@@ -232,6 +249,7 @@ Suite *make_parameters_suite(void)
tcase_add_test(tc_param_api, test_004ParametersInit_0005TxInitSuccessGasPriceHexNullOx);
tcase_add_test(tc_param_api, test_004ParametersInit_0006TxInitFailureGasLimitErrorHexFormat);
tcase_add_test(tc_param_api, test_004ParametersInit_0007TxInitSuccessGasLimitHexNullOx);
+ tcase_add_test(tc_param_api, test_004ParametersInit_0008TxInitFailureRecipientErrorHexFormat);
return s_param;
}
\ No newline at end of file
|
ci/cd: retaining config.h.in as artifact from build stage | @@ -12,7 +12,7 @@ compile:
- ./configure --enable-strict
- make -j4
artifacts: # save output objects for test stages
- paths: [makefile, configure, config.h]
+ paths: [makefile, configure, config.h, config.h.in]
# run all test programs
check:
|
correct the cmake options for building comgr | @@ -80,15 +80,25 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
$SUDO rm -rf $BUILD_AOMP/build/comgr
export LLVM_DIR=$AOMP_INSTALL_DIR
export Clang_DIR=$AOMP_INSTALL_DIR
- MYCMAKEOPTS="-DCMAKE_INSTALL_PREFIX=$INSTALL_COMGR -DCMAKE_BUILD_TYPE=$BUILDTYPE $AOMP_ORIGIN_RPATH -DLLVM_BUILD_MAIN_SRC_DIR=$AOMP_REPOS/$AOMP_PROJECT_REPO_NAME/llvm -DLLVM_DIR=$AOMP_INSTALL_DIR -DClang_DIR=$AOMP_INSTALL_DIR -DAMD_COMGR_BUILD_NO_ROCM=ON -DCMAKE_PREFIX_PATH=$AOMP/lib/cmake"
+
mkdir -p $BUILD_AOMP/build/comgr
cd $BUILD_AOMP/build/comgr
echo " -----Running comgr cmake ---- "
- echo ${AOMP_CMAKE} $MYCMAKEOPTS $AOMP_REPOS/$AOMP_COMGR_REPO_NAME/lib/comgr
- ${AOMP_CMAKE} $MYCMAKEOPTS $AOMP_REPOS/$AOMP_COMGR_REPO_NAME/lib/comgr
+
+ DEVICELIBS_BUILD_PATH=$AOMP_REPOS/build/AOMP_LIBDEVICE_REPO_NAME
+ PACKAGE_ROOT=$AOMP_REPOS/$AOMP_COMGR_REPO_NAME/lib/comgr
+ ${AOMP_CMAKE} \
+ -DCMAKE_PREFIX_PATH="$AOMP/include;$AOMP/lib/cmake;$DEVICELIBS_BUILD_PATH;$PACKAGE_ROOT" \
+ -DCMAKE_INSTALL_PREFIX=$INSTALL_COMGR \
+ -DCMAKE_BUILD_TYPE=$BUILDTYPE \
+ $AOMP_ORIGIN_RPATH \
+ -DROCM_DIR=$AOMP_INSTALL_DIR \
+ -DLLVM_DIR=$AOMP_INSTALL_DIR \
+ -DClang_DIR=$AOMP_INSTALL_DIR \
+ $AOMP_REPOS/$AOMP_COMGR_REPO_NAME/lib/comgr
+
if [ $? != 0 ] ; then
echo "ERROR comgr cmake failed. cmake flags"
- echo " $MYCMAKEOPTS"
exit 1
fi
|
fixed format char | @@ -291,7 +291,7 @@ int elektraJniOpen (Plugin * handle, Key * errorKey)
jmethodID midPluginConstructor = (*data->env)->GetMethodID (data->env, data->clsPlugin, "<init>", "()V");
if (midPluginConstructor == 0)
{
- ELEKTRA_SET_RESOURCE_ERRORF (errorKey, "Cannot find Java constructor of plugin %c", classname);
+ ELEKTRA_SET_RESOURCE_ERRORF (errorKey, "Cannot find Java constructor of plugin %s", classname);
return -1;
}
@@ -299,7 +299,7 @@ int elektraJniOpen (Plugin * handle, Key * errorKey)
checkException (data, "creating plugin", errorKey);
if (data->plugin == 0)
{
- ELEKTRA_SET_PLUGIN_MISBEHAVIOR_ERRORF (errorKey, "Cannot create Java plugin %c", classname);
+ ELEKTRA_SET_PLUGIN_MISBEHAVIOR_ERRORF (errorKey, "Cannot create Java plugin %s", classname);
return -1;
}
|
Switch to %fits for kelp testing. | rep/(list line)
==
|- ^- hoon
+ :: tup: tuple matching this line
+ ::
+ =/ tup/crib [%tupl p.one q.one ~]
:: if no other choices, construct head
::
- ?~ rep relative:clear(mod [%tupl p.one q.one ~])
+ ?~ rep relative:clear(mod tup)
:: fin: loop completion
::
=/ fin/hoon $(one i.rep, rep t.rep)
:^ %wtcl
:: test if the head matches this wing
::
- [%wtts p.one fetch-wing(axe (peg axe 2))]
+ :+ %fits
+ [%tsgl [%$ 2] example:clear(mod tup)]
+ fetch-wing(axe (peg axe 2))
:: if so, use this form
::
:- [%rock p.p.one q.p.one]
|
rand: don't leak memory | @@ -111,7 +111,7 @@ static int seed_src_generate(void *vseed, unsigned char *out, size_t outlen,
entropy_available = ossl_pool_acquire_entropy(pool);
if (entropy_available > 0)
- memcpy(out, rand_pool_detach(pool), rand_pool_length(pool));
+ memcpy(out, rand_pool_buffer(pool), rand_pool_length(pool));
rand_pool_free(pool);
return entropy_available > 0;
|
Tests: unitd stderr output redirected to unit.log.
A part of the debug log was printed to stderr before the log file was opened.
Now, this output is redirected to the same log file. | @@ -209,8 +209,7 @@ class TestUnit(unittest.TestCase):
os.mkdir(self.testdir + '/state')
- print()
-
+ with open(self.testdir + '/unit.log', 'w') as log:
self._p = subprocess.Popen(
[
self.unitd,
@@ -220,7 +219,8 @@ class TestUnit(unittest.TestCase):
'--pid', self.testdir + '/unit.pid',
'--log', self.testdir + '/unit.log',
'--control', 'unix:' + self.testdir + '/control.unit.sock',
- ]
+ ],
+ stderr=log,
)
if not self.waitforfiles(self.testdir + '/control.unit.sock'):
|
Fix missing appcontainer names for some service processes | @@ -449,6 +449,32 @@ PPH_STRING PhGetAppContainerName(
appContainerName = PhCreateString(packageMonikerName);
AppContainerFreeMemory_I(packageMonikerName);
}
+ else // Check the local system account appcontainer mappings. (dmex)
+ {
+ static PH_STRINGREF appcontainerMappings = PH_STRINGREF_INIT(L"Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\CurrentVersion\\AppContainer\\Mappings\\");
+ static PH_STRINGREF appcontainerDefaultMappings = PH_STRINGREF_INIT(L".DEFAULT\\");
+ HANDLE keyHandle;
+ PPH_STRING sidString;
+ PPH_STRING keyPath;
+
+ sidString = PhSidToStringSid(AppContainerSid);
+ keyPath = PhConcatStringRef3(&appcontainerDefaultMappings, &appcontainerMappings, &sidString->sr);
+
+ if (NT_SUCCESS(PhOpenKey(
+ &keyHandle,
+ KEY_READ,
+ PH_KEY_USERS,
+ &keyPath->sr,
+ 0
+ )))
+ {
+ PhMoveReference(&appContainerName, PhQueryRegistryString(keyHandle, L"Moniker"));
+ NtClose(keyHandle);
+ }
+
+ PhDereferenceObject(keyPath);
+ PhDereferenceObject(sidString);
+ }
return appContainerName;
}
@@ -481,6 +507,7 @@ PPH_STRING PhGetAppContainerPackageName(
)
{
static PH_STRINGREF appcontainerMappings = PH_STRINGREF_INIT(L"Software\\Classes\\Local Settings\\Software\\Microsoft\\Windows\\CurrentVersion\\AppContainer\\Mappings\\");
+ static PH_STRINGREF appcontainerDefaultMappings = PH_STRINGREF_INIT(L".DEFAULT\\");
HANDLE keyHandle;
PPH_STRING sidString;
PPH_STRING keyPath;
@@ -509,6 +536,27 @@ PPH_STRING PhGetAppContainerPackageName(
}
PhDereferenceObject(keyPath);
+
+ // Check the local system account appcontainer mappings. (dmex)
+ if (PhIsNullOrEmptyString(packageName))
+ {
+ keyPath = PhConcatStringRef3(&appcontainerDefaultMappings, &appcontainerMappings, &sidString->sr);
+
+ if (NT_SUCCESS(PhOpenKey(
+ &keyHandle,
+ KEY_READ,
+ PH_KEY_USERS,
+ &keyPath->sr,
+ 0
+ )))
+ {
+ PhMoveReference(&packageName, PhQueryRegistryString(keyHandle, L"Moniker"));
+ NtClose(keyHandle);
+ }
+
+ PhDereferenceObject(keyPath);
+ }
+
PhDereferenceObject(sidString);
return packageName;
|
board/yorp/led.c: Format with clang-format
BRANCH=none
TEST=none | @@ -20,17 +20,26 @@ __override const int led_charge_lvl_2 = 100;
/* Yorp: Note there is only LED for charge / power */
__override struct led_descriptor
led_bat_state_table[LED_NUM_STATES][LED_NUM_PHASES] = {
- [STATE_CHARGING_LVL_1] = {{EC_LED_COLOR_BLUE, 2 * LED_ONE_SEC},
- {EC_LED_COLOR_AMBER, 2 * LED_ONE_SEC} },
- [STATE_CHARGING_LVL_2] = {{EC_LED_COLOR_AMBER, LED_INDEFINITE} },
- [STATE_CHARGING_FULL_CHARGE] = {{EC_LED_COLOR_BLUE, LED_INDEFINITE} },
- [STATE_DISCHARGE_S0] = {{EC_LED_COLOR_BLUE, LED_INDEFINITE} },
- [STATE_DISCHARGE_S3] = {{EC_LED_COLOR_AMBER, 1 * LED_ONE_SEC},
+ [STATE_CHARGING_LVL_1] = { { EC_LED_COLOR_BLUE,
+ 2 * LED_ONE_SEC },
+ { EC_LED_COLOR_AMBER,
+ 2 * LED_ONE_SEC } },
+ [STATE_CHARGING_LVL_2] = { { EC_LED_COLOR_AMBER,
+ LED_INDEFINITE } },
+ [STATE_CHARGING_FULL_CHARGE] = { { EC_LED_COLOR_BLUE,
+ LED_INDEFINITE } },
+ [STATE_DISCHARGE_S0] = { { EC_LED_COLOR_BLUE,
+ LED_INDEFINITE } },
+ [STATE_DISCHARGE_S3] = { { EC_LED_COLOR_AMBER,
+ 1 * LED_ONE_SEC },
{ LED_OFF, 3 * LED_ONE_SEC } },
[STATE_DISCHARGE_S5] = { { LED_OFF, LED_INDEFINITE } },
- [STATE_BATTERY_ERROR] = {{EC_LED_COLOR_BLUE, 2 * LED_ONE_SEC},
- {EC_LED_COLOR_AMBER, 2 * LED_ONE_SEC} },
- [STATE_FACTORY_TEST] = {{EC_LED_COLOR_BLUE, LED_INDEFINITE} },
+ [STATE_BATTERY_ERROR] = { { EC_LED_COLOR_BLUE,
+ 2 * LED_ONE_SEC },
+ { EC_LED_COLOR_AMBER,
+ 2 * LED_ONE_SEC } },
+ [STATE_FACTORY_TEST] = { { EC_LED_COLOR_BLUE,
+ LED_INDEFINITE } },
};
BUILD_ASSERT(ARRAY_SIZE(led_bat_state_table) == LED_NUM_STATES);
|
Accel: fix POCL_DEBUG opt to use POCL_MSG_PRINT_ACCEL | +#include <ctype.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
-#include <stdarg.h>
#include "pocl_cl.h"
#include "pocl_debug.h"
@@ -41,6 +41,9 @@ static pocl_lock_t console_mutex;
}
/* else parse */
char* tokenize = strdup (debug);
+ for(int i =0; i < strlen (tokenize); i++){
+ tokenize[i] = tolower(tokenize[i]);
+ }
char* ptr = NULL;
ptr = strtok (tokenize, ",");
@@ -80,6 +83,8 @@ static pocl_lock_t console_mutex;
pocl_debug_messages_filter |= POCL_DEBUG_FLAG_ALL;
else if (strncmp (ptr, "err", 3) == 0)
pocl_debug_messages_filter |= POCL_DEBUG_FLAG_ERROR;
+ else if (strncmp (ptr, "accel", 5) == 0)
+ pocl_debug_messages_filter |= POCL_DEBUG_FLAG_ACCEL;
else
POCL_MSG_WARN ("Unknown token in POCL_DEBUG env var: %s", ptr);
|
Fix logical -> bitwise boolean operator in backup unit test.
This unset more than the storageFeatureCompress flag but the test was not affected.
Found on MacOS M1. | @@ -539,7 +539,7 @@ testRun(void)
// With the expected backupCopyResultCopy, unset the storageFeatureCompress bit for the storageRepo for code coverage
uint64_t feature = storageRepo()->interface.feature;
- ((Storage *)storageRepo())->interface.feature = feature && ((1 << storageFeatureCompress) ^ 0xFFFFFFFFFFFFFFFF);
+ ((Storage *)storageRepo())->interface.feature = feature & ((1 << storageFeatureCompress) ^ 0xFFFFFFFFFFFFFFFF);
// Create tmp file to make it look like a prior backup file failed partway through to ensure that retries work
TEST_RESULT_VOID(
|
u3: adds comments to inner hashtable struct definitions | /* u3h_node: map node.
*/
typedef struct {
- c3_w map_w;
- u3h_slot sot_w[0];
+ c3_w map_w; // bitmap for [sot_w]
+ u3h_slot sot_w[0]; // filled slots
} u3h_node;
/* u3h_root: hash root table
/* u3h_buck: bottom bucket.
*/
typedef struct {
- c3_w len_w;
- u3h_slot sot_w[0];
+ c3_w len_w; // length of [sot_w]
+ u3h_slot sot_w[0]; // filled slots
} u3h_buck;
/** HAMT macros.
|
esp32/modsocket: Raise an exception if socket.connect did not succeed. | @@ -151,7 +151,10 @@ STATIC mp_obj_t socket_connect(const mp_obj_t arg0, const mp_obj_t arg1) {
_socket_getaddrinfo(arg1, &res);
int r = lwip_connect(self->fd, res->ai_addr, res->ai_addrlen);
lwip_freeaddrinfo(res);
- return mp_obj_new_int(r);
+ if (r != 0) {
+ exception_from_errno(errno);
+ }
+ return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(socket_connect_obj, socket_connect);
|
[snitch] Fix address handling in `axi_adapter` | @@ -77,7 +77,7 @@ module snitch_axi_adapter #(
write_t write_data_in;
write_t write_data_out;
- assign axi_req_o.aw.addr = {slv_qaddr_i[$bits(axi_req_o.aw.addr)-1:AxiByteOffset],{AxiByteOffset{1'b0}}};
+ assign axi_req_o.aw.addr = slv_qaddr_i;
assign axi_req_o.aw.prot = 3'b0;
assign axi_req_o.aw.region = 4'b0;
assign axi_req_o.aw.size = slv_qsize_i;
|
ames: ignore pki nponsorship loss | event-core
:: +on-publ-sponsor: handle new or lost sponsor for peer
::
- :: TODO: handle sponsor loss
+ :: TODO: really handle sponsor loss
::
++ on-publ-sponsor
|= [=ship sponsor=(unit ship)]
^+ event-core
::
?~ sponsor
- ~| %ames-lost-sponsor^our^ship !!
+ %- (slog leaf+"ames: {(scow %p ship)} lost sponsor, ignoring" ~)
+ event-core
::
=/ state=(unit peer-state) (get-peer-state ship)
?~ state
|
Add test of mod_wsgi-standalone. | @@ -22,11 +22,8 @@ jobs:
- name: "Store built packages"
uses: actions/upload-artifact@v2
with:
- name: files
- path: |
- dist/*
- scripts/*
- tests/*
+ name: dist
+ path: dist/*
tests:
name: "Test mod_wsgi package (Python ${{ matrix.python-version }})"
@@ -38,24 +35,30 @@ jobs:
matrix:
python-version: ["2.7", "3.5", "3.6", "3.7", "3.8", "3.9", "3.10-dev"]
steps:
+ - uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Download built packages"
uses: actions/download-artifact@v2
with:
- name: files
- path: |
- dist
- scripts
- tests
+ name: dist
+ path: dist
- name: "Install Apache package"
run: sudo apt install -y apache2-dev
- name: "Update pip installation"
run: python -m pip install --upgrade pip setuptools wheel
- - name: "Install mod_wsgi-express"
+ - name: "Install mod_wsgi"
+ run: python -m pip install --verbose dist/mod_wsgi-[0-9].*.tar.gz
+ - name: "Run mod_wsgi-express test #1"
+ run: scripts/run-single-test.sh
+ - name: "Uninstall mod_wsgi"
+ run: pip uninstall mod_wsgi
+ - name: "Install mod_wsgi-standalone"
run: python -m pip install --verbose dist/mod_wsgi-[0-9].*.tar.gz
- - name: "Run mod_wsgi-express test"
+ - name: "Run mod_wsgi-express test #2"
run: scripts/run-single-test.sh
+ - name: "Uninstall mod_wsgi-standalone"
+ run: pip uninstall mod_wsgi-standalone
- name: "Verify configure/make/make install"
run: ./configure && make && sudo make install
|
ikev2: cleanup tunnels after subsequent sa-init
Type: fix | @@ -1951,6 +1951,8 @@ ikev2_generate_message (ikev2_sa_t * sa, ike_header_t * ike, void *user)
ikev2_payload_add_sa (chain, sa->childs[0].i_proposals);
ikev2_payload_add_ts (chain, sa->childs[0].tsi, IKEV2_PAYLOAD_TSI);
ikev2_payload_add_ts (chain, sa->childs[0].tsr, IKEV2_PAYLOAD_TSR);
+ ikev2_payload_add_notify (chain, IKEV2_NOTIFY_MSG_INITIAL_CONTACT,
+ 0);
}
else
{
@@ -3184,6 +3186,7 @@ ikev2_initiate_sa_init (vlib_main_t * vm, u8 * name)
sa.state = IKEV2_STATE_SA_INIT;
sa.tun_itf = p->tun_itf;
sa.is_tun_itf_set = 1;
+ sa.initial_contact = 1;
ikev2_generate_sa_init_data (&sa);
ikev2_payload_add_ke (chain, sa.dh_group, sa.i_dh_data);
ikev2_payload_add_nonce (chain, sa.i_nonce);
@@ -3263,6 +3266,8 @@ ikev2_initiate_sa_init (vlib_main_t * vm, u8 * name)
vec_add (sa.childs[0].tsi, &p->loc_ts, 1);
vec_add (sa.childs[0].tsr, &p->rem_ts, 1);
+ ikev2_initial_contact_cleanup (&sa);
+
/* add SA to the pool */
ikev2_sa_t *sa0 = 0;
pool_get (km->sais, sa0);
|
recipes/90-test_shlibload.t: disable tests on AIX till further notice. | @@ -19,6 +19,7 @@ use lib bldtop_dir('.');
use configdata;
plan skip_all => "Test only supported in a shared build" if disabled("shared");
+plan skip_all => "Test is disabled on AIX" if config('target') =~ m|^aix|;
plan tests => 4;
|
Update PhGetJsonArrayString flags | static json_object_ptr json_get_object(
_In_ json_object_ptr rootObj,
- _In_ const PSTR key
+ _In_ PSTR key
)
{
json_object_ptr returnObj;
@@ -86,6 +86,13 @@ PVOID PhCreateJsonObject(
return json_object_new_object();
}
+PVOID PhCreateJsonStringObject(
+ _In_ PSTR Value
+ )
+{
+ return json_object_new_string(Value);
+}
+
PVOID PhGetJsonObject(
_In_ PVOID Object,
_In_ PSTR Key
@@ -134,6 +141,15 @@ BOOLEAN PhGetJsonObjectBool(
return json_object_get_boolean(json_get_object(Object, Key)) == TRUE;
}
+VOID PhAddJsonObjectValue(
+ _In_ PVOID Object,
+ _In_ PSTR Key,
+ _In_ PVOID Value
+ )
+{
+ json_object_object_add(Object, Key, Value);
+}
+
VOID PhAddJsonObject(
_In_ PVOID Object,
_In_ PSTR Key,
@@ -182,9 +198,9 @@ PPH_STRING PhGetJsonArrayString(
{
PCSTR value;
- if (value = json_object_get_string(Object)) // json_object_to_json_string_ext(Object, JSON_C_TO_STRING_PLAIN))
+ if (value = json_object_to_json_string_ext(Object, JSON_C_TO_STRING_PLAIN)) // json_object_get_string(Object))
return PhConvertUtf8ToUtf16((PSTR)value);
- else
+
return NULL;
}
|
application paper | @@ -139,5 +139,8 @@ Compressed Sensing MRI Reconstruction on Intel HARPv2.
Computing Machines (FCCM), San Diego, CA, USA, 2019, pp. 254-257.
doi: 10.1109/FCCM.2019.00041
-
+Smith DS, Sengupta S, Smith SA, Welch EB.
+Trajectory optimized NUFFT: Faster non-Cartesian MRI reconstruction through
+prior knowledge and parallel architectures.
+Magn Reson Med 2019; 81:2064-2071.
|
Fix straggler
contrib/pgcrypto did contain an unedited fall-through marker after all. | @@ -169,7 +169,7 @@ pgp_get_keyid(MBuf *pgp_data, char *dst)
break;
case PGP_PKT_SYMENCRYPTED_SESSKEY:
got_symenc_key++;
- /* fall through */
+ /* FALLTHROUGH */
case PGP_PKT_SIGNATURE:
case PGP_PKT_MARKER:
case PGP_PKT_TRUST:
|
gpcheckcloud: use strncpy() to set eolString
string overflow won't happen here because gpcheckcloud_newline was
checked before, but still, strncpy() looks better. | @@ -206,7 +206,8 @@ static bool downloadS3(const char *urlWithOptions) {
return false;
}
- strcpy(eolString, reader->getParams().getGpcheckcloud_newline().c_str());
+ strncpy(eolString, reader->getParams().getGpcheckcloud_newline().c_str(), EOL_CHARS_MAX_LEN);
+ eolString[EOL_CHARS_MAX_LEN] = '\0';
do {
data_len = BUF_SIZE;
|
gall: include sub-nonce in unsubscribe wire | ?: ?=([* %pass * %g %deal * * %leave *] move)
=/ =wire p.move.move
?> ?=([%use @ @ %out @ @ *] wire)
- =/ sub-wire t.t.t.t.t.t.wire
=/ =dock [q.p q]:q.move.move
+ =/ sys-wire=^wire (scag 6 `^wire`wire)
+ =/ sub-wire=^wire (slag 6 `^wire`wire)
+ ::
+ ?. (~(has by outbound.watches.yoke) sub-wire dock)
+ =. ap-core
+ =/ =tang
+ :~ leaf+"got %leave for missing subscription"
+ >agent-name< >sub-wire< >dock<
+ ==
+ (ap-error %leave-missing-subscription tang)
+ $(moves t.moves)
+ =/ have=[acked=? =path nonce=@]
+ (~(got by outbound.watches.yoke) sub-wire dock)
+ =. p.move.move
+ (weld sys-wire [(scot %ud nonce.have) sub-wire])
=. outbound.watches.yoke
(~(del by outbound.watches.yoke) [sub-wire dock])
$(moves t.moves, new-moves [move new-moves])
|
document required libraries for CentOS 7 | @@ -81,6 +81,18 @@ To install the required libraries on Debian and Ubuntu run:
install version 0.5.2 of the ISMRMRD library
+To install the required libraries on Redhat / Centos run:
+
+ $ sudo yum install devtoolset-8 atlas-devel fftw3-devel libpng-devel lapack-devel
+
+It may be required to install support for software collections (for Centos):
+
+ $ sudo yum install centos-release-scl
+
+To enable gcc 8 and start a bash shell run:
+
+ $ scl enable devtoolset-8 bash
+
### 2.1.2. Mac OS X
|
test(adc2): temporary ignore adc2 unit test (with WiFi) to pass the CI.
the issue is introduced in commit | @@ -40,7 +40,7 @@ static esp_err_t event_handler(void *ctx, system_event_t *event)
return ESP_OK;
}
-TEST_CASE("adc2 work with wifi","[adc]")
+TEST_CASE("adc2 work with wifi","[adc][ignore]")
{
int read_raw;
int target_value;
|
#define T_AXIS | #include "joysticks.h"
#include "openbor.h"
+#define T_AXIS 7000
+
SDL_Joystick *joystick[JOY_LIST_TOTAL]; // SDL struct for joysticks
static int usejoy; // To be or Not to be used?
@@ -194,8 +196,8 @@ void getPads(Uint8* keystate, Uint8* keystate_def)
{
int axisfirst = 1 + i * JOY_MAX_INPUTS + joysticks[i].NumButtons + 2*ev.jaxis.axis;
x = (joysticks[i].Axes >> (2*ev.jaxis.axis)) & 0x03; // previous state of axis
- if(ev.jaxis.value < -7000 && !(x & 0x01)) lastjoy = axisfirst;
- if(ev.jaxis.value > +7000 && !(x & 0x02)) lastjoy = axisfirst + 1;
+ if(ev.jaxis.value < -1*T_AXIS && !(x & 0x01)) lastjoy = axisfirst;
+ if(ev.jaxis.value > T_AXIS && !(x & 0x02)) lastjoy = axisfirst + 1;
//if(lastjoy) fprintf(stderr, "SDL_JOYAXISMOTION - Joystick %i Axis %i = Position %i (Index %i)\n", i, ev.jaxis.axis, ev.jaxis.value, lastjoy);
}
}
@@ -221,8 +223,8 @@ void getPads(Uint8* keystate, Uint8* keystate_def)
for(j=0; j<joysticks[i].NumAxes; j++)
{
axis = SDL_JoystickGetAxis(joystick[i], j);
- if(axis < -7000) { joysticks[i].Axes |= 0x01 << (j*2); }
- if(axis > +7000) { joysticks[i].Axes |= 0x02 << (j*2); }
+ if(axis < -1*T_AXIS) { joysticks[i].Axes |= 0x01 << (j*2); }
+ if(axis > T_AXIS) { joysticks[i].Axes |= 0x02 << (j*2); }
}
// check hats
|
docs: add binary api trace replay details
Folks need to know that they MUST carefully control the set of plugins
to avoid feeding messages to the wrong binary API message handlers. | @@ -182,6 +182,80 @@ and `src/vlibapi/api_shared.c
<https://docs.fd.io/vpp/18.11/d6/dd1/api__shared_8c.html>`_. See also
the debug CLI command "api trace"
+API trace replay caveats
+________________________
+
+The vpp instance which replays a binary API trace must have the same
+message-ID numbering space as the vpp instance which captured the
+trace. The replay instance **must** load the same set of plugins as
+the capture instance. Otherwise, API messages will be processed by the
+**wrong** API message handlers!
+
+Always start vpp with command-line arguments which include an
+"api-trace on" stanza, so vpp will start tracing binary API messages
+from the beginning:
+
+.. code-block:: console
+
+ api-trace {
+ on
+ }
+
+Given a binary api trace in /tmp/api_trace, do the following to work
+out the set of plugins:
+
+.. code-block:: console
+
+ DBGvpp# api trace custom-dump /tmp/api_trace
+ vl_api_trace_plugin_msg_ids: abf_54307ba2 first 846 last 855
+ vl_api_trace_plugin_msg_ids: acl_0d7265b0 first 856 last 893
+ vl_api_trace_plugin_msg_ids: cdp_8f707b96 first 894 last 895
+ vl_api_trace_plugin_msg_ids: flowprobe_f2f0286c first 898 last 901
+ <etc>
+
+Here, we see the "abf," "acl," "cdp," and "flowprobe" plugins. Use the
+list of plugins to construct a matching "plugins" command-line argument
+stanza:
+
+.. code-block:: console
+
+ plugins {
+ ## Disable all plugins, selectively enable specific plugins
+ plugin default { disable }
+ plugin abf_plugin.so { enable }
+ plugin acl_plugin.so { enable }
+ plugin cdp_plugin.so { enable }
+ plugin flowprobe_plugin.so { enable }
+ }
+
+To begin with, use the same vpp image that captured a trace to replay
+it. It's perfectly fair to rebuild the vpp replay instance, to add
+scaffolding to facilitate setting gdb breakpoints on complex
+conditions or similar.
+
+API trace interface issues
+__________________________
+
+Along the same lines, it may be necessary to manufacture [simulated]
+physical interfaces so that an API trace will replay correctly. "show
+interface" on the trace origin system can help. An API trace
+"custom-dump" as shown above may make it obvious how many loopback
+interfaces to create. If you see vhost interfaces being created and
+then configured, the first such configuration message in the trace
+will tell you how many physical interfaces were involved.
+
+.. code-block:: console
+
+ SCRIPT: create_vhost_user_if socket /tmp/foosock server
+ SCRIPT: sw_interface_set_flags sw_if_index 3 admin-up
+
+In this case, it's fair to guess that one needs to create two loopback
+interfaces to "help" the trace replay correctly.
+
+These issues can be mitigated to a certain extent by replaying the
+trace on the system which created it, but in a field debug case that's
+not a realistic.
+
Client connection details
_________________________
|
bump dctl in ya tool | },
"dctl": {
"formula": {
- "sandbox_id": [461023202],
+ "sandbox_id": [482552142],
"match": "dctl"
},
"executable": {
|
Fix gettable for lua versions below 5.3 | @@ -281,9 +281,7 @@ gettable :: StackIndex -> Lua LTYPE
gettable n = liftLua $ \l ->
toEnum . fromIntegral <$> lua_gettable l (fromStackIndex n)
#else
-gettable n = liftLua $ \l -> do
- lua_gettable l (fromStackIndex n)
- ltype (-1)
+gettable n = (liftLua $ \l -> lua_gettable l (fromStackIndex n)) *> ltype (-1)
#endif
-- | Returns the index of the top element in the stack. Because indices start at
|
Fix
Skip leading BOM in XML document | @@ -74,6 +74,7 @@ static const char *CDSTART = "<![CDATA[";
static const char *CDEND = "]]>";
static const char *DEC_NUMBERS = "0123456789";
static const char *HEX_NUMBERS = "0123456789ABCDEFabcdef";
+static const char *UTF8_BOM = "\xef\xbb\xbf";
typedef struct char_info
{
@@ -591,6 +592,19 @@ static int Parser_skipString(
return IXML_SUCCESS;
}
+/*!
+ * \brief Skip UTF-8 byte order mark
+ */
+static void Parser_skipBom(
+ /*! [in] The XML parser. */
+ Parser *xmlParser)
+{
+ size_t bom_len = strlen(UTF8_BOM);
+
+ if (strncmp(xmlParser->curPtr, UTF8_BOM, bom_len) == 0)
+ xmlParser->curPtr += bom_len;
+}
+
/*!
* \brief Skip white spaces.
*/
@@ -702,6 +716,7 @@ static int Parser_skipProlog(
return IXML_FAILED;
}
+ Parser_skipBom(xmlParser);
Parser_skipWhiteSpaces(xmlParser);
if (strncmp(xmlParser->curPtr, (char *)XMLDECL, strlen(XMLDECL)) == 0) {
|
Set homepage to | @@ -10,7 +10,7 @@ description: The Foreign.Lua module is a wrapper of Lua language
.
<https://github.com/hslua/hslua-examples Example programs>
are available in a separate repository.
-homepage: https://github.com/hslua/hslua
+homepage: https://hslua.github.io/
bug-reports: https://github.com/hslua/hslua/issues
license: MIT
license-file: LICENSE
|
Fixed MVEX.SSS error-condition | @@ -3189,7 +3189,8 @@ static ZydisStatus ZydisDecodeInstruction(ZydisDecoderContext* context, ZydisIns
{ 1, 0, 0, 0, 0, 0, 0, 0 }
};
ZYDIS_ASSERT(def->functionality < ZYDIS_ARRAY_SIZE(lookup));
- if (!lookup[def->functionality])
+ ZYDIS_ASSERT(info->details.mvex.SSS < 8);
+ if (!lookup[def->functionality][info->details.mvex.SSS])
{
return ZYDIS_STATUS_DECODING_ERROR;
}
|
fix map mode to send correct mode id to packet | @@ -520,13 +520,13 @@ enum INPVAL_TYPE
enum MAPCMD_TYPE
{
- MAPCMD_AddPin,
- MAPCMD_InsertPin,
- MAPCMD_MovePin,
- MAPCMD_RemovePin,
- MAPCMD_ClearPins,
- MAPCMD_ToggleEdit_Request,
- MAPCMD_ToggleEdit_Reply
+ MAPCMD_AddPin = 1,
+ MAPCMD_InsertPin = 2,
+ MAPCMD_MovePin = 3,
+ MAPCMD_RemovePin = 4,
+ MAPCMD_ClearPins = 5,
+ MAPCMD_ToggleEdit_Request = 6,
+ MAPCMD_ToggleEdit_Reply = 7
};
enum MAPWAYPOINT_TYPE
|
SOVERSION bump to version 7.7.2 | @@ -72,7 +72,7 @@ set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_
# with backward compatible change and micro version is connected with any internal change of the library.
set(SYSREPO_MAJOR_SOVERSION 7)
set(SYSREPO_MINOR_SOVERSION 7)
-set(SYSREPO_MICRO_SOVERSION 1)
+set(SYSREPO_MICRO_SOVERSION 2)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
naive: fixes bug (absolute vs relative step) in signature octs slice | =^ sig pos (take 3 65)
=/ res=(unit [=tx pos=@ud]) parse-tx
?~ res ~
- =/ [len=@ rem=@] (dvr (sub pos.u.res pos) 8)
- ?> =(0 rem)
+ =/ dif (sub pos.u.res pos)
+ =/ len =>((dvr dif 8) ?>(=(0 q) p))
:- ~ :_ pos.u.res
- [sig [len (cut 0 [pos pos.u.res] batch)] tx.u.res]
+ [sig [len (cut 0 [pos dif] batch)] tx.u.res]
::
++ parse-tx
^- (unit [tx pos=@ud])
|
Fix GNU 7.3.0 warning re sprintf | @@ -116,7 +116,7 @@ static int split_file_by_subtype(FILE* in, const char* filename, unsigned long *
grib_context* c=grib_context_get_default();
if (!in) return 1;
- sprintf(ofilename, OUTPUT_FILENAME_DEFAULT); /*default name*/
+ sprintf(ofilename, "%s", OUTPUT_FILENAME_DEFAULT); /*default name*/
while ( err!=GRIB_END_OF_FILE ) {
mesg=wmo_read_bufr_from_file_malloc(in, 0, &size, &offset, &err);
@@ -129,7 +129,7 @@ static int split_file_by_subtype(FILE* in, const char* filename, unsigned long *
return status;
}
- sprintf(ofilename, OUTPUT_FILENAME_DEFAULT);
+ sprintf(ofilename, "%s", OUTPUT_FILENAME_DEFAULT);
if (rdbSubtype != -1) sprintf(ofilename, OUTPUT_FILENAME_SUBTYPE, rdbSubtype);
if (verbose) {
|
Fix HideUnnamedHandles setting not being saved when closing the process properties window | @@ -467,6 +467,8 @@ INT_PTR CALLBACK PhpProcessHandlesDlgProc(
BOOLEAN hide;
hide = Button_GetCheck(GetDlgItem(hwndDlg, IDC_HIDEUNNAMEDHANDLES)) == BST_CHECKED;
+
+ PhSetIntegerSetting(L"HideUnnamedHandles", hide);
PhSetOptionsHandleList(&handlesContext->ListContext, hide);
}
break;
|
compiler; rename getNumArguments to be clearer as to the intent | @@ -2695,8 +2695,8 @@ void expression(Compiler* compiler)
// Returns the number of arguments to the instruction at [ip] in [fn]'s
// bytecode.
-static int getNumArguments(const uint8_t* bytecode, const Value* constants,
- int ip)
+static int getByteCountForArguments(const uint8_t* bytecode,
+ const Value* constants, int ip)
{
Code instruction = (Code)bytecode[ip];
switch (instruction)
@@ -2849,7 +2849,7 @@ static void endLoop(Compiler* compiler)
else
{
// Skip this instruction and its arguments.
- i += 1 + getNumArguments(compiler->fn->code.data,
+ i += 1 + getByteCountForArguments(compiler->fn->code.data,
compiler->fn->constants.data, i);
}
}
@@ -3566,7 +3566,7 @@ void wrenBindMethodCode(ObjClass* classObj, ObjFn* fn)
// Other instructions are unaffected, so just skip over them.
break;
}
- ip += 1 + getNumArguments(fn->code.data, fn->constants.data, ip);
+ ip += 1 + getByteCountForArguments(fn->code.data, fn->constants.data, ip);
}
}
|
Support Local Code Coverage Usage | @@ -12,6 +12,9 @@ This script merges the coverage data.
.PARAMETER Tls
The TLS library test.
+.PARAMETER Local
+ Indicates local execution/usage (not Azure Pipelines) of the script.
+
#>
param (
@@ -25,7 +28,10 @@ param (
[Parameter(Mandatory = $false)]
[ValidateSet("schannel", "openssl", "stub", "mitls")]
- [string]$Tls = ""
+ [string]$Tls = "",
+
+ [Parameter(Mandatory = $false)]
+ [switch]$Local = $false
)
Set-StrictMode -Version 'Latest'
@@ -43,19 +49,37 @@ if ("" -eq $Tls) {
# Root directory of the project.
$RootDir = Split-Path $PSScriptRoot -Parent
+# Path to the coverage tool.
+$CoverageExe = 'C:\"Program Files"\OpenCppCoverage\OpenCppCoverage.exe'
+
+# The input directory to search for files. When run locally (not on Azure Pipelines)
+# the files are in a different location.
$CoverageDir = Join-Path $RootDir "artifacts\coverage\windows\$($Arch)_$($Config)_$($Tls)"
+if ($Local) {
+ $CoverageDir = Join-Path $RootDir "artifacts\coverage"
+}
+# Build up the args with the list of input files.
$CoverageMergeParams = ""
-
foreach ($file in $(Get-ChildItem -Path $CoverageDir -Filter '*.cov')) {
$CoverageMergeParams += " --input_coverage $(Join-Path $CoverageDir $file.Name)"
}
+if ($CoverageMergeParams -eq "") {
+ Write-Error "No coverage results to merge!"
+}
-if ($CoverageMergeParams -ne "") {
+if ($Local) {
+ # Locally, output the HTML report.
+ $CoverageMergeParams += " --export_type html:$(Join-Path $CoverageDir "report")"
+} else {
+ # Use cobertura format for Azure Pipelines.
$CoverageMergeParams += " --export_type cobertura:$(Join-Path $CoverageDir "msquiccoverage.xml")"
+}
- $CoverageExe = 'C:\"Program Files"\OpenCppCoverage\OpenCppCoverage.exe'
+# Call the tool to merge the files into the appropriate format.
Invoke-Expression ($CoverageExe + $CoverageMergeParams) | Out-Null
-} else {
- Write-Warning "No coverage results to merge!"
+
+if ($Local) {
+ # Open up the HTML report that was just generated.
+ start (Join-Path $CoverageDir "report\index.html")
}
|
throw better exceptions in multipart chunk reconstruction | @@ -573,8 +573,7 @@ MultiPartInputFile::Data::chunkOffsetReconstruction(OPENEXR_IMF_INTERNAL_NAMESPA
if(partNumber<0 || partNumber>int(parts.size()))
{
- // bail here - bad part number
- throw int();
+ throw IEX_NAMESPACE::IoExc("part number out of range");
}
Header& header = parts[partNumber]->header;
@@ -601,14 +600,13 @@ MultiPartInputFile::Data::chunkOffsetReconstruction(OPENEXR_IMF_INTERNAL_NAMESPA
{
// this shouldn't actually happen - we should have allocated a valid
// tileOffsets for any part which isTiled
- throw int();
+ throw IEX_NAMESPACE::IoExc("part not tiled");
}
if(!tileOffsets[partNumber]->isValidTile(tilex,tiley,levelx,levely))
{
- //std::cout << "invalid tile : aborting\n";
- throw int();
+ throw IEX_NAMESPACE::IoExc("invalid tile coordinates");
}
(*tileOffsets[partNumber])(tilex,tiley,levelx,levely)=chunk_start;
@@ -642,20 +640,17 @@ MultiPartInputFile::Data::chunkOffsetReconstruction(OPENEXR_IMF_INTERNAL_NAMESPA
if(y_coordinate < header.dataWindow().min.y || y_coordinate > header.dataWindow().max.y)
{
- // bail to exception catcher: y out of range. Test now to prevent overflow in following arithmetic
- throw int();
+ throw IEX_NAMESPACE::IoExc("y out of range");
}
y_coordinate -= header.dataWindow().min.y;
y_coordinate /= rowsizes[partNumber];
if(y_coordinate < 0 || y_coordinate >= int(parts[partNumber]->chunkOffsets.size()))
{
- //bail to exception catcher: broken scanline: out of range of chunk table size
- throw int();
+ throw IEX_NAMESPACE::IoExc("chunk index out of range");
}
parts[partNumber]->chunkOffsets[y_coordinate]=chunk_start;
- //std::cout << "chunk_start for " << y_coordinate << ':' << chunk_start << std::endl;
if(header.type()==DEEPSCANLINE)
{
@@ -683,8 +678,6 @@ MultiPartInputFile::Data::chunkOffsetReconstruction(OPENEXR_IMF_INTERNAL_NAMESPA
chunk_start+=size_of_chunk;
- //std::cout << " next chunk +"<<size_of_chunk << " = " << chunk_start << std::endl;
-
is.seekg(chunk_start);
}
|
malefor: configure DB PD
Fill tcpc_config[] and usb_muxes[] base on DB type, make sure DB type-C
work well.
BRANCH=none
TEST=Type-C function is OK at DB. | #include "driver/ppc/sn5s330.h"
#include "driver/ppc/syv682x.h"
#include "driver/sync.h"
+#include "driver/tcpm/ps8xxx.h"
+#include "driver/tcpm/tcpci.h"
#include "extpower.h"
#include "fan.h"
#include "fan_chip.h"
@@ -309,6 +311,32 @@ const struct pwm_t pwm_channels[] = {
};
BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
+/* USBC TCPC configuration for port 1 on USB3 board */
+static const struct tcpc_config_t tcpc_config_p1_usb3 = {
+ .bus_type = EC_BUS_TYPE_I2C,
+ .i2c_info = {
+ .port = I2C_PORT_USB_C1,
+ .addr_flags = PS8751_I2C_ADDR1_FLAGS,
+ },
+ .flags = TCPC_FLAGS_TCPCI_REV2_0 | TCPC_FLAGS_TCPCI_REV2_0_NO_VSAFE0V,
+ .drv = &ps8xxx_tcpm_drv,
+ .usb23 = USBC_PORT_1_USB2_NUM | (USBC_PORT_1_USB3_NUM << 4),
+};
+
+static const struct usb_mux usbc1_usb3_db_retimer = {
+ .usb_port = USBC_PORT_C1,
+ .driver = &tcpci_tcpm_usb_mux_driver,
+ .hpd_update = &ps8xxx_tcpc_update_hpd_status,
+ .next_mux = NULL,
+};
+
+static const struct usb_mux mux_config_p1_usb3 = {
+ .usb_port = USBC_PORT_C1,
+ .driver = &virtual_usb_mux_driver,
+ .hpd_update = &virtual_hpd_update,
+ .next_mux = &usbc1_usb3_db_retimer,
+};
+
void board_reset_pd_mcu(void)
{
/* TODO(b/159024035): Malefor: check USB PD reset operation */
@@ -316,7 +344,9 @@ void board_reset_pd_mcu(void)
__override void board_cbi_init(void)
{
- /* TODO(b/159024035): Malefor: check FW_CONFIG fields for USB DB type */
+ /* Config DB USB3 */
+ tcpc_config[USBC_PORT_C1] = tcpc_config_p1_usb3;
+ usb_muxes[USBC_PORT_C1] = mux_config_p1_usb3;
}
/******************************************************************************/
|
BugID:20040062: Rework HAL_TCP_Read API implementation. | @@ -188,6 +188,7 @@ int32_t HAL_TCP_Read(uintptr_t fd, char *buf, uint32_t len, uint32_t timeout_ms)
struct timeval timeout;
if (fd >= FD_SETSIZE) {
+ PLATFORM_LOG_E("%s error: fd (%d) >= FD_SETSIZE (%d)", __func__, fd, FD_SETSIZE);
return -1;
}
@@ -198,6 +199,8 @@ int32_t HAL_TCP_Read(uintptr_t fd, char *buf, uint32_t len, uint32_t timeout_ms)
do {
t_left = aliot_platform_time_left(t_end, HAL_UptimeMs());
if (0 == t_left) {
+ PLATFORM_LOG_D("%s no time left", __func__);
+ err_code = -1;
break;
}
FD_ZERO(&sets);
@@ -208,28 +211,33 @@ int32_t HAL_TCP_Read(uintptr_t fd, char *buf, uint32_t len, uint32_t timeout_ms)
ret = select(fd + 1, &sets, NULL, NULL, &timeout);
if (ret > 0) {
+ if (0 == FD_ISSET(fd, &sets)) {
+ PLATFORM_LOG_D("%s No data for fd %d", __func__, fd);
+ ret = 0;
+ continue;
+ }
+
ret = recv(fd, buf + len_recv, len - len_recv, 0);
if (ret > 0) {
len_recv += ret;
- } else if (0 == ret) {
- PLATFORM_LOG_E("connection is closed");
- err_code = -1;
- break;
} else {
- if (EINTR == errno) {
+ if ((EINTR == errno) || (EAGAIN == errno) || (EWOULDBLOCK == errno) ||
+ (EPROTOTYPE == errno) || (EALREADY == errno) || (EINPROGRESS == errno)) {
continue;
}
- PLATFORM_LOG_E("send fail");
+ PLATFORM_LOG_E("recv fail (fd: %d), errno: %d, ret: %d", fd, errno, ret);
err_code = -2;
break;
}
} else if (0 == ret) {
+ PLATFORM_LOG_D("%s select (fd: %d) timeout", __func__, fd);
+ err_code = -1;
break;
} else {
if (EINTR == errno) {
continue;
}
- PLATFORM_LOG_E("select-recv fail errno=%d",errno);
+ PLATFORM_LOG_E("select-recv (fd: %d) fail errno=%d",fd, errno);
err_code = -2;
break;
}
|
Add get_filter test | @@ -109,6 +109,12 @@ def test_blob_writer():
data = fIn.read()
assert data == qpafilter.BLOB_START_MARKER + qpafilter.BLOB_END_MARKER
+def test_get_filter():
+ category = "Temperature and Cooling"
+ actual = qpafilter.get_filter(category)
+ assert actual == qpafilter.temp_filter
+ # TODO negative case: pass in non existing category... check for key error/exception?
+
def test_get_verifier():
category = "Temperature and Cooling"
actual = qpafilter.get_verifier(category)
|
Silence warning chipid files with STLINK_FLASH_TYPE_UNKNOWN
The chipid configuration parser currently emits a warning when it
encounters a file with the flash type set to
STLINK_FLASH_TYPE_UNKNOWN. In practice, this means that the warning
will always be printed since 'unknown_device.chip' uses this
value. Make STLINK_FLASH_TYPE_UNKNOWN a permitted value in the config
file parser. | @@ -1001,7 +1001,7 @@ void process_chipfile(char *fname) {
} else if (strcmp (word, "flash_type") == 0) {
if (sscanf(value, "%i", (int *)&ts->flash_type) < 1) {
fprintf(stderr, "Failed to parse flash type\n");
- } else if (ts->flash_type <= STLINK_FLASH_TYPE_UNKNOWN || ts->flash_type >= STLINK_FLASH_TYPE_MAX) {
+ } else if (ts->flash_type < STLINK_FLASH_TYPE_UNKNOWN || ts->flash_type >= STLINK_FLASH_TYPE_MAX) {
fprintf(stderr, "Unrecognized flash type\n");
}
} else if (strcmp (word, "flash_size_reg") == 0) {
|
RPL Lite: whenever hearing an old version from the root, reset DIO timer to let the root know about the current version | @@ -395,9 +395,15 @@ process_dio_from_current_dag(uip_ipaddr_t *from, rpl_dio_t *dio)
return;
}
- /* If the DIO sender is on an older version of the DAG, ignore it. The node
- will eventually hear the global repair and catch up. */
+ /* If the DIO sender is on an older version of the DAG, do not process it
+ * further. The sender will eventually hear the global repair and catch up. */
if(rpl_lollipop_greater_than(curr_instance.dag.version, dio->version)) {
+ if(dio->rank == ROOT_RANK) {
+ /* Before returning, if the DIO was from the root, an old DAG versions
+ * likely incidates a root reboot. Reset our DIO timer to make sure the
+ * root hears our version ASAP, and in trun triggers a global repair. */
+ rpl_timers_dio_reset("Heard old version from root");
+ }
return;
}
@@ -412,10 +418,12 @@ process_dio_from_current_dag(uip_ipaddr_t *from, rpl_dio_t *dio)
* Must come first, as it might remove all neighbors, and we then need
* to re-add this source of the DIO to the neighbor table */
if(rpl_lollipop_greater_than(dio->version, curr_instance.dag.version)) {
- if(curr_instance.dag.rank == ROOT_RANK) { /* The root should not hear newer versions */
+ if(curr_instance.dag.rank == ROOT_RANK) {
+ /* The root should not hear newer versions unless it just rebooted */
LOG_ERR("inconsistent DIO version (current: %u, received: %u), initiate global repair\n",
curr_instance.dag.version, dio->version);
- curr_instance.dag.version = dio->version; /* Update version and trigger global repair */
+ /* Update version and trigger global repair */
+ curr_instance.dag.version = dio->version;
rpl_global_repair("Inconsistent DIO version");
} else {
LOG_WARN("new DIO version (current: %u, received: %u), apply global repair\n",
|
IPAddr: Add test cases matching any IP address | @@ -37,6 +37,11 @@ static inline void testIPv4 (const char * ip, int ret)
testIP (ip, ret, "ipv4");
}
+static inline void testIPAny (const char * ip, int ret)
+{
+ testIP (ip, ret, "");
+}
+
int main (int argc, char ** argv)
{
printf ("IPADDR TESTS\n");
@@ -63,6 +68,11 @@ int main (int argc, char ** argv)
testIPv6 ("::", -1);
testIPv6 ("::ffff:192.0.128", -1);
+ testIPAny ("::ffff:192.0.128", -1);
+ testIPAny ("1.2.3.", -1);
+ testIPAny ("::1", 1);
+ testIPAny ("42.42.42.42", 1);
+
print_result ("testmod_ipaddr");
return nbError;
|
[bsp][apollo2] update scons config: update MDK support. | @@ -64,16 +64,14 @@ elif PLATFORM == 'armcc':
LINK = 'armlink'
TARGET_EXT = 'axf'
- DEVICE = ' --device DARMSTM'
- CFLAGS = DEVICE + ' --apcs=interwork'
+ DEVICE = ' --cpu Cortex-M4'
+ CFLAGS = DEVICE + ' --c99 --apcs=interwork'
AFLAGS = DEVICE
- LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-apollo2.map --scatter rtthread-apollo2.sct'
+ LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-apollo2.map --scatter rtthread.sct'
- CFLAGS += ' --c99'
- CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC'
- LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB'
+ LFLAGS += ' --keep *.o(.rti_fn.*) --keep *.o(FSymTab) --keep *.o(VSymTab)'
- EXEC_PATH += '/arm/bin40/'
+ EXEC_PATH += '/ARM/ARMCC/bin'
if BUILD == 'debug':
CFLAGS += ' -g -O0'
|
drv/virtual: Fix error for use of main name.
This fixes the following error:
../../../lib/pbio/drv/virtual.c:23:15: error: 'main' is usually a function [-Werror=main]
PyObject *main = PyImport_ImportModule("__main__");
^~~~
cc1: all warnings being treated as errors | @@ -151,15 +151,15 @@ static pbio_error_t pbdrv_virtual_check_cpython_exception(void) {
*/
static PyObject *pbdrv_virtual_get_platform(void) {
// new ref
- PyObject *main = PyImport_ImportModule("__main__");
- if (!main) {
+ PyObject *main_obj = PyImport_ImportModule("__main__");
+ if (!main_obj) {
return NULL;
}
// new ref
- PyObject *result = PyObject_GetAttrString(main, "platform");
+ PyObject *result = PyObject_GetAttrString(main_obj, "platform");
- Py_DECREF(main);
+ Py_DECREF(main_obj);
return result;
}
|
Modify system files as root
Add missing sudo commands
[ci skip] | - If you want to link cmake3 to cmake, run:
```bash
- ln -sf ../../bin/cmake3 /usr/local/bin/cmake
+ sudo ln -sf ../../bin/cmake3 /usr/local/bin/cmake
```
- Make sure that you add `/usr/local/lib` and `/usr/local/lib64` to
@@ -91,7 +91,7 @@ then run command `ldconfig`.
```bash
- cat >> /etc/sysctl.conf <<-EOF
+ sudo bash -c 'cat >> /etc/sysctl.conf <<-EOF
kernel.shmmax = 500000000
kernel.shmmni = 4096
kernel.shmall = 4000000000
@@ -113,19 +113,19 @@ then run command `ldconfig`.
net.core.wmem_max = 2097152
vm.overcommit_memory = 2
- EOF
+ EOF'
- cat >> /etc/security/limits.conf <<-EOF
+ sudo bash -c 'cat >> /etc/security/limits.conf <<-EOF
* soft nofile 65536
* hard nofile 65536
* soft nproc 131072
* hard nproc 131072
- EOF
+ EOF'
- cat >> /etc/ld.so.conf <<-EOF
+ sudo bash -c 'cat >> /etc/ld.so.conf <<-EOF
/usr/local/lib
- EOF
+ EOF'
```
|
better health | @@ -16,7 +16,7 @@ def sign(a):
class HealthProcessor:
def __init__(self, beatmap, drainrate=None):
- self.multiplier = {0: -1, 50: -0.05, 105: 0.2, 15: 0.5, 35: 1, 100: 0.5, 300: 1}
+ self.multiplier = {0: -1, 50: -0.05, 105: 0.2, 15: 0.35, 35: 0.5, 100: 0.5, 300: 1}
self.minimum_health_error = 0.01
self.min_health_target = 0.95
self.mid_health_target = 0.70
@@ -72,6 +72,10 @@ class HealthProcessor:
currentHealth = min(1, currentHealth + step)
+ if "slider" in self.beatmap[i]["type"]:
+ step = len(self.beatmap[i]["ticks pos"]) * self.health_increase_for(15)
+ currentHealth = min(1, currentHealth + step)
+
if lowestHealth < 0:
break
|
X509_NAME_cmp(): Clearly document its semantics, referencing relevant RFCs
Fixes | @@ -25,16 +25,20 @@ This set of functions are used to compare X509 objects, including X509
certificates, X509 CRL objects and various values in an X509 certificate.
The X509_cmp() function compares two B<X509> objects indicated by parameters
-B<a> and B<b>. The comparison is based on the B<memcmp> result of the hash
+I<a> and I<b>. The comparison is based on the B<memcmp> result of the hash
values of two B<X509> objects and the canonical (DER) encoding values.
The X509_NAME_cmp() function compares two B<X509_NAME> objects indicated by
-parameters B<a> and B<b>. The comparison is based on the B<memcmp> result of
-the canonical (DER) encoding values of the two objects. L<i2d_X509_NAME(3)>
-has a more detailed description of the DER encoding of the B<X509_NAME> structure.
+parameters I<a> and I<b>. The comparison is based on the B<memcmp> result of the
+canonical (DER) encoding values of the two objects using L<i2d_X509_NAME(3)>.
+This procedure adheres to the matching rules for Distinguished Names (DN)
+given in RFC 4517 section 4.2.15 and RFC 5280 section 7.1.
+In particular, the order of Relative Distinguished Names (RDNs) is relevant.
+On the other hand, if an RDN is multi-valued, i.e., it contains a set of
+AttributeValueAssertions (AVAs), its members are effectively not ordered.
The X509_issuer_and_serial_cmp() function compares the serial number and issuer
-values in the given B<X509> objects B<a> and B<b>.
+values in the given B<X509> objects I<a> and I<b>.
The X509_issuer_name_cmp(), X509_subject_name_cmp() and X509_CRL_cmp() functions
are effectively wrappers of the X509_NAME_cmp() function. These functions compare
@@ -47,8 +51,8 @@ of just the issuer name.
=head1 RETURN VALUES
-The B<X509> comparison functions return B<-1>, B<0>, or B<1> if object B<a> is
-found to be less than, to match, or be greater than object B<b>, respectively.
+The B<X509> comparison functions return B<-1>, B<0>, or B<1> if object I<a> is
+found to be less than, to match, or be greater than object I<b>, respectively.
X509_NAME_cmp(), X509_issuer_and_serial_cmp(), X509_issuer_name_cmp(),
X509_subject_name_cmp() and X509_CRL_cmp() may return B<-2> to indicate an error.
|
tests: remove stray 'in' in CMake file
Apparently PGI is happy to accept garbage on the command line... until
it isn't. | @@ -74,7 +74,7 @@ if("${CLOCK_GETTIME_EXISTS}")
endif()
if("${OPENMP_SIMD_FLAGS}" STREQUAL "")
- foreach(omp_simd_flag in "-fopenmp-simd" "-qopenmp-simd" "-openmp-simd")
+ foreach(omp_simd_flag "-fopenmp-simd" "-qopenmp-simd" "-openmp-simd")
string (REGEX REPLACE "[^a-zA-Z0-9]+" "_" omp_simd_flag_name "CFLAG_${omp_simd_flag}")
check_c_compiler_flag("${omp_simd_flag}" "${omp_simd_flag_name}")
|
Fix typos and small enhancement of docu | @@ -257,6 +257,10 @@ An array containing entries for `lfs_addr`, `lfs_size`, `spiffs_addr` and `spiff
print("The LFS size is " .. node.getpartitiontable().lfs_size)
```
+#### See also
+[`node.setpartitiontable()`](#nodesetpartitiontable)
+
+
## node.heap()
Returns the current available heap size in bytes. Note that due to fragmentation, actual allocations of this size may not be possible.
@@ -459,6 +463,10 @@ Not applicable. The ESP module will be rebooted for a valid new set, or a Lua e
node.setpartitiontable{lfs_size = 0x20000, spiffs_addr = 0x120000, spiffs_size = 0x20000}
```
+#### See also
+[`node.getpartitiontable()`](#nodegetpartitiontable)
+
+
## node.sleep()
|
Improve error message on syntax errors with 'is'/'are' | @@ -66,7 +66,7 @@ sockeyeFile = do
return $ AST.NetSpec $ concat nodes
netSpec = do
- nodeIds <- try single <|> multiple
+ nodeIds <- choice [try single, try multiple]
node <- nodeSpec
return $ map (\nodeId -> (nodeId, node)) nodeIds
where single = do
|
MicroPython: Rewrite Enviro manifest.py to new style. | include("../manifest.py")
-freeze("$(MPY_DIR)/tools", "upip.py")
-freeze("$(MPY_DIR)/tools", "upip_utarfile.py")
-freeze("$(MPY_LIB_DIR)/python-ecosys/urequests", "urequests.py")
-freeze("$(MPY_LIB_DIR)/micropython/umqtt.simple", "umqtt")
+module("upip.py", base_path="$(MPY_DIR)/tools", opt=3)
+module("upip_utarfile.py", base_path="$(MPY_DIR)/tools", opt=3)
+
+require("urequests")
+require("umqtt.simple")
\ No newline at end of file
|
Add explanation for signed char assert | #include "typelist.h"
-static_assert(TSignedInts::THave<char>::value, "expect TSignedInts::THave<char>::value");
+static_assert(
+ TSignedInts::THave<char>::value,
+ "char type in Arcadia must be signed; add -fsigned-char to compiler options");
|
Print missing | @@ -46,8 +46,13 @@ for sha in $commits; do
[[ ${found_author} == true && ${found_committer} == true ]] && break
done
+ if [[ ${found_author} == false ]]; then
+ echo -e "Missing \"Signed-off-by\" for \"${author}\" in commit ${sha}"
+ fi
+ if [[ ${found_committer} == false ]]; then
+ echo -e "Missing \"Signed-off-by\" for \"${commiter}\" in commit ${sha}"
+ fi
if [[ ${found_author} == false || ${found_committer} == false ]]; then
- echo -e "One or more \"Signed-off-by\" lines missing in commit ${sha}"
exit 1
fi
|
BugID:21055387:Fix iotx_coap_api.c WhiteScan issue | @@ -868,7 +868,10 @@ int IOT_CoAP_DeviceNameAuth(iotx_coap_context_t *p_context)
coap_log(LOG_ERR, "Send authentication message to server\n");
coap_log(LOG_INFO, "The payload is: %s\n", p_payload);
coap_log(LOG_INFO, "Send authentication message to server\n");
- ret = coap_send(p_session, pdu);
+ if (coap_send(p_session, pdu) == COAP_INVALID_TID) {
+ coap_log(LOG_WARNING, "cannot send pdu for transaction %u\n",
+ pdu->tid);
+ }
int count = 0;
while (p_session->state != COAP_SESSION_STATE_ESTABLISHED) {
coap_run_once(p_coap_ctx, 50);
@@ -1039,7 +1042,6 @@ static int iotx_split_path_2_option(char *uri, coap_pdu_t *message)
int IOT_CoAP_SendMessage(iotx_coap_context_t *p_context, char *p_path, iotx_message_t *p_message)
{
int len = 0;
- int ret = IOTX_SUCCESS;
iotx_coap_t *p_iotx_coap = NULL;
coap_context_t *p_coap_ctx = NULL;
coap_pdu_t *pdu;
@@ -1123,6 +1125,7 @@ int IOT_CoAP_SendMessage(iotx_coap_context_t *p_context, char *p_path, iotx_mess
p_message->resp_callback) != 0) {
coap_log(LOG_ERR, "cannot add msg callback\n");
}
+
if (COAP_URI_SCHEME_COAP_PSK == p_iotx_coap->p_coap_ctx->scheme) {
unsigned char buff[32] = {0};
unsigned char seq[33] = {0};
@@ -1152,8 +1155,10 @@ int IOT_CoAP_SendMessage(iotx_coap_context_t *p_context, char *p_path, iotx_mess
} else {
coap_add_data(pdu, p_message->payload_len, p_message->p_payload);
}
- ret = coap_send(p_session, pdu);
- if (ret != pdu->tid) {
+
+ if (coap_send(p_session, pdu) == COAP_INVALID_TID) {
+ coap_log(LOG_WARNING, "cannot send pdu for transaction %u\n",
+ pdu->tid);
}
if (NULL != payload) {
@@ -1173,12 +1178,9 @@ int IOT_CoAP_SendMessage(iotx_coap_context_t *p_context, char *p_path, iotx_mess
pdu->code = COAP_REQUEST_POST;
coap_add_data(pdu, p_message->payload_len, p_message->p_payload);
- ret = coap_send(p_session, pdu);
- if (ret != pdu->tid) {
- }
- if (NULL != payload) {
- coap_free(payload);
- payload = NULL;
+ if (coap_send(p_session, pdu) == COAP_INVALID_TID) {
+ coap_log(LOG_WARNING, "cannot send pdu for transaction %u\n",
+ pdu->tid);
}
return IOTX_SUCCESS;
}
|
Remove mutex not being used anymore | @@ -617,16 +617,12 @@ struct sctp_tcb {
uint16_t resv;
#if defined(__FreeBSD__) && !defined(__Userspace__)
struct mtx tcb_mtx;
- struct mtx tcb_send_mtx;
#elif defined(SCTP_PROCESS_LEVEL_LOCKS)
userland_mutex_t tcb_mtx;
- userland_mutex_t tcb_send_mtx;
#elif defined(__APPLE__) && !defined(__Userspace__)
lck_mtx_t* tcb_mtx;
- lck_mtx_t* tcb_send_mtx;
#elif defined(_WIN32) && !defined(__Userspace__)
struct spinlock tcb_lock;
- struct spinlock tcb_send_lock;
#elif defined(__Userspace__)
#endif
#if defined(__APPLE__) && !defined(__Userspace__)
|
test-suite: enable static lib check for OpenCoarrays | @@ -72,17 +72,17 @@ check_rms
fi
}
-#@test "[$testname] Verify static library is not present in ${PKG}_LIB ($LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" {
-# LIB=${PKG}_LIB
-#
-# if [ -z ${!LIB} ];then
-# flunk "${PKG}_LIB directory not defined"
-# fi
-#
-# if [ -e ${!LIB}/${library}.a ];then
-# flunk "${library}.a exists when not expecting it"
-# fi
-#}
+@test "[$testname] Verify static library is not present in ${PKG}_LIB ($LMOD_FAMILY_COMPILER/$LMOD_FAMILY_MPI)" {
+ LIB=${PKG}_LIB
+
+ if [ -z ${!LIB} ];then
+ flunk "${PKG}_LIB directory not defined"
+ fi
+
+ if [ -e ${!LIB}/${library}.a ];then
+ flunk "${library}.a exists when not expecting it"
+ fi
+}
# --------------
# Include Tests
|
Fix issue with registry creation; | @@ -26,6 +26,7 @@ static void luax_pushobjectregistry(lua_State* L) {
lua_setmetatable(L, -2);
// Write the table to the registry
+ lua_pushvalue(L, -1);
lua_setfield(L, LUA_REGISTRYINDEX, "_lovrobjects");
}
}
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.