message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Resolved QT warning from the annotations window. | @@ -798,14 +798,13 @@ QvisAnnotationWindow::CreateGeneralTab3D(QWidget *parentWidget)
int row = 0;
// Create the axes group
- axesGroup = new QGroupBox(parentWidget);
+ axesGroup = new QGroupBox(top);
axesGroup->setTitle(tr("Axes"));
rLayout->addWidget(axesGroup, row, 0, 1, 2);
row++;
// Create the axes layout
QGridLayout *axesLayout = new QGridLayout(axesGroup);
- vlayout->addLayout(axesLayout);
axesLayout->setSpacing(5);
axesLayout->setMargin(0);
axesLayout->setColumnStretch(1, 10);
@@ -863,13 +862,12 @@ QvisAnnotationWindow::CreateGeneralTab3D(QWidget *parentWidget)
++axesRow;
// Create the bounding box group
- bboxGroup = new QGroupBox(parentWidget);
+ bboxGroup = new QGroupBox(top);
bboxGroup->setTitle(tr("Bounding Box"));
rLayout->addWidget(bboxGroup, row, 0, 1, 2);
row++;
QGridLayout *bboxLayout = new QGridLayout(bboxGroup);
- vlayout->addLayout(bboxLayout);
bboxLayout->setSpacing(5);
bboxLayout->setMargin(0);
bboxLayout->setColumnStretch(1, 10);
@@ -901,13 +899,12 @@ QvisAnnotationWindow::CreateGeneralTab3D(QWidget *parentWidget)
}
// Create the triad options group
- triadGroup = new QGroupBox(parentWidget);
+ triadGroup = new QGroupBox(top);
triadGroup->setTitle(tr("Triad"));
rLayout->addWidget(triadGroup, row, 0, 1, 2);
row++;
QGridLayout *triadLayout = new QGridLayout(triadGroup);
- vlayout->addLayout(triadLayout);
triadLayout->setSpacing(5);
triadLayout->setMargin(0);
triadLayout->setColumnStretch(1, 10);
|
move esptool sdk installation before python3 env is set. Kind of a cheat | @@ -2,6 +2,16 @@ FROM ubuntu:16.04
RUN apt-get update && apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi python python-pip gcc g++ git autoconf gperf bison flex automake texinfo wget help2man gawk libtool libtool-bin ncurses-dev unzip unrar-free libexpat-dev sed bzip2 locales curl zlib1g-dev libffi-dev libssl-dev
+# Build esp toolchain
+RUN mkdir -p /panda/boardesp
+WORKDIR /panda/boardesp
+RUN git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
+WORKDIR /panda/boardesp/esp-open-sdk
+RUN git checkout 03f5e898a059451ec5f3de30e7feff30455f7ce
+RUN CT_ALLOW_BUILD_AS_ROOT_SURE=1 make STANDALONE=y
+
+COPY . /panda
+
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
@@ -16,14 +26,4 @@ RUN pyenv rehash
RUN pip install pycrypto==2.6.1
-# Build esp toolchain
-RUN mkdir -p /panda/boardesp
-WORKDIR /panda/boardesp
-RUN git clone --recursive https://github.com/pfalcon/esp-open-sdk.git
-WORKDIR /panda/boardesp/esp-open-sdk
-RUN git checkout 03f5e898a059451ec5f3de30e7feff30455f7ce
-RUN CT_ALLOW_BUILD_AS_ROOT_SURE=1 make STANDALONE=y
-
-COPY . /panda
-
WORKDIR /panda
|
[chainmaker]modify Macro text | @@ -107,6 +107,8 @@ BSINT32 BoatWalletCreate(BoatProtocolType protocol_type, const BCHAR *wallet_nam
BUINT8 hashLenDummy;
#endif
+ BoatHlchainmakerWalletConfig *test_ptr = (BoatHlchainmakerWalletConfig*)wallet_config_ptr;
+
/* Check wallet configuration */
if ((wallet_name_str == NULL) && (wallet_config_ptr == NULL))
{
@@ -205,6 +207,7 @@ BSINT32 BoatWalletCreate(BoatProtocolType protocol_type, const BCHAR *wallet_nam
{
memcpy(boatwalletStore_ptr, wallet_config_ptr, wallet_config_size);
wallet_ptr = BoatHlchainmakerWalletInit((BoatHlchainmakerWalletConfig*)wallet_config_ptr, wallet_config_size);
+
if (wallet_ptr != NULL)
{
memcpy(boatwalletStore_ptr + wallet_config_size, &((BoatHlchainmakerWallet*)wallet_ptr)->user_client_info.prikeyCtx, sizeof(BoatWalletPriKeyCtx));
@@ -245,8 +248,9 @@ BSINT32 BoatWalletCreate(BoatProtocolType protocol_type, const BCHAR *wallet_nam
memcpy(&((BoatHlchainmakerWallet*)wallet_ptr)->user_client_info.prikeyCtx, boatwalletStore_ptr + wallet_config_size, sizeof(BoatWalletPriKeyCtx));
}
}
-
g_boat_iot_sdk_context.wallet_list[i].wallet_ptr = wallet_ptr;
+ //printf("liuzhenhe2 = %s", g_boat_iot_sdk_context.wallet_list[i].wallet_ptr->node_info.org_Id);
+
break;
#endif
@@ -481,7 +485,6 @@ BSINT32 BoatWalletCreate(BoatProtocolType protocol_type, const BCHAR *wallet_nam
}
BoatFree(boatwalletStore_ptr);
-
return i;
}
@@ -498,7 +501,6 @@ void BoatWalletUnload(BSINT32 wallet_index)
switch(protocol)
{
-
#if PROTOCOL_USE_ETHEREUM == 1
case BOAT_PROTOCOL_ETHEREUM:
BoatEthWalletDeInit(g_boat_iot_sdk_context.wallet_list[wallet_index].wallet_ptr);
@@ -511,8 +513,8 @@ void BoatWalletUnload(BSINT32 wallet_index)
break;
#endif
- #if PROTOCOL_USE_CHAINMKAER == 1
- case BOAT_PROTOCOL_CHAINMKAER:
+ #if PROTOCOL_USE_CHAINMAKER == 1
+ case BOAT_PROTOCOL_CHAINMAKER:
BoatHlchainmakerWalletDeInit(g_boat_iot_sdk_context.wallet_list[wallet_index].wallet_ptr);
break;
#endif
@@ -564,6 +566,7 @@ void *BoatGetWalletByIndex(BSINT32 wallet_index)
if (g_boat_iot_sdk_context.wallet_list[wallet_index].is_used != BOAT_FALSE &&
g_boat_iot_sdk_context.wallet_list[wallet_index].wallet_ptr != NULL)
{
+
return(g_boat_iot_sdk_context.wallet_list[wallet_index].wallet_ptr);
}
}
|
Fixed inconsistencies in Android VS project test | function suite.setup()
p.action.set("vs2015")
+ system "android"
wks, prj = test.createWorkspace()
end
local function prepare()
- system "android"
- local cfg = test.getconfig(prj, "Debug", platform)
+ local cfg = test.getconfig(prj, "Debug")
vc2010.clCompile(cfg)
end
- local function preparePropertyGroup()
- system "android"
- local cfg = test.getconfig(prj, "Debug", platform)
- vc2010.propertyGroup(cfg)
- android.androidApplicationType(cfg)
+ local function prepareGlobals()
+ prj = test.getproject(wks, 1)
+ vc2010.globals(prj)
end
function suite.minVisualStudioVersion_14()
- preparePropertyGroup()
+ prepareGlobals()
test.capture [[
-<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Android'">
+<PropertyGroup Label="Globals">
+ <ProjectGuid>{42B5DBC6-AE1F-903D-F75D-41E363076E92}</ProjectGuid>
<Keyword>Android</Keyword>
<RootNamespace>MyProject</RootNamespace>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
function suite.minVisualStudioVersion_15()
p.action.set("vs2017")
- preparePropertyGroup()
+ prepareGlobals()
test.capture [[
-<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Android'">
+<PropertyGroup Label="Globals">
+ <ProjectGuid>{42B5DBC6-AE1F-903D-F75D-41E363076E92}</ProjectGuid>
<Keyword>Android</Keyword>
<RootNamespace>MyProject</RootNamespace>
<MinimumVisualStudioVersion>15.0</MinimumVisualStudioVersion>
function suite.minVisualStudioVersion_16()
p.action.set("vs2019")
- preparePropertyGroup()
+ prepareGlobals()
test.capture [[
-<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Android'">
+<PropertyGroup Label="Globals">
+ <ProjectGuid>{42B5DBC6-AE1F-903D-F75D-41E363076E92}</ProjectGuid>
<Keyword>Android</Keyword>
<RootNamespace>MyProject</RootNamespace>
<MinimumVisualStudioVersion>16.0</MinimumVisualStudioVersion>
|
gimble: switch T8 and T9 key
We have micmute at T8 and keyboard backlight at T9.
BRANCH=none
TEST=make -j BOARD=gimble | @@ -34,8 +34,8 @@ static const struct ec_response_keybd_config gimble_kb = {
TK_SNAPSHOT, /* T5 */
TK_BRIGHTNESS_DOWN, /* T6 */
TK_BRIGHTNESS_UP, /* T7 */
- TK_KBD_BKLIGHT_TOGGLE, /* T8 */
- TK_MICMUTE, /* T9 */
+ TK_MICMUTE, /* T8 */
+ TK_KBD_BKLIGHT_TOGGLE, /* T9 */
TK_PLAY_PAUSE, /* T10 */
TK_VOL_MUTE, /* T11 */
TK_VOL_DOWN, /* T12 */
|
Suppress bison warning in ecpg grammar.
opt_distinct_clause is only used in PLpgSQL_Expr, which ecpg
ignores, so it needs to ignore opt_distinct_clause too.
My oversight in reported by Bruce Momjian.
Discussion: | @@ -71,6 +71,7 @@ my %replace_types = (
'type_function_name' => 'ignore',
'ColLabel' => 'ignore',
'Sconst' => 'ignore',
+ 'opt_distinct_clause' => 'ignore',
'PLpgSQL_Expr' => 'ignore',
'PLAssignStmt' => 'ignore',
'plassign_target' => 'ignore',
|
[CUDA] Enable FP64 versions of math builtins | @@ -639,49 +639,57 @@ void pocl_map_libdevice_calls(llvm::Module *module)
struct function_map_entry function_map[] =
{
// TODO: FP64 versions - not all of them just worked in the same way...
- {"acosf", "__nv_acosf"},
- {"acoshf", "__nv_acoshf"},
- {"asinf", "__nv_asinf"},
- {"asinhf", "__nv_asinhf"},
- {"atanf", "__nv_atanf"},
- {"atanhf", "__nv_atanhf"},
- {"atan2f", "__nv_atan2f"},
- {"cbrtf", "__nv_cbrtf"},
- {"ceilf", "__nv_ceilf"},
- {"copysignf", "__nv_copysignf"},
- {"coshf", "__nv_coshf"},
- {"expf", "__nv_expf"},
- {"exp2f", "__nv_exp2f"},
- {"expm1f", "__nv_expm1f"},
- {"fdimf", "__nv_fdimf"},
- {"floorf", "__nv_floorf"},
- {"fmaxf", "__nv_fmaxf"},
- {"fminf", "__nv_fminf"},
+
+#define LDMAP(name) \
+ {name "f", "__nv_" name "f"}, \
+ {name, "__nv_" name},
+ LDMAP("acos")
+ LDMAP("acosh")
+ LDMAP("asin")
+ LDMAP("asinh")
+ LDMAP("atan")
+ LDMAP("atanh")
+ LDMAP("atan2")
+ LDMAP("cbrt")
+ LDMAP("ceil")
+ LDMAP("copysign")
+ LDMAP("cosh")
+ LDMAP("exp")
+ LDMAP("exp2")
+ LDMAP("expm1")
+ LDMAP("fdim")
+ LDMAP("floor")
+ LDMAP("fmax")
+ LDMAP("fmin")
+ LDMAP("hypot")
+ LDMAP("ilogb")
+ LDMAP("lgamma")
+ LDMAP("log")
+ LDMAP("log2")
+ LDMAP("log10")
+ LDMAP("log1p")
+ LDMAP("logb")
+ LDMAP("nextafter")
+ LDMAP("remainder")
+ LDMAP("rint")
+ LDMAP("round")
+ LDMAP("sinh")
+ LDMAP("sqrt")
+ LDMAP("tan")
+ LDMAP("tanh")
+ LDMAP("trunc")
+#undef LDMAP
+
+ {"llvm.pow.f32", "__nv_powf"},
+ {"llvm.pow.f64", "__nv_pow"},
+
// TODO: frexp
- {"hypotf", "__nv_hypotf"},
- {"ilogbf", "__nv_ilogbf"},
// TODO: ldexp
- {"lgammaf", "__nv_lgammaf"},
// TODO: lgamma_r
- {"logf", "__nv_logf"},
- {"log2f", "__nv_log2f"},
- {"log10f", "__nv_log10f"},
- {"log1pf", "__nv_log1pf"},
- {"logbf", "__nv_logbf"},
// TODO: modf
- {"nextafterf", "__nv_nextafterf"},
- {"llvm.pow.f32", "__nv_powf"},
// TODO: pown
- {"remainderf", "__nv_remainderf"},
// TODO: remquo
- {"rintf", "__nv_rintf"},
// TODO: rootn
- {"roundf", "__nv_roundf"},
- {"sinhf", "__nv_sinhf"},
- {"sqrtf", "__nv_sqrtf"},
- {"tanf", "__nv_tanf"},
- {"tanhf", "__nv_tanhf"},
- {"truncf", "__nv_truncf"},
};
size_t num_functions = sizeof(function_map)/sizeof(function_map_entry);
|
Fix filtering in blend test util | @@ -226,9 +226,9 @@ int main(int argc, char **argv)
// Bilinear filter with a half-pixel offset
float r_src = static_cast<float>(pixel_in_00[0] + pixel_in_01[0] + pixel_in_10[0] + pixel_in_11[0]) / (255.0f * 4.0f);
- float g_src = static_cast<float>(pixel_in_00[1] + pixel_in_01[1] + pixel_in_10[1] + pixel_in_11[2]) / (255.0f * 4.0f);
- float b_src = static_cast<float>(pixel_in_00[2] + pixel_in_01[2] + pixel_in_10[2] + pixel_in_11[3]) / (255.0f * 4.0f);
- float a_src = static_cast<float>(pixel_in_00[3] + pixel_in_01[3] + pixel_in_10[3] + pixel_in_11[4]) / (255.0f * 4.0f);
+ float g_src = static_cast<float>(pixel_in_00[1] + pixel_in_01[1] + pixel_in_10[1] + pixel_in_11[1]) / (255.0f * 4.0f);
+ float b_src = static_cast<float>(pixel_in_00[2] + pixel_in_01[2] + pixel_in_10[2] + pixel_in_11[2]) / (255.0f * 4.0f);
+ float a_src = static_cast<float>(pixel_in_00[3] + pixel_in_01[3] + pixel_in_10[3] + pixel_in_11[3]) / (255.0f * 4.0f);
if (use_linear == false)
{
|
apps/examples/pwfb/pwfb_main.c: Temporarily work around a race condition by adding a delay. | @@ -396,6 +396,17 @@ static bool pwfb_configure_window(FAR struct pwfb_state_s *st, int wndx,
goto errout_with_hwnd;
}
+ /* There is a race condition which we resole by simply waiting a bit here:
+ * In order for the size and position to take effect, a command is sent to
+ * server which responds with an event. So we need to synchronize at this
+ * point, or the following fill will fail.
+ *
+ * REVISIT: Here a dumb wait is used. It be better to have a firm
+ * handshake to when the new size and position are in effect.
+ */
+
+ usleep(500 * 1000);
+
/* Create a bounding box. This is actually too large because it does not
* account for the boarder widths. However, NX should clip the fill to
* stay within the frame.
|
zephyr/drivers/cros_displight/cros_displight.c: Format with clang-format
BRANCH=none
TEST=none | @@ -38,8 +38,8 @@ static void displight_set_duty(int percent)
pulse_ns = DIV_ROUND_NEAREST(DISPLIGHT_PWM_PERIOD_NS * percent, 100);
- LOG_DBG("displight PWM %s set percent (%d), pulse %d",
- pwm_dev->name, percent, pulse_ns);
+ LOG_DBG("displight PWM %s set percent (%d), pulse %d", pwm_dev->name,
+ percent, pulse_ns);
rv = pwm_set(pwm_dev, DISPLIGHT_PWM_CHANNEL, DISPLIGHT_PWM_PERIOD_NS,
pulse_ns, DISPLIGHT_PWM_FLAGS);
|
line~: clipping at maxsize | @@ -182,6 +182,7 @@ static void line_list(t_line *x, t_symbol *s, int ac, t_atom *av)
odd = natoms % 2;
nsegs = natoms / 2;
if (odd) nsegs++;
+ /*
if (nsegs > x->x_size)
{
int ns = nsegs = LINE_MAX_SIZE;
@@ -194,6 +195,14 @@ static void line_list(t_line *x, t_symbol *s, int ac, t_atom *av)
odd = 0;
}
}
+ */
+
+ //clip at maxsize
+ if(nsegs > LINE_MAX_SIZE)
+ {
+ nsegs = LINE_MAX_SIZE;
+ odd = 0;
+ };
x->x_nsegs = nsegs;
segp = x->x_segs;
if (odd) nsegs--;
|
FIxed jited code for bwd non custom padding | @@ -425,9 +425,9 @@ LIBXSMM_API_DEFINITION libxsmm_dnn_err_t libxsmm_dnn_internal_create_conv_handle
if (handle->padding_flag == 1) {
descriptor.ifh_padded = handle->ifhp + 2 * handle->desc.pad_h;
descriptor.ifw_padded = handle->ifwp + 2 * handle->desc.pad_w;
- matcopyback_descriptor.m = handle->ifhp;
if (handle->buffer_format == LIBXSMM_DNN_TENSOR_FORMAT_LIBXSMM) {
matcopy_descriptor.m = handle->ifhp;
+ matcopyback_descriptor.m = handle->ifhp;
matcopy_descriptor.n = handle->ifwp * handle->ifmblock;
matcopyback_descriptor.n = handle->ifwp * handle->ifmblock;
matcopy_descriptor.lda = handle->ifwp * handle->ifmblock;
@@ -439,6 +439,7 @@ LIBXSMM_API_DEFINITION libxsmm_dnn_err_t libxsmm_dnn_internal_create_conv_handle
matcopy_descriptor.n = handle->ifmblock;
matcopy_descriptor.lda = handle->ifmblock;
matcopy_descriptor.ldb = handle->ifmblock;
+ matcopyback_descriptor.m = 1;
matcopyback_descriptor.n = handle->ifmblock;
matcopyback_descriptor.lda = handle->ifmblock;
matcopyback_descriptor.ldb = handle->ifmblock;
|
script: change the comment accordingly. | @@ -25,7 +25,7 @@ for n in /sys/devices/system/node/node[2-9]; do
echo 0 > $n/hugepages/hugepages-2048kB/nr_hugepages
done
-# reserve the first LLC to iokernel
+# reserve LLC to iokernel
modprobe msr
pqos -R l3cdp-any
pqos -e "llc:1=0x00003;llc:0=0xffffc;"
|
Update README.md
Code block | @@ -29,21 +29,29 @@ INSTALLATION
1. Download ecCodes from https://software.ecmwf.int/wiki/display/ECC/Releases
2. Unpack distribution:
- > tar -xzf eccodes-x.y.z-Source.tar.gz
+ ```
+ tar -xzf eccodes-x.y.z-Source.tar.gz
+ ```
3. Create a separate directory where to build ecCodes:
- > mkdir build
- > cd build
+ ```
+ mkdir build
+ cd build
+ ```
4. Run cmake pointing to the source and specify the installation location:
- > cmake ../eccodes-x.y.z-Source -DCMAKE_INSTALL_PREFIX=/path/to/where/you/install/eccodes
+ ```
+ cmake ../eccodes-x.y.z-Source -DCMAKE_INSTALL_PREFIX=/path/to/where/you/install/eccodes
+ ```
It is strongly recommended that you install into a clean directory
5. Compile, test and install:
- > make
- > ctest
- > make install
+ ```
+ make
+ ctest
+ make install
+ ```
For more details, please see:
|
Documentation change for automation only: update tunnel restart mechanism.
The SSH/HTTPS tunnel restart mechanism is changed to use the native SSH server ping/restart approach, rather than the autossh -M mechanism, since the SSH mechanism requires no extra spare ports. | @@ -367,7 +367,7 @@ sudo make install
...run `autossh` once, manually, as `sudo` in order to accept the signature of the remote server with something like:
```
-sudo /usr/local/bin/autossh -M 2000 -N -R 8888:localhost:8888 user@remote_machine -i path/to/ssh_key
+sudo /usr/local/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -N -R 8888:localhost:8888 user@remote_machine -i path/to/ssh_key
```
...and start `autossh` with a `systemd` file named something like `/etc/systemd/system/tunnel-https.service` containing something like the following:
@@ -381,7 +381,7 @@ After=network.target
Restart=on-failure
RestartSec=5
Environment=AUTOSSH_GATETIME=0
-ExecStart=/usr/local/bin/autossh -M 2000 -N -R 8888:localhost:8888 user@remote_machine -i path/to/ssh_key
+ExecStart=/usr/local/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -N -R 8888:localhost:8888 user@remote_machine -i path/to/ssh_key
ExecStop= /usr/bin/killall autossh
[Install]
@@ -396,4 +396,4 @@ sudo systemctl enable tunnel-https.service
sudo systemctl start tunnel-https.service
```
-...and the same with a `tunnel-ssh` `systemd` file for the SSH tunnel also (incrementing the monitoring port number used by `autossh` by 2, e.g. `-M 2002`).
\ No newline at end of file
+...and the same with a `tunnel-ssh` `systemd` file for the SSH tunnel also. This will cause the server to send "alive" messages every 30 seconds and for the tunnel to be restarted after three such messages have gone missing.
\ No newline at end of file
|
Nicer spelling and layout. | @@ -146,7 +146,7 @@ check_mod(struct config_file* cfg, struct module_func_block* fb)
edns_known_options_delete(&env);
}
-/** true is addr is a localhost address, 127.0.0.1 or ::1 (@port) */
+/** true if addr is a localhost address, 127.0.0.1 or ::1 (@port) */
static int
str_addr_is_localhost(const char* a)
{
@@ -165,14 +165,16 @@ donotquerylocalhostcheck(struct config_file* cfg)
for(p=cfg->forwards; p; p=p->next) {
for(s=p->addrs; s; s=s->next) {
if(str_addr_is_localhost(s->str)) {
- fprintf(stderr, "unbound-checkconf: warning: forward-addr: '%s' is specified for forward-zone: '%s', but do-not-query-localhost: yes means that the address will not be used for lookups.\n", s->str, p->name);
+ fprintf(stderr, "unbound-checkconf: warning: forward-addr: '%s' is specified for forward-zone: '%s', but do-not-query-localhost: yes means that the address will not be used for lookups.\n",
+ s->str, p->name);
}
}
}
for(p=cfg->stubs; p; p=p->next) {
for(s=p->addrs; s; s=s->next) {
if(str_addr_is_localhost(s->str)) {
- fprintf(stderr, "unbound-checkconf: warning: stub-addr: '%s' is specified for stub-zone: '%s', but do-not-query-localhost: yes means that the address will not be used for lookups.\n", s->str, p->name);
+ fprintf(stderr, "unbound-checkconf: warning: stub-addr: '%s' is specified for stub-zone: '%s', but do-not-query-localhost: yes means that the address will not be used for lookups.\n",
+ s->str, p->name);
}
}
}
|
adds some base64 en/de-coding tests | ?~(out abet ((slog out) abet))
::
++ test-base64
- =/ jon '{"iss":"joe","exp":1300819380,"http://example.com/is_root":true}'
;: weld
%- expect-eq !>
- :- 'AQAB'
- (en-base64url 65.537)
+ ['AQAB' (en-base64url 65.537)]
%- expect-eq !>
- :- 65.537
- (need (de-base64url 'AQAB'))
- :: expected value includes newlines
- :: %- expect-eq !>
- :: ~& (en-base64:mimes:html jon)
- :: :- %+ weld
- :: "eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQo"
- :: "gImh0dHA6Ly9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ"
- :: (en-base64url jon)
+ [65.537 (need (de-base64url 'AQAB'))]
+ :: echo "hello" | base64
+ %- expect-eq !>
+ ['aGVsbG8K' (en:base64 'hello\0a')]
+ %- expect-eq !>
+ ['hello\0a' (need (de:base64 'aGVsbG8K'))]
+ :: echo -n -e "\x01\x01\x02\x03" | base64
+ %- expect-eq !>
+ ['AQECAw==' (en:base64 (swp 3 0x101.0203))]
+ %- expect-eq !>
+ [0x302.0101 (need (de:base64 'AQECAw=='))]
==
::
++ test-asn1
|
Added docstrings to pyutils.py. | @@ -4,8 +4,11 @@ import numpy as np
import core
def check(status):
- """
- Check the status returned by a ccllib function.
+ """Check the status returned by a ccllib function.
+
+ Args:
+ status (int or core.error_types): Flag or error describing the success of a function.
+
"""
# Check for normal status (no action required)
if status == 0: return
@@ -21,9 +24,12 @@ def check(status):
def _cosmology_obj(cosmo):
- """
- Returns a ccl_cosmology object, given an input object which may be
+ """Returns a ccl_cosmology object, given an input object which may be
ccl_cosmology, the Cosmology wrapper class, or an invalid type.
+
+ Args:
+ cosmo (ccl_cosmology or Cosmology): The input cosmology which gets converted to a ccl_cosmology.
+
"""
if isinstance(cosmo, lib.cosmology):
return cosmo
@@ -34,9 +40,15 @@ def _cosmology_obj(cosmo):
def _vectorize_fn_simple(fn, fn_vec, x, returns_status=True):
- """
- Generic wrapper to allow vectorized (1D array) access to CCL functions with
+ """Generic wrapper to allow vectorized (1D array) access to CCL functions with
one vector argument (but no dependence on cosmology).
+
+ Args:
+ fn (callable): Function with a single argument.
+ fn_vec (callable): Function that has a vectorized implementation in a .i file.
+ x (float or array_like): Argument to fn.
+ returns_stats (bool): Indicates whether fn returns a status.
+
"""
status = 0
if isinstance(x, float):
@@ -64,9 +76,16 @@ def _vectorize_fn_simple(fn, fn_vec, x, returns_status=True):
def _vectorize_fn(fn, fn_vec, cosmo, x, returns_status=True):
- """
- Generic wrapper to allow vectorized (1D array) access to CCL functions with
- one vector argument.
+ """Generic wrapper to allow vectorized (1D array) access to CCL functions with
+ one vector argument, with a cosmology dependence.
+
+ Args:
+ fn (callable): Function with a single argument.
+ fn_vec (callable): Function that has a vectorized implementation in a .i file.
+ cosmo (ccl_cosmology or Cosmology): The input cosmology which gets converted to a ccl_cosmology.
+ x (float or array_like): Argument to fn.
+ returns_stats (bool): Indicates whether fn returns a status.
+
"""
# Access ccl_cosmology object
cosmo = _cosmology_obj(cosmo)
@@ -97,9 +116,18 @@ def _vectorize_fn(fn, fn_vec, cosmo, x, returns_status=True):
def _vectorize_fn2(fn, fn_vec, cosmo, x, z, returns_status=True):
- """
- Generic wrapper to allow vectorized (1D array) access to CCL functions with
- one vector argument and one scalar argument.
+
+ """Generic wrapper to allow vectorized (1D array) access to CCL functions with
+ one vector argument and one scalar argument, with a cosmology dependence.
+
+ Args:
+ fn (callable): Function with a single argument.
+ fn_vec (callable): Function that has a vectorized implementation in a .i file.
+ cosmo (ccl_cosmology or Cosmology): The input cosmology which gets converted to a ccl_cosmology.
+ x (float or array_like): Argument to fn.
+ z (float): Scalar argument to fn.
+ returns_stats (bool): Indicates whether fn returns a status.
+
"""
# Access ccl_cosmology object
cosmo = _cosmology_obj(cosmo)
|
Bugfix: nsa_socket_internal() must not change the blocking mode of an underlying system socket. | @@ -464,16 +464,6 @@ int nsa_socket_internal(int domain, int type, int protocol,
neatSocket->ns_socket_sd = customFD;
}
- /* ====== Set socket into non-blocking mode =========================== */
- if(neatSocket->ns_socket_sd >= 0) {
- // Do not change blocking mode for stdout, stderr and stdin.
- if( (neatSocket->ns_socket_sd != STDOUT_FILENO) &&
- (neatSocket->ns_socket_sd != STDERR_FILENO) &&
- (neatSocket->ns_socket_sd != STDIN_FILENO) ) {
- set_non_blocking(neatSocket->ns_socket_sd);
- }
- }
-
/* ====== Initialize NEAT socket ====================================== */
rbt_node_new(&neatSocket->ns_node);
es_new(&neatSocket->ns_read_signal, NULL);
|
kukui: Disable eMMC power supply on boot
Allows reworked boards to boot using eMMC emulation, without
manual steps.
BRANCH=none
TEST=Flash and boot kukui
Commit-Ready: ChromeOS CL Exonerator Bot | @@ -216,6 +216,9 @@ void emmc_task(void *u)
/* Are we currently transmitting data? */
int tx = 0;
+ /* TODO(b:111773571): Remove this once we fix eMMC power supply. */
+ mt6370_set_ldo_voltage(0);
+
emmc_init_spi();
gpio_enable_interrupt(GPIO_EMMC_CMD);
@@ -231,6 +234,7 @@ void emmc_task(void *u)
/*
* TODO(b:110907438): After the bootblock has been transferred
* and AP has booted, disable SPI controller and interrupt.
+ * TODO(b:111773571): Also, enable eMMC power supply.
*/
/* Wait for a command */
@@ -304,7 +308,7 @@ void emmc_task(void *u)
}
}
-/* TODO(yllin): Remove this command once finish bring-up. */
+/* TODO(b:111773571): Remove this command once finish bring-up. */
static int command_emmc_power(int argc, char **argv)
{
int rv;
|
py/stream: Update comment for mp_stream_write_adaptor. | @@ -242,7 +242,7 @@ mp_obj_t mp_stream_write(mp_obj_t self_in, const void *buf, size_t len, byte fla
}
}
-// XXX hack
+// This is used to adapt a stream object to an mp_print_t interface
void mp_stream_write_adaptor(void *self, const char *buf, size_t len) {
mp_stream_write(MP_OBJ_FROM_PTR(self), buf, len, MP_STREAM_RW_WRITE);
}
|
Add \t' to system info message for readability | @@ -93,7 +93,7 @@ void sysinfo(void)
do {
nread = read(fd, sysinfo_str, MAX_BUF_SIZE);
sysinfo_str[nread] = '\0';
- printf("%s", sysinfo_str);
+ printf("\t%s", sysinfo_str);
} while (nread == MAX_BUF_SIZE);
close(fd);
printf("\n");
|
No ESP in non-white | @@ -65,6 +65,7 @@ def flash_release(path=None, st_serial=None):
panda.close()
# flashing ESP
+ if panda.is_white():
status("4. Flashing ESP (slow!)")
align = lambda x, sz=0x1000: x+"\xFF"*((sz-len(x)) % sz)
esp = ESPROM(st_serial)
@@ -78,6 +79,8 @@ def flash_release(path=None, st_serial=None):
del flasher
del esp
time.sleep(1)
+ else:
+ status("4. No ESP in non-white panda")
# check for connection
status("5. Verifying version")
|
Better relative tray positioning. | @@ -436,44 +436,35 @@ void ComputeTraySize(TrayType *tp)
tp->x = tp->requestedX;
tp->y = tp->requestedY;
- /* Determine on which screen the tray will reside. */
- switch(tp->valign) {
- case TALIGN_TOP:
- y = 0;
- break;
- case TALIGN_BOTTOM:
- y = rootHeight - 1;
- break;
- case TALIGN_CENTER:
- y = 1 + rootHeight / 2;
- break;
- default:
+ /* Determine x and y offsets for the tray. */
+ if(tp->valign == TALIGN_FIXED) {
if(tp->y < 0) {
y = rootHeight + tp->y;
} else {
y = tp->y;
}
- break;
+ } else {
+ y = 0;
}
- switch(tp->halign) {
- case TALIGN_LEFT:
- x = 0;
- break;
- case TALIGN_RIGHT:
- x = rootWidth - 1;
- break;
- case TALIGN_CENTER:
- x = 1 + rootWidth / 2;
- break;
- default:
+ if(tp->halign == TALIGN_FIXED) {
if(tp->x < 0) {
x = rootWidth + tp->x;
} else {
x = tp->x;
}
- break;
+ } else {
+ x = 0;
}
+
+ /* Determine the screen.
+ * Note that we assume the primary screen unless fixed dimensions
+ * are provided.
+ */
+ if(tp->valign == TALIGN_FIXED && tp->halign == TALIGN_FIXED) {
sp = GetCurrentScreen(x, y);
+ } else {
+ sp = GetScreen(0);
+ }
/* Determine the missing dimension. */
if(tp->layout == LAYOUT_HORIZONTAL) {
|
Check if not using Opaque PSK in ECHDE-PSK PSA version of ssl_parse_client_key_exchange() | @@ -4046,6 +4046,10 @@ static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl )
psa_status_t destruction_status = PSA_ERROR_CORRUPTION_DETECTED;
uint8_t ecpoint_len;
+ /* Opaque PSKs are currently only supported for PSK-only. */
+ if( ssl_use_opaque_psk( ssl ) == 1 )
+ return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE );
+
mbedtls_ssl_handshake_params *handshake = ssl->handshake;
if( ( ret = ssl_parse_client_psk_identity( ssl, &p, end ) ) != 0 )
|
mbedtls: fix crt_bundle test to ensure proper server start event
This fixes occasional test failure that was observed due to
client task getting started before server was up. | @@ -168,6 +168,9 @@ void server_task(void *pvParameters)
goto exit;
}
+ /* Signal that server is up and hence client task can start now */
+ xSemaphoreGive(*sema);
+
bool connected = false;
while (!exit_flag) {
@@ -272,8 +275,6 @@ int client_task(const uint8_t *bundle, esp_crt_validate_res_t *res)
esp_crt_bundle_set(bundle);
}
-
-
ESP_LOGI(TAG, "Connecting to %s:%s...", SERVER_ADDRESS, SERVER_PORT);
if ((ret = mbedtls_net_connect(&client.client_fd, SERVER_ADDRESS, SERVER_PORT, MBEDTLS_NET_PROTO_TCP)) != 0) {
ESP_LOGE(TAG, "mbedtls_net_connect returned -%x", -ret);
@@ -319,13 +320,16 @@ TEST_CASE("custom certificate bundle", "[mbedtls]")
test_case_uses_tcpip();
- xSemaphoreHandle exit_sema = xSemaphoreCreateBinary();
+ xSemaphoreHandle signal_sem = xSemaphoreCreateBinary();
+ TEST_ASSERT_NOT_NULL(signal_sem);
exit_flag = false;
- xTaskCreate(server_task, "server task", 8192, &exit_sema, 10, NULL);
+ xTaskCreate(server_task, "server task", 8192, &signal_sem, 10, NULL);
// Wait for the server to start up
- vTaskDelay(100 / portTICK_PERIOD_MS);
+ if (!xSemaphoreTake(signal_sem, 10000 / portTICK_PERIOD_MS)) {
+ TEST_FAIL_MESSAGE("signal_sem not released, server start failed");
+ }
/* Test with default crt bundle that doesnt contain the ca crt */
client_task(NULL, &validate_res);
@@ -337,11 +341,11 @@ TEST_CASE("custom certificate bundle", "[mbedtls]")
exit_flag = true;
- if (!xSemaphoreTake(exit_sema, 10000 / portTICK_PERIOD_MS)) {
- TEST_FAIL_MESSAGE("exit_sem not released by server task");
+ if (!xSemaphoreTake(signal_sem, 10000 / portTICK_PERIOD_MS)) {
+ TEST_FAIL_MESSAGE("signal_sem not released, server exit failed");
}
- vSemaphoreDelete(exit_sema);
+ vSemaphoreDelete(signal_sem);
}
#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32S3)
|
Minor changes in cli and python migrate target. | @@ -28,7 +28,7 @@ endif()
set(target python-frontend-migrate)
add_custom_target(${target} ALL
- COMMAND ${CMAKE_COMMAND} -E env "PYTHONPATH=${CMAKE_CURRENT_BINARY_DIR};$ENV{PYTHONPATH}" ${PYTHON_EXECUTABLE} ${LOADER_SCRIPT_PATH}/manage.py migrate
+ COMMAND ${CMAKE_COMMAND} -E env PYTHONPATH="${CMAKE_CURRENT_BINARY_DIR};$ENV{PYTHONPATH}" ${PYTHON_EXECUTABLE} ${LOADER_SCRIPT_PATH}/manage.py migrate
)
set_target_properties(${target}
|
doc: add MCE check avoidance explanation
Add a reference to the intel.com white paper on MCE avoidance to the
Disable MCE Workaround configuration option | @@ -111,7 +111,7 @@ If your VM is not a security VM, leave this option unchecked. </xs:documentation
</xs:element>
<xs:element name="MCE_ON_PSC_DISABLED" type="Boolean" default="n">
<xs:annotation acrn:title="Disable MCE workaround" acrn:views="advanced">
- <xs:documentation>Disable the software workaround for Machine Check Error on Page Size Change (erratum in some processor families).</xs:documentation>
+ <xs:documentation>Disable the software workaround for Machine Check Error on Page Size Change (erratum in some processor families). For more information about this workaround and affected processors, see this `MCE Avoidance on Page Size Change White Paper <https://www.intel.com/content/www/us/en/developer/articles/troubleshooting/software-security-guidance/technical-documentation/machine-check-error-avoidance-page-size-change.html>`_.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RDT" type="RDTType">
|
doc: Fix link reference for PGSSLMAXPROTOCOLVERSION
The link was pointing to the minimum protocol version. Incorrect as of
Author: Daniel Gustafsson
Discussion:
Backpatch-through: 13 | @@ -7872,7 +7872,7 @@ myEventProc(PGEventId evtId, void *evtInfo, void *passThrough)
<primary><envar>PGSSLMAXPROTOCOLVERSION</envar></primary>
</indexterm>
<envar>PGSSLMAXPROTOCOLVERSION</envar> behaves the same as the <xref
- linkend="libpq-connect-ssl-min-protocol-version"/> connection parameter.
+ linkend="libpq-connect-ssl-max-protocol-version"/> connection parameter.
</para>
</listitem>
|
free the Post-Handshake Auth digest when there is an error saving the digest | @@ -2381,6 +2381,8 @@ int tls13_save_handshake_digest_for_pha(SSL *s)
if (!EVP_MD_CTX_copy_ex(s->pha_dgst,
s->s3.handshake_dgst)) {
SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
+ EVP_MD_CTX_free(s->pha_dgst);
+ s->pha_dgst = NULL;
return 0;
}
}
|
libhfcommon/util: change an incorrect call for non-x86 archs | @@ -82,7 +82,7 @@ __attribute__((always_inline)) static inline bool ATOMIC_BITMAP_SET(uint8_t* add
: "Ir"(offset % 8));
return old;
#else /* defined(__x86_64__) || defined(__i386__) */
- return (ATOMIC_POST_OR_RELAXED(*addr, mask) & mask);
+ return (ATOMIC_POST_OR(*addr, mask) & mask);
#endif /* defined(__x86_64__) || defined(__i386__) */
}
|
SharpYuvConvert: fix a race on SharpYuvGetCPUInfo
Rather than make a copy, requiring an additional lock/unlock only to set
the pointer to itself, pass the address of SharpYuvGetCPUInfo and use it
as a sentinel to avoid updating the pointer. | @@ -439,7 +439,11 @@ void SharpYuvInit(VP8CPUInfo cpu_info_func) {
static volatile VP8CPUInfo sharpyuv_last_cpuinfo_used =
(VP8CPUInfo)&sharpyuv_last_cpuinfo_used;
LOCK_ACCESS;
+ // Only update SharpYuvGetCPUInfo when called from external code to avoid a
+ // race on reading the value in SharpYuvConvert().
+ if (cpu_info_func != (VP8CPUInfo)&SharpYuvGetCPUInfo) {
SharpYuvGetCPUInfo = cpu_info_func;
+ }
if (sharpyuv_last_cpuinfo_used == SharpYuvGetCPUInfo) {
UNLOCK_ACCESS_AND_RETURN;
}
@@ -484,7 +488,8 @@ int SharpYuvConvert(const void* r_ptr, const void* g_ptr,
// Stride should be even for uint16_t buffers.
return 0;
}
- SharpYuvInit(SharpYuvGetCPUInfo);
+ // The address of the function pointer is used to avoid a read race.
+ SharpYuvInit((VP8CPUInfo)&SharpYuvGetCPUInfo);
// Add scaling factor to go from rgb_bit_depth to yuv_bit_depth, to the
// rgb->yuv conversion matrix.
|
tests: runtime: out_elasticsearch: use new test prototype | @@ -55,7 +55,6 @@ static void cb_check_replace_dots(void *ctx, int ffd,
char *out_js = res_data;
char *record = "\"key_4\":5000";
- printf("%s\n", out_js);
p = strstr(out_js, record);
TEST_CHECK(p != NULL);
flb_free(res_data);
|
Add Registration test | @@ -1876,8 +1876,20 @@ void QuicTestCommonSetParam()
void QuicTestRegistrationSetParam()
{
//
- // No parameter for Registration as of now
+ // No parameter for Registration
//
+ {
+ MsQuicRegistration Registration;
+ TEST_TRUE(Registration.IsValid());
+ uint32_t Dummy = 0;
+ TEST_QUIC_STATUS(
+ QUIC_STATUS_INVALID_PARAMETER,
+ MsQuic->SetParam(
+ Registration.Handle,
+ QUIC_PARAM_PREFIX_REGISTRATION,
+ sizeof(Dummy),
+ &Dummy));
+ }
}
void QuicTestConfigurationSetParam()
|
Fix crash on mouse motion on fullscreen container
container_at expects a workspace, not the fullscreened container.
Fixes | @@ -99,8 +99,7 @@ static struct sway_container *container_at_coords(
return ws;
}
if (ws->sway_workspace->fullscreen) {
- return container_at(ws->sway_workspace->fullscreen, lx, ly,
- surface, sx, sy);
+ return container_at(ws, lx, ly, surface, sx, sy);
}
if ((*surface = layer_surface_at(output,
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
|
CI: add a non-caching CI loop | @@ -80,6 +80,17 @@ jobs:
- name: make test
run: make test HARNESS_JOBS=${HARNESS_JOBS:-4}
+ non-caching:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: config
+ run: ./config enable-asan enable-ubsan no-cached-fetch && perl configdata.pm --dump
+ - name: make
+ run: make -s -j4
+ - name: make test
+ run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} OPENSSL_TEST_RAND_ORDER=0 TESTS="-test_fuzz* -test_ssl_* -test_evp -test_cmp_http -test_store -test_enc -[01][0-9]"
+
sanitizers:
runs-on: ubuntu-latest
steps:
|
Docs for device states | @@ -67,6 +67,8 @@ void DEV_IdleStateHandler(Device *device, const Event &event)
}
}
+/*! #2 This state checks that a valid NodeDescriptor is available.
+ */
void DEV_NodeDescriptorStateHandler(Device *device, const Event &event)
{
if (event.what() == REventStateEnter)
@@ -76,7 +78,7 @@ void DEV_NodeDescriptorStateHandler(Device *device, const Event &event)
DBG_Printf(DBG_INFO, "ZDP node descriptor verified: 0x%016llX\n", device->key());
device->setState(DEV_ActiveEndpointsStateHandler);
}
- else if (!device->reachable())
+ else if (!device->reachable()) // can't be queried, go back to #1 init
{
device->setState(DEV_InitStateHandler);
}
@@ -86,10 +88,10 @@ void DEV_NodeDescriptorStateHandler(Device *device, const Event &event)
device->startStateTimer(MinMacPollRxOn);
}
}
- else if (event.what() == REventNodeDescriptor)
+ else if (event.what() == REventNodeDescriptor) // received the node descriptor
{
device->stopStateTimer();
- device->setState(DEV_InitStateHandler);
+ device->setState(DEV_InitStateHandler); // evaluate egain from state #1 init
device->plugin()->enqueueEvent(Event(device->prefix(), REventAwake, 0, device->key()));
}
else if (event.what() == REventStateTimeout)
@@ -99,6 +101,8 @@ void DEV_NodeDescriptorStateHandler(Device *device, const Event &event)
}
}
+/*! #3 This state checks that active endpoints are known.
+ */
void DEV_ActiveEndpointsStateHandler(Device *device, const Event &event)
{
if (event.what() == REventStateEnter)
@@ -131,6 +135,8 @@ void DEV_ActiveEndpointsStateHandler(Device *device, const Event &event)
}
}
+/*! #4 This state checks that for all active endpoints simple descriptors are known.
+ */
void DEV_SimpleDescriptorStateHandler(Device *device, const Event &event)
{
if (event.what() == REventStateEnter)
@@ -175,6 +181,8 @@ void DEV_SimpleDescriptorStateHandler(Device *device, const Event &event)
}
}
+/*! #4 This state checks that modelId of the device is known.
+ */
void DEV_ModelIdStateHandler(Device *device, const Event &event)
{
if (event.what() == REventStateEnter)
@@ -208,7 +216,7 @@ void DEV_ModelIdStateHandler(Device *device, const Event &event)
DBG_Printf(DBG_INFO, "DEV not reachable, check modelId later: 0x%016llX\n", device->key());
device->setState(DEV_InitStateHandler);
}
- else
+ else // query modelId from basic cluster
{
quint8 basicClusterEp = 0x00;
|
Correct version of the st7789.cpp driver! | @@ -51,11 +51,11 @@ namespace pimoroni {
sleep_ms(150);
if(width == 240 && height == 240) {
- madctl = 0x04;
+ madctl[0] = 0x04;
}
if(width == 240 && height == 135) {
- madctl = 0x70;
+ madctl[0] = 0x70;
}
command(reg::MADCTL, 1, madctl); // row/column addressing order - rgb pixel order
|
libhfuzz: __wrap_* functions don't need to be weak | @@ -143,7 +143,7 @@ static inline void* _memmem(
/* Define a weak function x, as well as __wrap_x pointing to x */
#define XVAL(x) x
#define HF_WEAK_WRAP(ret, func, ...) \
- __attribute__((weak, alias(#func))) XVAL(ret) XVAL(__wrap_##func) (__VA_ARGS__); \
+ __attribute__((alias(#func))) XVAL(ret) XVAL(__wrap_##func) (__VA_ARGS__); \
__attribute__((weak)) XVAL(ret) XVAL(func) (__VA_ARGS__)
/* Typical libc wrappers */
|
make: remove build system dependency on `git` using some hooks
Currently for checking IDF version and submodules existence,
build system uses `git` commands. But, it could be possible use-case
where `git` is not installed (assuming IDF is flattened in source format)
on system and build happens without any warnings. | @@ -227,7 +227,12 @@ endif
@echo $(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_ALL_FLASH_ARGS)
+# If we have `version.txt` then prefer that for extracting IDF version
+ifeq ("$(wildcard ${IDF_PATH}/version.txt)","")
IDF_VER := $(shell cd ${IDF_PATH} && git describe --always --tags --dirty)
+else
+IDF_VER := `cat ${IDF_PATH}/version.txt`
+endif
# Set default LDFLAGS
EXTRA_LDFLAGS ?=
@@ -485,6 +490,8 @@ clean: app-clean bootloader-clean config-clean
#
# This only works for components inside IDF_PATH
check-submodules:
+# Check if .gitmodules exists, otherwise skip submodule check, assuming flattened structure
+ifneq ("$(wildcard ${IDF_PATH}/.gitmodules)","")
# Dump the git status for the whole working copy once, then grep it for each submodule. This saves a lot of time on Windows.
GIT_STATUS := $(shell cd ${IDF_PATH} && git status --porcelain --ignore-submodules=dirty)
@@ -509,6 +516,7 @@ endef
# filter/subst in expression ensures all submodule paths begin with $(IDF_PATH), and then strips that prefix
# so the argument is suitable for use with 'git submodule' commands
$(foreach submodule,$(subst $(IDF_PATH)/,,$(filter $(IDF_PATH)/%,$(COMPONENT_SUBMODULES))),$(eval $(call GenerateSubmoduleCheckTarget,$(submodule))))
+endif # End check for .gitmodules existence
# PHONY target to list components in the build and their paths
|
[core] fix fd sharing when splitting file chunk
(bug on master branch; never released)
fix fd sharing in chunkqueue_steal_partial_file_chunk() | @@ -482,6 +482,7 @@ static void chunkqueue_steal_partial_file_chunk(chunkqueue * const restrict dest
if (c->file.fd >= 0) {
chunk * const d = dest->last;
if (c->file.refchg) {
+ d->file.fd = c->file.fd;
d->file.ref = c->file.ref;
d->file.refchg = c->file.refchg;
d->file.refchg(d->file.ref, 1);
|
grunt: Add I2C support for the BMI160
We need to enable I2C_PORT_ACCEL so that the driver supports I2C
transfers.
BRANCH=none
TEST=On EC console:
> accelinit 1
> accelread 1
With this CL we avoid an error | #define I2C_PORT_TCPC1 NPCX_I2C_PORT2_0
#define I2C_PORT_THERMAL NPCX_I2C_PORT3_0
#define I2C_PORT_SENSOR NPCX_I2C_PORT7_0
+/* Accelerometer and Gyroscope are the same device. */
+#define I2C_PORT_ACCEL I2C_PORT_SENSOR
#define CONFIG_BRINGUP /* TODO(teravest): Remove this later. */
|
cmake: fixes stream.h include so it can be found. | @@ -118,6 +118,7 @@ set(INTERFACE_FILES
include/criterion/internal/assert/tag.h
include/criterion/internal/assert/tostr.h
include/criterion/internal/assert/types.h
+ include/criterion/internal/assert/stream.h
include/criterion/internal/capabilities.h
include/criterion/internal/common.h
include/criterion/internal/deprecation.h
@@ -135,6 +136,7 @@ set(INTERFACE_FILES
include/criterion/logging.h
include/criterion/new/assert.h
include/criterion/new/memory.h
+ include/criterion/new/stream.h
include/criterion/options.h
include/criterion/output.h
include/criterion/parameterized.h
|
zephyr/shim/src/tasks.c: Format with clang-format
BRANCH=none
TEST=none | @@ -18,7 +18,6 @@ BUILD_ASSERT(EC_TASK_PRIORITY(EC_TASK_PRIO_LOWEST) < K_IDLE_PRIO,
"CONFIG_NUM_PREEMPT_PRIORITIES too small, some tasks would run at "
"idle priority");
-
/* Declare all task stacks here */
#define CROS_EC_TASK(name, e, p, size, pr) \
K_THREAD_STACK_DEFINE(name##_STACK, size);
@@ -69,14 +68,12 @@ struct task_ctx_data {
};
#define CROS_EC_TASK(_name, _entry, _parameter, _size, _prio) \
- { \
- .entry = _entry, \
+ { .entry = _entry, \
.parameter = _parameter, \
.stack = _name##_STACK, \
.stack_size = _size, \
.priority = EC_TASK_PRIORITY(_prio), \
- COND_CODE_1(CONFIG_THREAD_NAME, (.name = #_name,), ()) \
- },
+ COND_CODE_1(CONFIG_THREAD_NAME, (.name = #_name, ), ()) },
#define TASK_TEST(_name, _entry, _parameter, _size) \
CROS_EC_TASK(_name, _entry, _parameter, _size)
const static struct task_ctx_cfg shimmed_tasks_cfg[TASK_ID_COUNT] = {
@@ -238,8 +235,7 @@ uint32_t task_wait_event_mask(uint32_t event_mask, int timeout_us)
return events & event_mask;
}
-static void task_entry(void *task_context_cfg,
- void *task_context_data,
+static void task_entry(void *task_context_cfg, void *task_context_data,
void *unused1)
{
ARG_UNUSED(task_context_data);
@@ -335,16 +331,10 @@ void start_ec_tasks(void)
* comment in config.h for CONFIG_TASK_LIST for existing flags
* implementation.
*/
- data->zephyr_tid = k_thread_create(
- &data->zephyr_thread,
- cfg->stack,
- cfg->stack_size,
- task_entry,
- (void *)cfg,
- data,
- NULL,
- cfg->priority,
- 0,
+ data->zephyr_tid = k_thread_create(&data->zephyr_thread,
+ cfg->stack, cfg->stack_size,
+ task_entry, (void *)cfg,
+ data, NULL, cfg->priority, 0,
K_NO_WAIT);
#ifdef CONFIG_THREAD_NAME
|
start sponsor ping when we learn our sponsor | ::
=. life.ames-state life
=. crypto-core.ames-state (nol:nu:crub:crypto private-key)
+ :: recalculate each peer's symmetric key
+ ::
+ =/ our-private-key sec:ex:crypto-core.ames-state
+ =. peers.ames-state
+ %- ~(run by peers.ames-state)
+ |= =ship-state
+ ^+ ship-state
+ ::
+ ?. ?=(%known -.ship-state)
+ ship-state
+ ::
+ =/ =peer-state +.ship-state
+ =. symmetric-key.peer-state
+ (derive-symmetric-key public-key.+.ship-state our-private-key)
+ ::
+ [%known peer-state]
::
event-core
:: +on-publ: update pki data for peer or self
^+ event-core
::
(insert-peer-state ship (got-peer-state ship) life `@`encryption-key)
- :: +on-publ-sponsor: handle new or lost sponsor for peer
+ :: +on-publ-sponsor: handle new or lost sponsor for self or peer
::
:: TODO: handle sponsor loss
::
|= [=ship sponsor=(unit ship)]
^+ event-core
::
+ ?: =(our ship)
+ =. sponsor.ames-state ship
+ ping-sponsor
+ ::
=/ =peer-state (got-peer-state ship)
::
?~ sponsor
|
remove AOMP_BUILD_TRUNK and do not exclude .git directory when rsync | @@ -90,7 +90,7 @@ if [ "$1" == "install" ] ; then
fi
# Fix the banner to print the AOMP version string.
-if [ $AOMP_STANDALONE_BUILD == 1 ] && [ "$AOMP_BUILD_TRUNK" == 1 ] ; then
+if [ $AOMP_STANDALONE_BUILD == 1 ] ; then
cd $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME
if [ "$AOMP_CHECK_GIT_BRANCH" == 1 ] ; then
MONO_REPO_ID=`git log | grep -m1 commit | cut -d" " -f2`
@@ -131,8 +131,8 @@ if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then
echo "WARNING! BUILD_DIR($BUILD_DIR) != AOMP_REPOS($AOMP_REPOS)"
echo "SO REPLICATING AOMP_REPOS/$AOMP_PROJECT_REPO_NAME TO: $BUILD_DIR"
echo
- echo rsync -a --exclude ".git" $exclude_cmdline --delete $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME $BUILD_DIR 2>&1
- rsync -a --exclude ".git" $exclude_cmdline --delete $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME $BUILD_DIR 2>&1
+ echo "rsync -a $exclude_cmdline --delete $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME $BUILD_DIR"
+ rsync -a $exclude_cmdline --delete $AOMP_REPOS/$AOMP_PROJECT_REPO_NAME $BUILD_DIR 2>&1
fi
else
@@ -143,7 +143,7 @@ else
fi
fi
-if [ $AOMP_STANDALONE_BUILD == 1 ] && [ "$AOMP_BUILD_TRUNK" == 1 ] ; then
+if [ $AOMP_STANDALONE_BUILD == 1 ] ; then
cd $BUILD_DIR/build/$AOMP_PROJECT_REPO_NAME
if [ -f $BUILDCLFILE ] ; then
# only copy if there has been a change to the source.
|
fix: compilation errors of generated code | @@ -234,7 +234,7 @@ gen_default(FILE * fp, char * type)
fprintf(fp, "}\n\n");
fprintf(fp, "void free_list(struct %s **p) {\n", type);
- fprintf(fp, " ntl_free((void**)p, &_cleanup_);\n");
+ fprintf(fp, " ntl_free((void**)p, cleanup);\n");
fprintf(fp, "}\n\n");
fprintf(fp, "void list_from_json(char *str, size_t len, void ***p)\n");
@@ -245,7 +245,7 @@ gen_default(FILE * fp, char * type)
fprintf(fp, " d.init_elem = _init_;\n");
fprintf(fp, " d.elem_from_buf = from_json;\n");
fprintf(fp, " d.ntl_recipient_p= (void***)p;\n");
- fprintf(fp, " orka_str_to_ntl(str, len, &deserializer);\n");
+ fprintf(fp, " orka_str_to_ntl(str, len, &d);\n");
fprintf(fp, "}\n\n");
fprintf(fp, "void list_to_json(char *str, size_t len, void **p)\n");
|
[io] remove curious iparam when NSGS is not chosen | @@ -2255,9 +2255,9 @@ class MechanicsHdf5Runner(siconos.io.mechanics_hdf5.MechanicsHdf5):
#solverOptions.iparam[1]=Numerics.SICONOS_FRICTION_3D_NSGS_ERROR_EVALUATION_ADAPTIVE
#solverOptions.iparam[8]=1
# -- light error evaluation with full final
- if self._dimension ==3: # ugly
- solverOptions.iparam[1] = Numerics.SICONOS_FRICTION_3D_NSGS_ERROR_EVALUATION_LIGHT
- solverOptions.iparam[14] = Numerics.SICONOS_FRICTION_3D_NSGS_FILTER_LOCAL_SOLUTION_TRUE
+ if self._dimension ==3 and solver == Numerics.SICONOS_FRICTION_3D_NSGS: # ugly
+ solverOptions.iparam[Numerics.SICONOS_FRICTION_3D_IPARAM_ERROR_EVALUATION] = Numerics.SICONOS_FRICTION_3D_NSGS_ERROR_EVALUATION_LIGHT
+ solverOptions.iparam[Numerics.SICONOS_FRICTION_3D_NSGS_FILTER_LOCAL_SOLUTION] = Numerics.SICONOS_FRICTION_3D_NSGS_FILTER_LOCAL_SOLUTION_TRUE
osnspb.setNumericsVerboseMode(numerics_verbose)
|
travis: Update config
Move to using Ubuntu 18.04 rather than 14.04 (which has been out of
support for years now) and fix up some warnings from the config file
checker. | @@ -4,10 +4,14 @@ os:
- linux
- linux-ppc64le
+# NB: This is just the distro used for the container host
+dist: bionic
+services: docker
+
cache: ccache
env:
- matrix:
+ jobs:
- RUN_ON_CONTAINER=ubuntu-18.04
- RUN_ON_CONTAINER=ubuntu-20.04
- RUN_ON_CONTAINER=ubuntu-latest
@@ -18,7 +22,7 @@ env:
- RUN_ON_CONTAINER=debian-unstable
- RUN_ON_CONTAINER=docs
-matrix:
+jobs:
allow_failures:
- env: RUN_ON_CONTAINER=fedora-rawhide
- env: RUN_ON_CONTAINER=debian-unstable
@@ -28,12 +32,6 @@ matrix:
- os: linux-ppc64le
env: RUN_ON_CONTAINER=docs
-
-sudo: required
-services: docker
-
-dist: trusty
-
script:
- docker build --pull -t ${RUN_ON_CONTAINER} -f opal-ci/Dockerfile-${RUN_ON_CONTAINER} . &&
docker run --volume $HOME/.ccache:/root/.ccache --volume `pwd`:/build --rm -t $RUN_ON_CONTAINER bash -c "./opal-ci/build-${RUN_ON_CONTAINER}.sh";
@@ -51,8 +49,8 @@ addons:
deploy:
provider: pages
- skip-cleanup: true
- github-token: $GITHUB_TOKEN # set in travis-ci.org dashboard, marked secure
+ skip_cleanup: true
+ github_token: $GITHUB_TOKEN # set in travis-ci.org dashboard, marked secure
local_dir: "doc/_build/ghpages"
on:
branch: master
|
[bsp] add led task to easy confirm kernel is running | #include <board.h>
#include <rtthread.h>
+#include "peri_driver.h"
+
+#define INIT_STACK_SIZE 512
+#define LED_STACK_SIZE 256
+
#ifndef RT_USING_HEAP
/* if there is not enable heap, we should use static thread and stack. */
ALIGN(8)
-static rt_uint8_t init_stack[512];
+static rt_uint8_t init_stack[INIT_STACK_SIZE];
static struct rt_thread init_thread;
+
+ALIGN(8)
+static rt_uint8_t led_stack[LED_STACK_SIZE];
+static struct rt_thread led_thread;
#endif
void rt_init_thread_entry(void* parameter)
@@ -31,6 +40,24 @@ void rt_init_thread_entry(void* parameter)
#endif
}
+
+void rt_led_thread_entry(void *parameter)
+{
+ /* Initialize GPIO */
+ Chip_GPIO_Init(LPC_GPIO_PORT);
+ Chip_GPIO_PinSetDIR(LPC_GPIO_PORT, 0, 7, 1);
+ Chip_GPIO_PinSetState(LPC_GPIO_PORT, 0, 7, true);
+
+ while (1)
+ {
+ Chip_GPIO_PinSetState(LPC_GPIO_PORT, 0, 7, true);
+ rt_thread_delay(RT_TICK_PER_SECOND / 2);
+
+ Chip_GPIO_PinSetState(LPC_GPIO_PORT, 0, 7, false);
+ rt_thread_delay(RT_TICK_PER_SECOND / 2);
+ }
+}
+
int rt_application_init()
{
rt_thread_t tid;
@@ -38,7 +65,7 @@ int rt_application_init()
#ifdef RT_USING_HEAP
tid = rt_thread_create("init",
rt_init_thread_entry, RT_NULL,
- 2048, RT_THREAD_PRIORITY_MAX/3, 20);
+ INIT_STACK_SIZE, RT_THREAD_PRIORITY_MAX/3, 20);
#else
{
@@ -53,5 +80,23 @@ int rt_application_init()
if (tid != RT_NULL)
rt_thread_startup(tid);
+#ifdef RT_USING_HEAP
+ tid = rt_thread_create("led",
+ rt_led_thread_entry, RT_NULL,
+ LED_STACK_SIZE, RT_THREAD_PRIORITY_MAX/3, 20);
+#else
+ {
+
+ rt_err_t result;
+
+ tid = &led_thread;
+ result = rt_thread_init(tid, "led", rt_led_thread_entry, RT_NULL,
+ led_stack, sizeof(led_stack), RT_THREAD_PRIORITY_MAX / 4, 20);
+ RT_ASSERT(result == RT_EOK);
+ }
+#endif
+ if (tid != RT_NULL)
+ rt_thread_startup(tid);
+
return 0;
}
|
sysdeps/managarm: Convert sys_setuid to bragi | @@ -376,37 +376,26 @@ uid_t sys_getuid() {
int sys_setuid(uid_t uid) {
SignalGuard sguard;
- HelAction actions[3];
- globalQueue.trim();
- managarm::posix::CntRequest<MemoryAllocator> req(getSysdepsAllocator());
- req.set_request_type(managarm::posix::CntReqType::SET_UID);
- req.set_uid(uid);
+ managarm::posix::SetUidRequest<MemoryAllocator> req(getSysdepsAllocator());
- frg::string<MemoryAllocator> ser(getSysdepsAllocator());
- req.SerializeToString(&ser);
- actions[0].type = kHelActionOffer;
- actions[0].flags = kHelItemAncillary;
- actions[1].type = kHelActionSendFromBuffer;
- actions[1].flags = kHelItemChain;
- actions[1].buffer = ser.data();
- actions[1].length = ser.size();
- actions[2].type = kHelActionRecvInline;
- actions[2].flags = 0;
- HEL_CHECK(helSubmitAsync(getPosixLane(), actions, 3,
- globalQueue.getQueue(), 0, 0));
+ req.set_uid(uid);
- auto element = globalQueue.dequeueSingle();
- auto offer = parseSimple(element);
- auto send_req = parseSimple(element);
- auto recv_resp = parseInline(element);
+ auto [offer, send_head, recv_resp] =
+ exchangeMsgsSync(
+ getPosixLane(),
+ helix_ng::offer(
+ helix_ng::sendBragiHeadOnly(req, getSysdepsAllocator()),
+ helix_ng::recvInline()
+ )
+ );
- HEL_CHECK(offer->error);
- HEL_CHECK(send_req->error);
- HEL_CHECK(recv_resp->error);
+ HEL_CHECK(offer.error());
+ HEL_CHECK(send_head.error());
+ HEL_CHECK(recv_resp.error());
managarm::posix::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator());
- resp.ParseFromArray(recv_resp->data, recv_resp->length);
+ resp.ParseFromArray(recv_resp.data(), recv_resp.length());
if(resp.error() == managarm::posix::Errors::ACCESS_DENIED) {
return EPERM;
}else if(resp.error() == managarm::posix::Errors::ILLEGAL_ARGUMENTS) {
|
Add a multi thread test for downgrading keys | @@ -401,23 +401,46 @@ static void thread_shared_evp_pkey(void)
multi_success = 0;
}
+static void thread_downgrade_shared_evp_pkey(void)
+{
+#ifndef OPENSSL_NO_DEPRECATED_3_0
+ /*
+ * This test is only relevant for deprecated functions that perform
+ * downgrading
+ */
+ if (EVP_PKEY_get0(shared_evp_pkey) == NULL)
+ multi_success = 0;
+#else
+ /* Shouldn't ever get here */
+ multi_success = 0;
+#endif
+}
+
+
/*
* Do work in multiple worker threads at the same time.
* Test 0: General worker, using the default provider
* Test 1: General worker, using the fips provider
* Test 2: Simple fetch worker
- * Test 3: Worker using a shared EVP_PKEY
+ * Test 3: Worker downgrading a shared EVP_PKEY
+ * Test 4: Worker using a shared EVP_PKEY
*/
static int test_multi(int idx)
{
thread_t thread1, thread2;
int testresult = 0;
OSSL_PROVIDER *prov = NULL, *prov2 = NULL;
- void (*worker)(void);
+ void (*worker)(void) = NULL;
+ void (*worker2)(void) = NULL;
if (idx == 1 && !do_fips)
return TEST_skip("FIPS not supported");
+#ifdef OPENSSL_NO_DEPRECATED_3_0
+ if (idx == 3)
+ return TEST_skip("Skipping tests for deprected functions");
+#endif
+
multi_success = 1;
multi_libctx = OSSL_LIB_CTX_new();
if (!TEST_ptr(multi_libctx))
@@ -435,6 +458,9 @@ static int test_multi(int idx)
worker = thread_multi_simple_fetch;
break;
case 3:
+ worker2 = thread_downgrade_shared_evp_pkey;
+ /* fall through */
+ case 4:
/*
* If available we have both the default and fips providers for this
* test
@@ -450,9 +476,11 @@ static int test_multi(int idx)
TEST_error("Invalid test index");
goto err;
}
+ if (worker2 == NULL)
+ worker2 = worker;
if (!TEST_true(run_thread(&thread1, worker))
- || !TEST_true(run_thread(&thread2, worker)))
+ || !TEST_true(run_thread(&thread2, worker2)))
goto err;
worker();
@@ -547,7 +575,7 @@ int setup_tests(void)
ADD_TEST(test_thread_local);
ADD_TEST(test_atomic);
ADD_TEST(test_multi_load);
- ADD_ALL_TESTS(test_multi, 4);
+ ADD_ALL_TESTS(test_multi, 5);
return 1;
}
|
change kit issuer url | @@ -10,6 +10,5 @@ https://accounts.google.com/ https://console.developers.google.com/
https://aai.egi.eu/oidc/ [email protected]
https://aai-dev.egi.eu/oidc https://aai-dev.egi.eu/oidc/manage/admin/client/new [email protected]
https://login.elixir-czech.org/oidc/ https://login.elixir-czech.org/oidc/manage/dev/dynreg/new [email protected]
-https://oidc-kc.scc.kit.edu/auth/realms/kit/ [email protected] [email protected]
-
+https://oidc.scc.kit.edu/auth/realms/kit/ [email protected] [email protected]
|
kex.c : Correct type cast in curve25519_sha256() | @@ -2691,7 +2691,7 @@ curve25519_sha256(LIBSSH2_SESSION *session, unsigned char *data,
goto clean_exit;
}
- session->server_hostkey_len = (u_int32_t)hostkey_len;
+ session->server_hostkey_len = (uint32_t)hostkey_len;
session->server_hostkey = LIBSSH2_ALLOC(session,
session->server_hostkey_len);
if(!session->server_hostkey) {
|
SOVERSION bump to version 7.3.5 | @@ -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 3)
-set(SYSREPO_MICRO_SOVERSION 4)
+set(SYSREPO_MICRO_SOVERSION 5)
set(SYSREPO_SOVERSION_FULL ${SYSREPO_MAJOR_SOVERSION}.${SYSREPO_MINOR_SOVERSION}.${SYSREPO_MICRO_SOVERSION})
set(SYSREPO_SOVERSION ${SYSREPO_MAJOR_SOVERSION})
|
fix path typo for vwebp_sdl in Makefile.vc | @@ -367,8 +367,8 @@ $(DIRBIN)\gif2webp.exe: $(EX_UTIL_OBJS) $(IMAGEIO_UTIL_OBJS) $(LIBWEBPMUX)
$(DIRBIN)\gif2webp.exe: $(LIBWEBP)
$(DIRBIN)\vwebp.exe: $(DIROBJ)\examples\vwebp.obj $(EX_UTIL_OBJS)
$(DIRBIN)\vwebp.exe: $(IMAGEIO_UTIL_OBJS) $(LIBWEBPDEMUX) $(LIBWEBP)
-$(DIRBIN)\vwebp_sdl.exe: $(DIROBJ)\examples\vwebp_sdl.obj
-$(DIRBIN)\vwebp_sdl.exe: $(DIROBJ)\examples\webp_to_sdl.obj
+$(DIRBIN)\vwebp_sdl.exe: $(DIROBJ)\extras\vwebp_sdl.obj
+$(DIRBIN)\vwebp_sdl.exe: $(DIROBJ)\extras\webp_to_sdl.obj
$(DIRBIN)\vwebp_sdl.exe: $(IMAGEIO_UTIL_OBJS) $(LIBWEBP)
$(DIRBIN)\webpmux.exe: $(DIROBJ)\examples\webpmux.obj $(LIBWEBPMUX)
$(DIRBIN)\webpmux.exe: $(EX_UTIL_OBJS) $(IMAGEIO_UTIL_OBJS) $(LIBWEBP)
|
reduced more excess of hashes | @@ -124,14 +124,13 @@ if(oldhcxrecord.message_pair == hcxrecord.message_pair)
if(memcmp(oldhcxrecord.mac_ap.addr, hcxrecord.mac_ap.addr, 6) == 0)
if(memcmp(oldhcxrecord.mac_sta.addr, hcxrecord.mac_sta.addr, 6) == 0)
if(memcmp(oldhcxrecord.keymic, hcxrecord.keymic, 16) == 0)
+ if(memcmp(oldhcxrecord.essid, hcxrecord.essid, 32) == 0)
if(memcmp(oldhcxrecord.nonce_ap, hcxrecord.nonce_ap, 32) == 0)
if(memcmp(oldhcxrecord.nonce_sta, hcxrecord.nonce_sta, 32) == 0)
return;
memcpy(&oldhcxrecord, &hcxrecord, HCX_SIZE);
-
-
if(hcxoutname != NULL)
{
if((fhhcx = fopen(hcxoutname, "ab")) == NULL)
|
dm: rtvm enable lapic_pt automatically
Enable `lapic_pt` automatically for rtvm for better performance.
Reserve `--lapic_pt` for future use. If VM is not in realtime mode,
`--lapic_pt` will cause a warning.
Acked-by: Wang, Yu1 | @@ -932,10 +932,10 @@ main(int argc, char *argv[])
break;
case CMD_OPT_LAPIC_PT:
lapic_pt = true;
- is_rtvm = true;
break;
case CMD_OPT_RTVM:
is_rtvm = true;
+ lapic_pt = true;
break;
case CMD_OPT_SOFTWARE_SRAM:
if (parse_vssram_buf_params(optarg) != 0)
@@ -1003,6 +1003,10 @@ main(int argc, char *argv[])
usage(1);
}
+ if (lapic_pt == true && is_rtvm == false) {
+ lapic_pt = false;
+ pr_warn("Only a Realtime VM can use local APIC pass through, '--lapic_pt' is invalid here.\n");
+ }
vmname = argv[0];
if (strnlen(vmname, MAX_VM_NAME_LEN) >= MAX_VM_NAME_LEN) {
|
VERSION bump to version 2.0.245 | @@ -61,7 +61,7 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
# set version of the project
set(LIBYANG_MAJOR_VERSION 2)
set(LIBYANG_MINOR_VERSION 0)
-set(LIBYANG_MICRO_VERSION 244)
+set(LIBYANG_MICRO_VERSION 245)
set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_MICRO_VERSION})
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
|
coverity fix potential NULL dereference in test_mk_file_path() | @@ -439,11 +439,12 @@ char *test_mk_file_path(const char *dir, const char *file)
char *dir_end;
char dir_end_sep;
# endif
- size_t len = strlen(dir) + strlen(sep) + strlen(file) + 1;
+ size_t dirlen = dir != NULL ? strlen(dir) : 0;
+ size_t len = dirlen + strlen(sep) + strlen(file) + 1;
char *full_file = OPENSSL_zalloc(len);
if (full_file != NULL) {
- if (dir != NULL && dir[0] != '\0') {
+ if (dir != NULL && dirlen > 0) {
OPENSSL_strlcpy(full_file, dir, len);
# ifdef OPENSSL_SYS_VMS
/*
|
plugin types BUGFIX comparing values in an union | @@ -2058,10 +2058,10 @@ error:
static LY_ERR
ly_type_compare_union(const struct lyd_value *val1, const struct lyd_value *val2)
{
- if (val1->realtype != val2->realtype) {
+ if (val1->subvalue->value->realtype != val2->subvalue->value->realtype) {
return LY_ENOT;
}
- return val1->realtype->plugin->compare(val1->subvalue->value, val2->subvalue->value);
+ return val1->subvalue->value->realtype->plugin->compare(val1->subvalue->value, val2->subvalue->value);
}
/**
|
workflows: fix release env usage | @@ -28,6 +28,7 @@ jobs:
staging-release-version-check:
name: Check staging release matches
+ environment: release
runs-on: ubuntu-latest
steps:
- name: Get the version on staging
|
Update release/c/README.md for v0.2 | -Wuffs ships as a "single file C library", also known as a "[header file
+# Releases (in the C Programming Language)
+
+[Wuffs the Library](/doc/wuffs-the-library.md) ships as a "single file C
+library", also known as a "[header file
library](https://github.com/nothings/stb/blob/master/docs/stb_howto.txt)".
-To use Wuffs in your C/C++ project, you just need to copy one file from this
-directory, or otherwise integrate that one file into your build system.
-Typically, pick the latest version (but not the unsupported snapshot), with a
-filename like `wuffs-vMAJOR.MINOR.c` for version MAJOR.MINOR.
+To use that library in your C/C++ project, you just need to copy one file from
+this directory, or otherwise integrate that one file into your build system.
+Typically, pick the latest stable version (but not the unsupported snapshot),
+with a filename like `wuffs-vMAJOR.MINOR.c` for version MAJOR.MINOR.
To use that single file as a "foo.c"-like implementation, instead of a
"foo.h"-like header, `#define WUFFS_IMPLEMENTATION` before `#include`'ing or
compiling it.
+
+
+# Latest Stable Version
+
+**Version 0.2 (December 2019)** is the latest stable version. Stable means that
+its API won't change any further, but being a "version 0.x" means that:
+
+- It will not have long term support.
+- Newer versions make no promises about compatibility.
|
HardwareDevices: Update unknown parameters | @@ -170,8 +170,8 @@ PPH_STRING NetworkAdapterQueryNameFromGuid(
_In_ PGUID InterfaceGuid,
_Out_opt_ PWSTR InterfaceDescription,
_Inout_ PSIZE_T InterfaceDescriptionLength,
- PVOID Unknown1,
- PVOID Unknown2
+ _In_ BOOL Cache,
+ _In_ BOOL Refresh
) = NULL;
GUID interfaceGuid = GUID_NULL;
@@ -197,8 +197,8 @@ PPH_STRING NetworkAdapterQueryNameFromGuid(
&interfaceGuid,
adapterDescription,
&adapterDescriptionLength,
- NULL,
- NULL
+ FALSE,
+ TRUE
)))
{
return PhCreateString(adapterDescription);
@@ -244,7 +244,7 @@ PPH_STRING NetworkAdapterGetInterfaceNameFromLuid(
return NULL;
}
-PPH_STRING NetworkAdapterGetInterfaceAliasFromGuid(
+PPH_STRING NetworkAdapterGetInterfaceAliasNameFromGuid(
_In_ PPH_STRING InterfaceGuid
)
{
@@ -252,8 +252,8 @@ PPH_STRING NetworkAdapterGetInterfaceAliasFromGuid(
_In_ PGUID InterfaceGuid,
_Out_writes_(InterfaceAliasLength) PWSTR InterfaceAlias,
_Inout_ PSIZE_T InterfaceAliasLength,
- PVOID Unknown1,
- PVOID Unknown2
+ _In_ BOOL Cache,
+ _In_ BOOL Refresh
) = NULL;
GUID interfaceGuid = GUID_NULL;
@@ -263,7 +263,7 @@ PPH_STRING NetworkAdapterGetInterfaceAliasFromGuid(
if (iphlpHandle = PhLoadLibrarySafe(L"iphlpapi.dll"))
{
- NhGetInterfaceNameFromGuid_I = PhGetProcedureAddress(iphlpHandle, "NhGetInterfaceDescriptionFromGuid", 0);
+ NhGetInterfaceNameFromGuid_I = PhGetProcedureAddress(iphlpHandle, "NhGetInterfaceNameFromGuid", 0);
}
}
@@ -279,8 +279,8 @@ PPH_STRING NetworkAdapterGetInterfaceAliasFromGuid(
&interfaceGuid,
adapterAlias,
&adapterAliasLength,
- NULL,
- NULL
+ FALSE,
+ TRUE
)))
{
return PhCreateString(adapterAlias);
|
README.md: Added information about Fedora and RedHat/CentOS packages. | @@ -35,6 +35,10 @@ Arch Linux users can install from the [repository](https://www.archlinux.org/pac
Alpine Linux users can install from the [repository](https://pkgs.alpinelinux.org/packages?name=stlink)
+Fedora users can install from [repository](https://src.fedoraproject.org/rpms/stlink)
+
+RedHat/CentOS 7 users can install from EPEL [repository](https://src.fedoraproject.org/rpms/stlink/branch/epel7)
+
Gentoo Linux users can install from the official portage [repository](https://packages.gentoo.org/packages/dev-embedded/stlink)
FreeBSD users can install from [freshports](https://www.freshports.org/devel/stlink)
|
runtime: work stealing bug fix | @@ -288,7 +288,7 @@ static bool steal_work(struct kthread *l, struct kthread *r)
lsize = l->q_ptrs->rq_head - l->q_ptrs->rq_tail;
rsize = ACCESS_ONCE(r->q_ptrs->rq_head) - r->q_ptrs->rq_tail;
if (lsize < rsize)
- num_to_steal = MIN((rsize - lsize) / 2, RUNTIME_RQ_SIZE);
+ num_to_steal = MIN(div_up(rsize - lsize, 2), RUNTIME_RQ_SIZE);
if (num_to_steal) {
merge_runqueues(l, lsize, r, num_to_steal);
return true;
|
Fix bad handling of fin when sending stream data | @@ -3170,6 +3170,8 @@ ssize_t ngtcp2_conn_write_stream(ngtcp2_conn *conn, uint8_t *dest,
return NGTCP2_ERR_STREAM_DATA_BLOCKED;
}
+ fin = fin && ndatalen == datalen;
+
rv = conn_call_send_pkt(conn, &hd);
if (rv != 0) {
return rv;
@@ -3182,7 +3184,7 @@ ssize_t ngtcp2_conn_write_stream(ngtcp2_conn *conn, uint8_t *dest,
frc->fr.type = NGTCP2_FRAME_STREAM;
frc->fr.stream.flags = 0;
- frc->fr.stream.fin = fin && ndatalen == datalen;
+ frc->fr.stream.fin = fin;
frc->fr.stream.stream_id = stream_id;
frc->fr.stream.offset = strm->tx_offset;
frc->fr.stream.datalen = ndatalen;
|
Clean up init values of psa crypto status and fix switch default case | @@ -4858,7 +4858,7 @@ static psa_status_t psa_generate_derived_ecc_key_weierstrass_helper(
mbedtls_mpi k;
mbedtls_mpi diff_N_2;
int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
- psa_status_t status = PSA_ERROR_GENERIC_ERROR;
+ psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
mbedtls_mpi_init( &k );
mbedtls_mpi_init( &diff_N_2 );
@@ -4962,7 +4962,7 @@ static psa_status_t psa_generate_derived_ecc_key_montgomery_helper(
)
{
size_t output_length;
- psa_status_t status = PSA_ERROR_GENERIC_ERROR;
+ psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
switch( bits )
{
@@ -4999,7 +4999,7 @@ static psa_status_t psa_generate_derived_ecc_key_montgomery_helper(
(*data)[55] |= 128;
break;
default:
- /* should never happen */
+ return( PSA_ERROR_CORRUPTION_DETECTED );
break;
}
@@ -5015,7 +5015,7 @@ static psa_status_t psa_generate_derived_key_internal(
uint8_t *data = NULL;
size_t bytes = PSA_BITS_TO_BYTES( bits );
size_t storage_size = bytes;
- psa_status_t status;
+ psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
#if defined(MBEDTLS_PSA_BUILTIN_KEY_TYPE_ECC_KEY_PAIR)
if( PSA_KEY_TYPE_IS_PUBLIC_KEY( slot->attr.type ) )
|
acrn-config: reserve 16M memory for hv start
Need to reserved 16M for HV debug usage like sbuf/ramoops before HV RAM START
to avoid possible conflict with HV memory.
Acked-by: Victor Sun | @@ -14,21 +14,21 @@ DESC = """
VM_NUM_MAP_TOTAL_HV_RAM_SIZE = {
# 120M
- 2:'0x7800000',
+ 2:0x7800000,
# 150M
- 3:'0x9600000',
+ 3:0x9600000,
# 180M
- 4:'0xB400000',
+ 4:0xB400000,
# 210M
- 5:'0xD200000',
+ 5:0xD200000,
# 240M
- 6:'0xF000000',
+ 6:0xF000000,
# 270M
- 7:'0x10E00000',
+ 7:0x10E00000,
}
-def get_addr_for_hv(ram_range, hpa_size):
+def find_avl_memory(ram_range, hpa_size):
"""
This is get hv address from System RAM as host physical size
:param ram_range: System RAM mapping
@@ -41,7 +41,7 @@ def get_addr_for_hv(ram_range, hpa_size):
tmp_order_key = sorted(ram_range)
for start_addr in tmp_order_key:
mem_range = ram_range[start_addr]
- if mem_range > int(hpa_size, 16):
+ if mem_range > int(hpa_size, 10):
ret_start_addr = start_addr
break
@@ -80,13 +80,18 @@ def generate_file(config):
return err_dic
ram_range = get_ram_range()
- hv_start_addr = get_addr_for_hv(ram_range, hv_ram_size)
+
+ # reseve 16M memory for hv sbuf, ramoops, etc.
+ reserved_ram = 0xf00000
+ total_size = reserved_ram + hv_ram_size
+ avl_start_addr = find_avl_memory(ram_range, str(total_size))
+ hv_start_addr = int(avl_start_addr, 16) + int(hex(reserved_ram), 16)
print('CONFIG_BOARD="{}"'.format(board_cfg_lib.BOARD_NAME), file=config)
print("{}".format(DESC), file=config)
- print("CONFIG_HV_RAM_START={}".format(hv_start_addr), file=config)
+ print("CONFIG_HV_RAM_START={}".format(hex(hv_start_addr)), file=config)
- print("CONFIG_HV_RAM_SIZE={}".format(hv_ram_size), file=config)
+ print("CONFIG_HV_RAM_SIZE={}".format(hex(hv_ram_size)), file=config)
return err_dic
|
[software] Specify memory location of tile wake_up registers | @@ -49,6 +49,22 @@ SECTIONS {
ro_cache_start_3 = 0x40000038;
ro_cache_end_3 = 0x4000003C;
+#if NUM_CORES == 256
+ wake_up_tile_g0_reg = 0x40000040;
+ wake_up_tile_g1_reg = 0x40000044;
+ wake_up_tile_g2_reg = 0x40000048;
+ wake_up_tile_g3_reg = 0x4000004C;
+#elif NUM_CORES == 1024
+ wake_up_tile_g0_reg = 0x40000040;
+ wake_up_tile_g1_reg = 0x40000044;
+ wake_up_tile_g2_reg = 0x40000048;
+ wake_up_tile_g3_reg = 0x4000004C;
+ wake_up_tile_g4_reg = 0x40000050;
+ wake_up_tile_g5_reg = 0x40000054;
+ wake_up_tile_g6_reg = 0x40000058;
+ wake_up_tile_g7_reg = 0x4000005C;
+#endif
+
fake_uart = 0xC0000000;
}
|
Remove zeroed lines. | @@ -2566,13 +2566,6 @@ int picoquic_prepare_packet_client_init(picoquic_cnx_t* cnx, picoquic_path_t * p
picoquic_packet_type_enum packet_type = picoquic_packet_initial;
picoquic_packet_context_enum pc = picoquic_packet_context_initial;
-#if 0
- if (*next_wake_time > cnx->start_time + PICOQUIC_MICROSEC_HANDSHAKE_MAX) {
- *next_wake_time = cnx->start_time + PICOQUIC_MICROSEC_HANDSHAKE_MAX;
- SET_LAST_WAKE(cnx->quic, PICOQUIC_SENDER);
- }
-#endif
-
cnx->initial_validated = 1; /* always validated on client */
if (cnx->tls_stream[0].send_queue == NULL) {
|
Ruby: Disable Windows build | @@ -236,7 +236,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [windows-latest, macos-latest]
+ os: [macos-latest]
ruby: ['2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1']
steps:
|
Dedede: Enable PD 3.0
Semantics to set PD 3.0 on the v2 stack changed recently, so enable PD
3.0 specifically (rather than it being default)
BRANCH=None
TEST=make -j buidall | #define CONFIG_USB_PD_LOGGING
#define CONFIG_USB_PD_MAX_SINGLE_SOURCE_CURRENT TYPEC_RP_3A0
#define CONFIG_USB_PD_PORT_MAX_COUNT 2
+#define CONFIG_USB_PD_REV30
#define CONFIG_USB_PD_TCPM_MUX
#define CONFIG_USB_PD_TCPM_TCPCI
#define CONFIG_USB_PD_TRY_SRC
|
Check for zero records and return immediately | @@ -740,6 +740,9 @@ int tls1_enc(SSL *s, SSL3_RECORD *recs, size_t n_recs, int send)
int imac_size;
const EVP_CIPHER *enc;
+ if (n_recs == 0)
+ return 0;
+
if (send) {
if (EVP_MD_CTX_md(s->write_hash)) {
int n = EVP_MD_CTX_size(s->write_hash);
|
as5048b.c: change initialization of struct to C89 standard | @@ -91,13 +91,13 @@ static int as5048b_ioctl(FAR struct qe_lowerhalf_s *lower, int cmd,
static const struct qe_ops_s g_qeops =
{
- .setup = as5048b_setup,
- .shutdown = as5048b_shutdown,
- .position = as5048b_position,
- .setposmax = NULL, /* not supported yet */
- .reset = as5048b_reset,
- .setindex = NULL, /* not supported yet */
- .ioctl = as5048b_ioctl
+ as5048b_setup, /* setup */
+ as5048b_shutdown, /* shutdown */
+ as5048b_position, /* position */
+ NULL, /* setposmax */
+ as5048b_reset, /* reset */
+ NULL, /* setindex */
+ as5048b_ioctl /* ioctl */
};
/****************************************************************************
|
Disable binary swap tests on Concourse master pipeline
Now that catalog updates are allowed, we should disable binary swap
validation. Once the next catalog freeze comes, someone can flip this
back. | @@ -672,6 +672,7 @@ jobs:
MAKE_TEST_COMMAND: PGOPTIONS='-c optimizer=off' installcheck-world
BLDWRAP_POSTGRES_CONF_ADDONS: "fsync=off"
TEST_OS: centos
+ TEST_BINARY_SWAP: false
CONFIGURE_FLAGS: {{configure_flags}}
- name: icw_gporca_centos6
|
fix panda connection | @@ -137,8 +137,12 @@ class Panda(object):
for device in context.getDeviceList(skip_on_error=True):
#print(device)
if device.getVendorID() == 0xbbaa and device.getProductID() in [0xddcc, 0xddee]:
- if self._serial is None or device.getSerialNumber() == self._serial:
- self._serial = device.getSerialNumber()
+ try:
+ this_serial = device.getSerialNumber()
+ except Exception:
+ continue
+ if self._serial is None or this_serial == self._serial:
+ self._serial = this_serial
print("opening device", self._serial, hex(device.getProductID()))
self.bootstub = device.getProductID() == 0xddee
self.legacy = (device.getbcdDevice() != 0x2300)
|
Change autocomplete buffer length to CONSOLE_BUFFER_SCREEN | @@ -1147,16 +1147,16 @@ typedef struct
{
Console* console;
char* incompleteWord; // Original word that's being completed.
- char options[CONSOLE_BUFFER_SIZE]; // Options to show to the user.
- char commonPrefix[CONSOLE_BUFFER_SIZE]; // Common prefix of all options.
+ char options[CONSOLE_BUFFER_SCREEN]; // Options to show to the user.
+ char commonPrefix[CONSOLE_BUFFER_SCREEN]; // Common prefix of all options.
} AutocompleteData;
static void addAutocompleteOption(AutocompleteData* data, const char* option)
{
if (strstr(option, data->incompleteWord) == option)
{
- strncat(data->options, option, CONSOLE_BUFFER_SIZE);
- strncat(data->options, " ", CONSOLE_BUFFER_SIZE);
+ strncat(data->options, option, CONSOLE_BUFFER_SCREEN);
+ strncat(data->options, " ", CONSOLE_BUFFER_SCREEN);
// Possibly reduce the common prefix of all possible options.
if (strlen(data->incompleteWord) > 0)
@@ -1164,7 +1164,7 @@ static void addAutocompleteOption(AutocompleteData* data, const char* option)
if (strlen(data->commonPrefix) == 0)
{
// This is the first option to be added. Initialize the prefix.
- strncpy(data->commonPrefix, option, CONSOLE_BUFFER_SIZE);
+ strncpy(data->commonPrefix, option, CONSOLE_BUFFER_SCREEN);
}
else
{
@@ -3178,8 +3178,8 @@ static void insertInputText(Console* console, const char* text)
// Used to show autocomplete options, for example.
static void provideHint(Console* console, const char* hint)
{
- char* input = malloc(CONSOLE_BUFFER_SIZE);
- strncpy(input, console->input.text, CONSOLE_BUFFER_SIZE);
+ char* input = malloc(CONSOLE_BUFFER_SCREEN);
+ strncpy(input, console->input.text, CONSOLE_BUFFER_SCREEN);
printLine(console);
printBack(console, hint);
|
os/tools/build_test.sh : Add error check when build fail
Current build script tries to build many configurations automatically.
But when there is a fail, build is not stopped and continue to the next.
So when there is a fail, stop the build and show where the build error is come from. | @@ -49,7 +49,7 @@ for target in ${build_targets[@]}; do
echo "===================================="
echo "======== Build \"${target}\" ========"
echo "===================================="
- cd ${OSDIR}; ${BUILD_CMD}
+ cd ${OSDIR}; ${BUILD_CMD} || { echo "\"${target}\" ERROR!!!"; exit 1; }
echo "===================================="
echo "======== \"${target}\" Built ========"
|
nrf52820_microbit: Switch USB & I2C IRQ priorities to reduce I2C issues on USB serial connection. | // <7=> 7
#ifndef NRFX_TWIS_DEFAULT_CONFIG_IRQ_PRIORITY
-#define NRFX_TWIS_DEFAULT_CONFIG_IRQ_PRIORITY 2
+#define NRFX_TWIS_DEFAULT_CONFIG_IRQ_PRIORITY 1
#endif
// <e> NRFX_TWIS_CONFIG_LOG_ENABLED - Enables logging in the module.
// <7=> 7
#ifndef NRFX_USBD_DEFAULT_CONFIG_IRQ_PRIORITY
-#define NRFX_USBD_DEFAULT_CONFIG_IRQ_PRIORITY 1
+#define NRFX_USBD_DEFAULT_CONFIG_IRQ_PRIORITY 2
#endif
// <q> USBD_CONFIG_DMASCHEDULER_ISO_BOOST - Give priority to isochronous transfers
|
arch/boardctl.c : Add reboot debug message
Board Reboot is important event, so it is better to remain the log. | #include <sys/types.h>
#include <sys/boardctl.h>
+#include <debug.h>
+#include <sched.h>
#include <stdint.h>
#include <errno.h>
#include <assert.h>
#include <tinyara/board.h>
+#include <tinyara/arch.h>
#ifdef CONFIG_LIB_BOARDCTL
/****************************************************************************
@@ -143,6 +146,11 @@ int boardctl(unsigned int cmd, uintptr_t arg)
* DEPENDENCIES: Board logic must provide board_reset
*/
case BOARDIOC_RESET:
+ /* To reboot the board, we will do nothing. */
+ sched_lock();
+ /* Add 100ms delay for flushing another logs like printf. */
+ up_mdelay(100);
+ lldbg("Board will Reboot now.\n");
ret = board_reset((int)arg);
break;
#endif
|
Update regarding GitHub Action Runner
different umask is used in CI | @@ -114,7 +114,7 @@ CreateDirIfMissingSuccessCreated(void **state) {
res = scope_stat(buf, &dirStat);
assert_int_not_equal(res, 0);
// TODO add test for 0777
- mkdir_status_t status = libdirCreateDirIfMissing(buf, 0775);
+ mkdir_status_t status = libdirCreateDirIfMissing(buf, 0755);
assert_int_equal(status, MKDIR_STATUS_CREATED);
res = scope_stat(buf, &dirStat);
assert_int_equal(res, 0);
@@ -123,7 +123,7 @@ CreateDirIfMissingSuccessCreated(void **state) {
assert_int_not_equal(dirStat.st_mode & S_IWUSR, 0);
assert_int_not_equal(dirStat.st_mode & S_IXUSR, 0);
assert_int_not_equal(dirStat.st_mode & S_IRGRP, 0);
- assert_int_not_equal(dirStat.st_mode & S_IWGRP, 0);
+ assert_int_equal(dirStat.st_mode & S_IWGRP, 0);
assert_int_not_equal(dirStat.st_mode & S_IXGRP, 0);
assert_int_not_equal(dirStat.st_mode & S_IROTH, 0);
assert_int_equal(dirStat.st_mode & S_IWOTH, 0);
|
[GB] Implement RET instruction | @@ -807,6 +807,14 @@ impl CpuState {
self.set_pc(target);
Some(InstrInfo::jump(instr_size, 6))
}
+ 0xc9 => {
+ // RET
+ self.set_pc(self.pop_u16());
+ if debug {
+ println!("RET {:04x}", self.get_pc());
+ }
+ Some(InstrInfo::jump(1, 4))
+ }
// Handled down below
_ => None,
};
@@ -2155,3 +2163,33 @@ fn test_inc_bc() {
// And the BC register has been incremented
assert_eq!(cpu.reg(RegisterName::BC).read_u16(&cpu), 0xfb);
}
+
+/* RET */
+#[test]
+fn test_ret() {
+ // Given a RET instruction
+ // And there is a stack set up
+ let mut cpu = CpuState::new();
+ cpu.reg(RegisterName::SP).write_u16(&cpu, 0xfffe);
+
+ // And the stack contains some data
+ cpu.push_u16(0x5566);
+ assert_eq!(cpu.reg(RegisterName::SP).read_u16(&cpu), 0xfffc);
+
+ // When the CPU runs the instruction
+ cpu.memory.write_u8(0, 0xc9);
+ let instr_info = cpu.step();
+ // Then the instruction size and timings are correct
+ assert_eq!(instr_info.instruction_size, 1);
+ assert_eq!(instr_info.cycle_count, 4);
+
+ // And the stack pointer has been incremented
+ let sp = cpu.reg(RegisterName::SP).read_u16(&cpu);
+ assert_eq!(sp, 0xfffe);
+
+ // And the value has been read into PC
+ assert_eq!(cpu.reg(RegisterName::PC).read_u16(&cpu), 0x5566);
+ // And it's indicated that a jump occurred
+ assert_eq!(instr_info.pc_increment, None);
+ assert!(instr_info.jumped);
+}
|
remove gocd escaping
Note: mandatory check (NEED_CHECK) was skipped | @@ -7,6 +7,6 @@ sed -i -e 's/x86_64\-linux\-gnu/x86_64\-unknown\-freebsd11\.2/' make/*.makefile
# use clang 6.0, not 5.0
sed -i -e "s/\'5 0\'/\'6 0\'/" make/*.makefile
# don't build AFALG on freebsd
-echo '##define OPENSSL_NO_AFALGENG' >> contrib/libs/openssl/1.1.1/include/openssl/opensslconf.h
+echo '#define OPENSSL_NO_AFALGENG' >> contrib/libs/openssl/1.1.1/include/openssl/opensslconf.h
# hack
-echo '##include <stdio.h>' > contrib/libs/openssl/1.1.1/engines/e_afalg.c
+echo '#include <stdio.h>' > contrib/libs/openssl/1.1.1/engines/e_afalg.c
|
VMS fix: link shared libs from objects files instead of from static libs
The simplifications that were made when Makefile.shared was removed
didn't work quite right. Also, this is what we do on Unix and Windows
anyway, so this makes us more consistent across all platforms. | @@ -664,12 +664,14 @@ EOF
my $shlib = $args{shlib};
my $libd = dirname($lib);
my $libn = basename($lib);
+ my @objs = map { (my $x = $_) =~ s|\.o$|.OBJ|; $x }
+ grep { $_ =~ m|\.o$| }
+ @{$args{objs}};
my @defs = grep { $_ =~ /\.opt$/ } @{$args{objs}};
my @deps = compute_lib_depends(@{$args{deps}});
die "More than one symbol vector" if scalar @defs > 1;
my $deps = join(", -\n\t\t", @defs, @deps);
my $shlib_target = $disabled{shared} ? "" : $target{shared_target};
- my $shared_def = join(",", map { "$_/OPT" } @defs);
my $translatesyms_pl = abs2rel(rel2abs(catfile($config{sourcedir},
"VMS", "translatesyms.pl")),
rel2abs($config{builddir}));
@@ -677,7 +679,11 @@ EOF
# previous line's file spec as default, so if no directory spec
# is present in the current line and the previous line has one that
# doesn't apply, you're in for a surprise.
- my $write_opt =
+ my $write_opt1 =
+ join(",-\"\n\t", map { my $x = $_ =~ /\[/ ? $_ : "[]".$_;
+ "WRITE OPT_FILE \"$x" } @objs).
+ "\"";
+ my $write_opt2 =
join("\n\t", map { my $x = $_ =~ /\[/ ? $_ : "[]".$_;
$x =~ s|(\.EXE)|$1/SHARE|;
$x =~ s|(\.OLB)|$1/LIB|;
@@ -686,9 +692,13 @@ EOF
return <<"EOF"
$shlib.EXE : $lib.OLB $deps
\$(PERL) $translatesyms_pl \$(BLDDIR)CXX\$DEMANGLER_DB. < $defs[0] > $defs[0]-translated
- LINK \$(LDFLAGS)/SHARE=\$\@ $defs[0]-translated/OPT,$lib.OLB/LIBRARY
- \$(EX_LIBS)
- DELETE $defs[0]-translated;*
+ OPEN/WRITE/SHARE=READ OPT_FILE $lib-components.OPT
+ $write_opt1
+ $write_opt2
+ CLOSE OPT_FILE
+ LINK \$(LDFLAGS)/SHARE=\$\@ $defs[0]-translated/OPT,-
+ $lib-components.OPT/OPT \$(EX_LIBS)
+ DELETE $defs[0]-translated;*,$lib-components.OPT;*
PURGE $shlib.EXE,$shlib.MAP
EOF
. ($config{target} =~ m|alpha| ? "" : <<"EOF"
|
[util] Don't instantiate TStringBufImpl. | @@ -45,7 +45,7 @@ static bool IsIntersect(const T& a, const U& b) noexcept {
**/
template <class TStringType, typename TStringViewType = TStringBufImpl<typename TStringType::value_type>>
static inline size_t SubstGlobalImpl(TStringType& s, const TStringViewType from, const TStringViewType to, size_t fromPos = 0) {
- if (!from) {
+ if (from.empty()) {
return 0;
}
@@ -174,7 +174,10 @@ size_t SubstGlobal(TUtf32String& text, const TUtf32StringBuf what, const TUtf32S
}
size_t SubstGlobal(std::u16string& text, const TWtringBuf what, const TWtringBuf with, size_t from) {
- return SubstGlobalImpl(text, {(const char16_t*)what.data(), what.size()}, {(const char16_t*)with.data(), with.size()}, from);
+ return SubstGlobalImpl(text,
+ std::u16string_view(reinterpret_cast<const char16_t*>(what.data()), what.size()),
+ std::u16string_view(reinterpret_cast<const char16_t*>(with.data()), with.size()),
+ from);
}
size_t SubstGlobal(TString& text, char what, char with, size_t from) {
|
Updated tool to proper cb sig | #include <vector>
#include <sba/sba.h>
-#include <survive_reproject.h>
struct SBAData {
int last_acode = -1;
@@ -93,8 +92,8 @@ void light_process(SurviveObject *so, int sensor_id, int acode, int timeinsweep,
}
SurvivePose lastPose = {};
-void raw_pose_process(SurviveObject *so, uint8_t lighthouse, SurvivePose *pose) {
- survive_default_raw_pose_process(so, lighthouse, pose);
+void pose_process(SurviveObject *so, uint32_t timecode, SurvivePose *pose) {
+ survive_default_raw_pose_process(so, timecode, pose);
PlaybackData *d = (PlaybackData *)so->ctx->user_ptr;
d->so = so;
d->inputs.emplace_back(so, *pose);
@@ -364,7 +363,7 @@ int main(int argc, char **argv) {
auto ctx = survive_init(sizeof(args) / sizeof(args[0]), (char *const *)args);
ctx->user_ptr = &data;
- survive_install_raw_pose_fn(ctx, raw_pose_process);
+ survive_install_pose_fn(ctx, pose_process);
survive_install_lighthouse_pose_fn(ctx, lighthouse_process);
survive_install_light_fn(ctx, light_process);
|
Teach tab-complete.c about recently-added CREATE TYPE options.
Commit missed adding SUBSCRIPT here,
and commit missed adding MULTIRANGE_TYPE_NAME.
Haiying Tang and Tom Lane
Discussion: | @@ -2959,7 +2959,7 @@ psql_completion(const char *text, int start, int end)
{
if (TailMatches("(|*,"))
COMPLETE_WITH("INPUT", "OUTPUT", "RECEIVE", "SEND",
- "TYPMOD_IN", "TYPMOD_OUT", "ANALYZE",
+ "TYPMOD_IN", "TYPMOD_OUT", "ANALYZE", "SUBSCRIPT",
"INTERNALLENGTH", "PASSEDBYVALUE", "ALIGNMENT",
"STORAGE", "LIKE", "CATEGORY", "PREFERRED",
"DEFAULT", "ELEMENT", "DELIMITER",
@@ -2973,7 +2973,8 @@ psql_completion(const char *text, int start, int end)
{
if (TailMatches("(|*,"))
COMPLETE_WITH("SUBTYPE", "SUBTYPE_OPCLASS", "COLLATION",
- "CANONICAL", "SUBTYPE_DIFF");
+ "CANONICAL", "SUBTYPE_DIFF",
+ "MULTIRANGE_TYPE_NAME");
else if (TailMatches("(*|*,", MatchAnyExcept("*=")))
COMPLETE_WITH("=");
else if (TailMatches("=", MatchAnyExcept("*)")))
|
Enable "-w" parameter on demo server. | @@ -173,7 +173,8 @@ int quic_server(const char* server_name, int server_port,
void* cnx_id_callback_ctx, uint8_t reset_seed[PICOQUIC_RESET_SECRET_SIZE],
int dest_if, int mtu_max, uint32_t proposed_version,
const char * esni_key_file_name, const char * esni_rr_file_name,
- FILE * F_log, char const* bin_file, char const * cc_log_dir, int use_long_log, picoquic_congestion_algorithm_t const * cc_algorithm)
+ FILE * F_log, char const* bin_file, char const * cc_log_dir, int use_long_log,
+ picoquic_congestion_algorithm_t const * cc_algorithm, char const * web_folder)
{
/* Start: start the QUIC process with cert and key files */
int ret = 0;
@@ -195,6 +196,12 @@ int quic_server(const char* server_name, int server_port,
picoquic_stateless_packet_t* sp;
int64_t delay_max = 10000000;
int connection_done = 0;
+ picohttp_server_parameters_t picoquic_file_param;
+
+ memset(&picoquic_file_param, 0, sizeof(picohttp_server_parameters_t));
+ picoquic_file_param.web_folder = web_folder;
+
+ // picoquic_set_default_callback(test_ctx->qserver, server_callback_fn, server_param);
/* Open a UDP socket */
ret = picoquic_open_server_sockets(&server_sockets, server_port);
@@ -203,7 +210,8 @@ int quic_server(const char* server_name, int server_port,
if (ret == 0) {
current_time = picoquic_current_time();
/* Create QUIC context */
- qserver = picoquic_create(8, pem_cert, pem_key, NULL, NULL, picoquic_demo_server_callback, NULL,
+ qserver = picoquic_create(8, pem_cert, pem_key, NULL, NULL,
+ picoquic_demo_server_callback, &picoquic_file_param,
cnx_id_callback, cnx_id_callback_ctx, reset_seed, current_time, NULL, NULL, NULL, 0);
if (qserver == NULL) {
@@ -1371,7 +1379,7 @@ int main(int argc, char** argv)
(cnx_id_cbdata == NULL) ? NULL : (void*)cnx_id_cbdata,
(uint8_t*)reset_seed, dest_if, mtu_max, proposed_version,
esni_key_file, esni_rr_file,
- F_log, bin_file, cc_log_dir, use_long_log, cc_algorithm);
+ F_log, bin_file, cc_log_dir, use_long_log, cc_algorithm, www_dir);
printf("Server exit with code = %d\n", ret);
} else {
/* Run as client */
|
fuzz: no need to check for bbFd | @@ -201,14 +201,12 @@ static void fuzz_perfFeedback(run_t* run) {
uint64_t softCntPc = 0;
uint64_t softCntEdge = 0;
uint64_t softCntCmp = 0;
- if (run->global->feedback.bbFd != -1) {
softCntPc = ATOMIC_GET(run->global->feedback.feedbackMap->pidFeedbackPc[run->fuzzNo]);
ATOMIC_CLEAR(run->global->feedback.feedbackMap->pidFeedbackPc[run->fuzzNo]);
softCntEdge = ATOMIC_GET(run->global->feedback.feedbackMap->pidFeedbackEdge[run->fuzzNo]);
ATOMIC_CLEAR(run->global->feedback.feedbackMap->pidFeedbackEdge[run->fuzzNo]);
softCntCmp = ATOMIC_GET(run->global->feedback.feedbackMap->pidFeedbackCmp[run->fuzzNo]);
ATOMIC_CLEAR(run->global->feedback.feedbackMap->pidFeedbackCmp[run->fuzzNo]);
- }
int64_t diff0 = run->global->linux.hwCnts.cpuInstrCnt - run->linux.hwCnts.cpuInstrCnt;
int64_t diff1 = run->global->linux.hwCnts.cpuBranchCnt - run->linux.hwCnts.cpuBranchCnt;
|
not send new blocks in reset state | @@ -120,6 +120,7 @@ static void *xdag_send_new_block_thread(void *arg)
struct xdag_new_block_elem *elem = NULL;
int processed = 0;
while(1) {
+ if(g_xdag_state != XDAG_STATE_REST) {
pthread_mutex_lock(&g_send_new_block_mutex);
elem = list_new_blocks;
pthread_mutex_unlock(&g_send_new_block_mutex);
@@ -140,6 +141,7 @@ static void *xdag_send_new_block_thread(void *arg)
free(elem);
processed = 1;
}
+ }
if(!processed) {
sleep(1);
|
disable NaN checks before BLAS calls dsolve.R (shorter formula) | @@ -40,7 +40,7 @@ while (n <= nto) {
solve(A, B)
})
- mflops <- (2.0/3 * n * n * n + 2 * n * n * n) * loops/ (z[3] * 1e+06)
+ mflops <- (8.0 / 3 * n * n * n) * loops / (z[3] * 1e+06)
st <- sprintf("%.0fx%.0f :", n, n)
cat(sprintf("%20s %10.2f MFlops %10.6f sec\n", st, mflops, z[3]))
|
travis: enable clang-9 build
I think the problem was a line with only whitespace | @@ -25,19 +25,19 @@ jobs:
arch: amd64
compiler: clang
- # - name: "clang-9"
- # compiler: clang-9
- # env:
- # - C_COMPILER=clang-9
- # - CXX_COMPILER=clang++-9
- # - COMPILER_FLAGS='-fsanitize=address,undefined'
- # addons:
- # apt:
- # sources:
- # sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
- # key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
- # packages:
- # - clang-9
+ - name: "clang-9"
+ compiler: clang-9
+ env:
+ - C_COMPILER=clang-9
+ - CXX_COMPILER=clang++-9
+ - COMPILER_FLAGS='-fsanitize=address,undefined'
+ addons:
+ apt:
+ sources:
+ sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
+ key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
+ packages:
+ - clang-9
- name: "gcc-8 i686"
arch: amd64
|
apps/example/testcase: Fix warning message for missing % in printf.
Fix warning "printf format string requires 2 parameters but only 1 is given" | @@ -886,16 +886,16 @@ static void itc_wifimanager_success_ratio_ap(void)
printf("\nSuccess Ratio \n");
if (init_cnt > 0) {
- printf("[Initialization Wifi] Success Ratio = %.2f% \n", (s_init_cnt / init_cnt) * 100);
+ printf("[Initialization Wifi] Success Ratio = %.2f%% \n", (s_init_cnt / init_cnt) * 100);
}
if (join_cnt > 0) {
- printf("[Connect Wifi] Success Ratio = %.2f% \n", (s_join_cnt / join_cnt) * 100);
+ printf("[Connect Wifi] Success Ratio = %.2f%% \n", (s_join_cnt / join_cnt) * 100);
}
if (leave_cnt > 0) {
- printf("[Disconnect Wifi] Success Ratio = %.2f% \n", (s_leave_cnt / leave_cnt) * 100);
+ printf("[Disconnect Wifi] Success Ratio = %.2f%% \n", (s_leave_cnt / leave_cnt) * 100);
}
if (deinit_cnt > 0) {
- printf("[Deinitization Wifi] Success Ratio = %.2f% \n", (s_deinit_cnt / deinit_cnt) * 100);
+ printf("[Deinitialization Wifi] Success Ratio = %.2f%% \n", (s_deinit_cnt / deinit_cnt) * 100);
}
TC_ASSERT_EQ("itc_wifimanager_success_ratio_ap", s_init_cnt, init_cnt);
TC_ASSERT_EQ("itc_wifimanager_success_ratio_ap", s_join_cnt, join_cnt);
|
changed bahavior of sending beacons and broadcast requests | @@ -4040,15 +4040,6 @@ while(1)
}
else
{
- if(activebeaconflag == false)
- {
- send_beaconmyap();
- send_beaconclone();
- }
- if(activeextbeaconflag == true)
- {
- send_beaconextap();
- }
if((statuscount %5) == 0)
{
gettimeofday(&tvakt, NULL);
@@ -4111,22 +4102,25 @@ while(1)
{
cpa = 0;
}
- if(set_channel() == true)
+ if(set_channel() == false)
{
+ printf("\nfailed to set channel\n");
+ globalclose();
+ }
+ }
if(activebeaconflag == false)
{
send_beaconbroadcast();
+ send_beaconmyap();
+ send_beaconclone();
}
- if(activescanflag == false)
+ if(activeextbeaconflag == true)
{
- send_undirected_proberequest();
- }
+ send_beaconextap();
}
- else
+ if(activescanflag == false)
{
- printf("\nfailed to set channel\n");
- globalclose();
- }
+ send_undirected_proberequest();
}
oldincommingcount1 = incommingcount;
statuscount++;
@@ -4518,16 +4512,13 @@ while(1)
{
cpa = 0;
}
- if(set_channel() == true)
- {
- send_undirected_proberequest();
- }
- else
+ if(set_channel() == false)
{
printf("\nfailed to set channel\n");
globalclose();
}
}
+ send_undirected_proberequest();
statuscount++;
tvfd.tv_sec = 1;
tvfd.tv_usec = 0;
|
Fixed bug in ice belt detection. All tests pass. | @@ -3470,7 +3470,7 @@ void fvNorthIceCapLand(BODY *body,int iBody,double *dLatIceEdge,
*bCap = 1;
// Now find ice cap extent
for (iLat=0;iLat<body[iBody].iNumLats;iLat++) {
- if (!fbIceLatLand(body,iBody,body[iBody].iNumLats-1)) {
+ if (!fbIceLatLand(body,iBody,iLat)) {
// Found edge!
*iLatIceEdge=iLat;
*dLatIceEdge = iLat/body[iBody].iNumLats * PI;
@@ -3509,7 +3509,7 @@ void fvNorthIceCapSea(BODY *body, int iBody,double *dLatIceEdge,
*bCap = 1;
// Now find ice cap extent
for (iLat=0;iLat<body[iBody].iNumLats;iLat++) {
- if (!fbIceLatSea(body,iBody,body[iBody].iNumLats-1)) {
+ if (!fbIceLatSea(body,iBody,iLat)) {
// Found edge!
*iLatIceEdge=iLat;
*dLatIceEdge = iLat/body[iBody].iNumLats * PI;
@@ -3549,7 +3549,7 @@ void fvSouthIceCapLand(BODY *body,int iBody,double *dLatIceEdge,
*bCap = 1;
// Now find ice cap extent
for (iLat=body[iBody].iNumLats-1;iLat>0;iLat--) {
- if (!fbIceLatSea(body,iBody,body[iBody].iNumLats-1)) {
+ if (!fbIceLatSea(body,iBody,iLat)) {
// Found edge!
*iLatIceEdge=iLat;
*dLatIceEdge = -(body[iBody].iNumLats-iLat-1)/body[iBody].iNumLats * PI;
@@ -3588,7 +3588,7 @@ void fvSouthIceCapSea(BODY *body,int iBody,double *dLatIceEdge,
*bCap = 1;
// Now find ice cap extent
for (iLat=body[iBody].iNumLats-1;iLat<0;iLat--) {
- if (!fbIceLatSea(body,iBody,body[iBody].iNumLats-1)) {
+ if (!fbIceLatSea(body,iBody,iLat)) {
// Found edge!
*iLatIceEdge=iLat;
*dLatIceEdge = -(body[iBody].iNumLats-iLat-1)/body[iBody].iNumLats * PI;
|
IP address dump - don't send subnets for unnumbered interfaces | @@ -1395,8 +1395,11 @@ vl_api_ip_address_dump_t_handler (vl_api_ip_address_dump_t * mp)
if (mp->is_ipv6)
{
/* *INDENT-OFF* */
- foreach_ip_interface_address (lm6, ia, sw_if_index,
- 1 /* honor unnumbered */,
+ /* Do not send subnet details of the IP-interface for
+ * unnumbered interfaces. otherwise listening clients
+ * will be confused that the subnet is applied on more
+ * than one interface */
+ foreach_ip_interface_address (lm6, ia, sw_if_index, 0,
({
r6 = ip_interface_address_get_address (lm6, ia);
u16 prefix_length = ia->address_length;
@@ -1408,8 +1411,7 @@ vl_api_ip_address_dump_t_handler (vl_api_ip_address_dump_t * mp)
else
{
/* *INDENT-OFF* */
- foreach_ip_interface_address (lm4, ia, sw_if_index,
- 1 /* honor unnumbered */,
+ foreach_ip_interface_address (lm4, ia, sw_if_index, 0,
({
r4 = ip_interface_address_get_address (lm4, ia);
u16 prefix_length = ia->address_length;
|
perf(non-null judgment):
add non-null judgment of "output_ptr->field_ptr" in in hlfabricDiscoveryPayloadDataPacked() | @@ -324,6 +324,10 @@ __BOATSTATIC BOAT_RESULT hlfabricDiscoveryPayloadDataPacked(BoatHlfabricTx *tx_p
}
output_ptr->field_ptr = BoatMalloc(resLen);
+ if(output_ptr->field_ptr == NULL){
+ BoatLog(BOAT_LOG_CRITICAL, "Fail to allocate output_ptr->field_ptr buffer.");
+ boat_throw(BOAT_ERROR_COMMON_OUT_OF_MEMORY, hlfabricDiscoveryPayloadDataPacked_exception);
+ }
protos__chaincode_input__pack(&message, output_ptr->field_ptr + 2);
// if (peerQueryData != NULL)
|
Put the 1.8.6 release on README.md | @@ -26,6 +26,7 @@ See LICENSE for details.
Release Number | Date | History
---------------|------|--------
1.10.0 | 2019-11-01 | [Portable UPnP SDK][Portable UPnP SDK]
+1.8.6 | 2019-11-20 | [Portable UPnP SDK][Portable UPnP SDK]
1.8.5 | 2019-11-01 | [Portable UPnP SDK][Portable UPnP SDK]
1.8.4 | 2018-10-25 | [Portable UPnP SDK][Portable UPnP SDK]
1.8.3 | 2017-11-12 | [Portable UPnP SDK][Portable UPnP SDK]
|
documentation: Fixed Coverage Badge Link | [](https://build.libelektra.org/job/libelektra/job/master/lastBuild)
[](https://github.com/ElektraInitiative/libelektra/actions/workflows/macOS.yml)
[](https://cirrus-ci.com/github/ElektraInitiative/libelektra)
-[](https://coveralls.io/github/ElektraInitiative/libelektra)
+[](https://coveralls.io/github/ElektraInitiative/libelektra?branch=master)
[](https://lgtm.com/projects/g/ElektraInitiative/libelektra/alerts)
_Elektra serves as a universal and secure framework to access configuration
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.