message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
Update boat_demo.c
Instructions for adjusting the c file | -/******************************************************************************
-Copyright (C) 2018-2020 aitos.io
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
-******************************************************************************/
+/*===========================================================================
+ boat_demo.c
+DESCRIPTION
+ This file is boat demo application.
+===========================================================================*/
#include "boatiotsdk.h"
#include "my_contract.h"
|
Turn off non-aggregated http events for now. | @@ -580,9 +580,10 @@ doHttpHeader(protocol_info *proto)
char *mtx_name = (proto->isServer) ? "http.server.duration" : "http.client.duration";
event_t http_dur = INT_EVENT(mtx_name, map->duration, DELTA, fields);
- cmdSendMetric(g_mtc, &http_dur);
+ // TBD AGG Only cmdSendMetric(g_mtc, &http_dur);
httpAggAddMetric(g_http_agg, &http_dur, map->clen, hreport.clen);
+ /* TBD AGG Only
if (map->clen != -1) {
event_t http_req_len = INT_EVENT("http.request.content_length", map->clen, DELTA, fields);
cmdSendMetric(g_mtc, &http_req_len);
@@ -592,6 +593,7 @@ doHttpHeader(protocol_info *proto)
event_t http_rsp_len = INT_EVENT("http.response.content_length", hreport.clen, DELTA, fields);
cmdSendMetric(g_mtc, &http_rsp_len);
}
+ */
}
|
add powershell check | @@ -59,6 +59,19 @@ catch [System.Management.Automation.CommandNotFoundException] {
Test-Git-Config -Option "user.name" -ErrMsg "Git username not set!`nRun: git config --global user.name 'My Name'"
Test-Git-Config -Option "user.email" -ErrMsg "Git email not set!`nRun: git config --global user.name '[email protected]'"
+$permission = (Get-Acl $PSScriptRoot).Access |
+?{$_.IdentityReference -match $env:UserName `
+ -and $_.FileSystemRights -match "Read" `
+ -or $_.FileSystemRights -match "Write" } |
+
+ Select IdentityReference,FileSystemRights
+
+If (-Not $permission){
+ Write-Host "Sorry, you do not have write permissions in this directory."
+ Write-Host "Please try running this script again from a directory that you do have write permissions for."
+ exit 1
+}
+
$repo_path = "https://github.com/zmkfirmware/zmk-config-split-template.git"
$title = "ZMK Config Setup:"
|
Tests: fixed "skip" descriptors check flag for controller. | @@ -275,7 +275,7 @@ def run(request):
_fds_check['main']['skip'] = False
_fds_check['router']['skip'] = False
- _fds_check['router']['skip'] = False
+ _fds_check['controller']['skip'] = False
yield
|
roller: get suggested gas price only for mainnet | (pure:m fallback-gas-price)
?. ?& ?=([~ %finished *] rep)
?=(^ full-file.u.rep)
+ :: get suggested price only for mainnet txs
+ ::
+ =(chain-id 1)
==
fallback
?~ jon=(de-json:html q.data.u.full-file.u.rep)
|
Update for LifeControl environmental sensor, pt2 | @@ -4205,10 +4205,6 @@ void DeRestPluginPrivate::addSensorNode(const deCONZ::Node *node, const deCONZ::
case TEMPERATURE_MEASUREMENT_CLUSTER_ID:
{
- if (modelId == QLatin1String("VOC_Sensor"))
- {
- fpHumiditySensor.inClusters.push_back(ci->id());
- }
fpTemperatureSensor.inClusters.push_back(ci->id());
}
break;
|
Find Tools: Correct minor spelling mistake | @@ -18,7 +18,7 @@ tags = { 'configure': "This script is used for the build configuration",
'benchmark': "This script runs benchmarks",
'debian': "Special script for debian system"}
-# No changes below this line necassary!
+# No changes below this line necessary!
from itertools import islice
import os
|
docs: reorder content in mem_alloc section
We should avoid hiding sections between long lists of API documentation. | @@ -121,14 +121,8 @@ generate a fatal LoadStoreError exception.
To use the region above the 4MiB limit, you can use the :doc:`himem API</api-reference/system/himem>`.
-
-API Reference - Heap Allocation
--------------------------------
-
-.. include-build-file:: inc/esp_heap_caps.inc
-
Thread Safety
-^^^^^^^^^^^^^
+-------------
Heap functions are thread safe, meaning they can be called from different tasks simultaneously without any limitations.
@@ -143,11 +137,6 @@ The following features are documented on the :doc:`Heap Memory Debugging </api-r
- :ref:`Heap Corruption Detection <heap-corruption>`
- :ref:`Heap Tracing <heap-tracing>` (memory leak detection, monitoring, etc.)
-API Reference - Initialisation
-------------------------------
-
-.. include-build-file:: inc/esp_heap_caps_init.inc
-
Implementation Notes
--------------------
@@ -159,6 +148,18 @@ The heap capabilities allocator uses knowledge of the memory regions to initiali
Calling ``free()`` involves finding the particular heap corresponding to the freed address, and then calling :cpp:func:`multi_heap_free` on that particular multi_heap instance.
+
+API Reference - Heap Allocation
+-------------------------------
+
+.. include-build-file:: inc/esp_heap_caps.inc
+
+
+API Reference - Initialisation
+------------------------------
+
+.. include-build-file:: inc/esp_heap_caps_init.inc
+
.. _multi-heap:
API Reference - Multi Heap API
|
Rust: Document LookupOptions | @@ -19,19 +19,16 @@ bitflags! {
/// Bitflags to be passed to [`lookup`](struct.KeySet.html#method.lookup) and [`lookup_by_name`](struct.KeySet.html#method.lookup_by_name).
#[derive(Default)]
pub struct LookupOption: elektra_sys::option_t {
+ /// No Option set
const KDB_O_NONE = elektra_sys::KDB_O_NONE as elektra_sys::option_t;
const KDB_O_DEL = elektra_sys::KDB_O_DEL as elektra_sys::option_t;
+ /// The found key will be popped from the keyset
const KDB_O_POP = elektra_sys::KDB_O_POP as elektra_sys::option_t;
- const KDB_O_NODIR = elektra_sys::KDB_O_NODIR as elektra_sys::option_t;
- const KDB_O_DIRONLY = elektra_sys::KDB_O_DIRONLY as elektra_sys::option_t;
- const KDB_O_NOREMOVE = elektra_sys::KDB_O_NOREMOVE as elektra_sys::option_t;
- const KDB_O_REMOVEONLY = elektra_sys::KDB_O_REMOVEONLY as elektra_sys::option_t;
- const KDB_O_INACTIVE = elektra_sys::KDB_O_INACTIVE as elektra_sys::option_t;
- const KDB_O_SYNC = elektra_sys::KDB_O_SYNC as elektra_sys::option_t;
- const KDB_O_SORT = elektra_sys::KDB_O_SORT as elektra_sys::option_t;
- const KDB_O_NORECURSIVE = elektra_sys::KDB_O_NORECURSIVE as elektra_sys::option_t;
+ /// Ignore case
const KDB_O_NOCASE = elektra_sys::KDB_O_NOCASE as elektra_sys::option_t;
+ /// Search with owner
const KDB_O_WITHOWNER = elektra_sys::KDB_O_WITHOWNER as elektra_sys::option_t;
+ /// Linear search from start -> cursor to cursor -> end
const KDB_O_NOALL = elektra_sys::KDB_O_NOALL as elektra_sys::option_t;
}
}
@@ -528,6 +525,17 @@ mod tests {
])
}
+ #[test]
+ fn can_duplicate_keyset() {
+ // Make sure that freeing the original ks does not invalidate the duplicate
+ let ks_dup;
+ {
+ let ks = setup_keyset();
+ ks_dup = ks.duplicate();
+ }
+ assert_eq!(ks_dup.size(), 2);
+ }
+
#[test]
fn extend_keyset_and_append_are_equal() {
let mut ks = setup_keyset();
@@ -601,5 +609,4 @@ mod tests {
assert_eq!(key.name(), "user/test/key");
Ok(())
}
-
}
|
ip: mfib CLI 'via local' fix
Type: fix | @@ -896,6 +896,8 @@ vnet_ip_mroute_cmd (vlib_main_t * vm,
*/
rpath.frp_proto = fib_proto_to_dpo (pfx.fp_proto);
rpath.frp_mitf_flags = MFIB_ITF_FLAG_FORWARD;
+
+ vec_add1 (rpaths, rpath);
}
else if (unformat (line_input, "via %U",
unformat_fib_route_path, &rpath, &payload_proto))
|
Fix "press Enter key" message
The message said "Press any key to continue...", whereas only
Enter/Return is accepted.
PR <https://github.com/Genymobile/scrcpy/pull/1783>
Fixes <https://github.com/Genymobile/scrcpy/issues/1757> | @@ -100,7 +100,7 @@ main(int argc, char *argv[]) {
#if defined (__WINDOWS__) && ! defined (WINDOWS_NOCONSOLE)
if (res != 0) {
- fprintf(stderr, "Press any key to continue...\n");
+ fprintf(stderr, "Press Enter to continue...\n");
getchar();
}
#endif
|
Changelog entry for
Merge from Maryse47: contrib/unbound.service.in: do not fork
into the background. | in unbound.service.
- Merge #81 from Maryse47: Consistently use /dev/urandom instead
of /dev/random in scripts and docs.
+ - Merge #83 from Maryse47: contrib/unbound.service.in: do not fork
+ into the background.
19 September 2019: Wouter
- Fix #78: Memory leak in outside_network.c.
|
show functions in the coverage summary | @@ -52,7 +52,7 @@ coverage:
_coverage_report:
llvm-profdata merge -sparse -o h2o.profdata /home/ci/profraw/*.profraw
- llvm-cov report -instr-profile h2o.profdata h2o $(SRC_DIR)/lib $(SRC_DIR)/src $(SRC_DIR)/deps/quicly/lib $(SRC_DIR)/deps/picotls/lib | tee /home/ci/summary.txt
+ llvm-cov report -show-region-summary=0 -show-functions=1 -instr-profile h2o.profdata h2o $(SRC_DIR)/lib $(SRC_DIR)/src $(SRC_DIR)/deps/quicly/lib $(SRC_DIR)/deps/picotls/lib | tee /home/ci/summary.txt
echo '~~~' > /home/ci/summary.md
cat /home/ci/summary.txt >> /home/ci/summary.md
echo '~~~' >> /home/ci/summary.md
|
Replace POINT_EPSILON with ANGLE_EPSILON. | @@ -336,9 +336,9 @@ vector_vec_angle_domain(CuTest *tc)
___THEN___
/* Always the smaller of the two possible angles. */
- CuAssertDblEquals(tc, 45.0, angle_x_y, POINT_EPSILON);
- CuAssertDblEquals(tc, 45.0, angle_y_x, POINT_EPSILON);
- CuAssertDblEquals(tc, 45.0, angle_x_z, POINT_EPSILON);
+ CuAssertDblEquals(tc, 45.0, angle_x_y, ANGLE_EPSILON);
+ CuAssertDblEquals(tc, 45.0, angle_y_x, ANGLE_EPSILON);
+ CuAssertDblEquals(tc, 45.0, angle_x_z, ANGLE_EPSILON);
___TEARDOWN___
}
@@ -363,7 +363,7 @@ vector_vec_angle_normalized(CuTest *tc)
___THEN___
/* Always the smaller of the two possible angles. */
- CuAssertDblEquals(tc, 90.0, angle, POINT_EPSILON);
+ CuAssertDblEquals(tc, 90.0, angle, ANGLE_EPSILON);
___TEARDOWN___
}
|
Manually install Ruby in cross Actions containers | @@ -248,9 +248,13 @@ jobs:
submodules: recursive
fetch-depth: 0
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: 2.6
+ # - uses: ruby/setup-ruby@v1
+ # with:
+ # ruby-version: 2.6
+
+ - name: Install Host toolchain
+ run: |
+ apt-get install --assume-yes build-essential ruby-full
- name: Build
run: |
@@ -288,9 +292,13 @@ jobs:
submodules: recursive
fetch-depth: 0
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: 2.6
+ # - uses: ruby/setup-ruby@v1
+ # with:
+ # ruby-version: 2.6
+
+ - name: Install Host toolchain
+ run: |
+ apt-get install --assume-yes build-essential ruby-full
- name: Prebuild
run: |
@@ -342,9 +350,13 @@ jobs:
submodules: recursive
fetch-depth: 0
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: 2.6
+ # - uses: ruby/setup-ruby@v1
+ # with:
+ # ruby-version: 2.6
+
+ - name: Install Host toolchain
+ run: |
+ apt-get install --assume-yes build-essential ruby-full
- name: Prebuild
run: |
@@ -399,9 +411,13 @@ jobs:
submodules: recursive
fetch-depth: 0
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: 2.6
+ # - uses: ruby/setup-ruby@v1
+ # with:
+ # ruby-version: 2.6
+
+ - name: Install Host toolchain
+ run: |
+ apt-get install --assume-yes build-essential ruby-full
- name: Build
run: |
@@ -498,9 +514,13 @@ jobs:
submodules: recursive
fetch-depth: 0
- - uses: ruby/setup-ruby@v1
- with:
- ruby-version: 2.6
+ # - uses: ruby/setup-ruby@v1
+ # with:
+ # ruby-version: 2.6
+
+ - name: Install Host toolchain
+ run: |
+ apt-get install --assume-yes build-essential ruby-full
- name: Build
run: |
|
memif: fix the maxmimum number of txqs
Type: fix
With multi-txq in VPP, user should be able to create
more txqs than vpp threads. MEMIF_MAX_M2S_RING should
be defined to 256 instead of number of vpp threads. | #define MEMIF_DEFAULT_TX_QUEUES 1
#define MEMIF_DEFAULT_BUFFER_SIZE 2048
-#define MEMIF_MAX_M2S_RING (vlib_get_n_threads ())
+#define MEMIF_MAX_M2S_RING 256
#define MEMIF_MAX_S2M_RING 256
#define MEMIF_MAX_REGION 256
#define MEMIF_MAX_LOG2_RING_SIZE 14
|
industry/foc: fix compilation for smo | @@ -291,7 +291,7 @@ static int foc_angle_osmo_run_f32(FAR foc_angle_f32_t *h,
/* Update observer */
motor_aobserver_smo(&ob->data, &in->state->iab, &in->state->vab,
- &ob->cfg.phy, ob->dir);
+ &ob->cfg.phy, in->dir, in->vel);
/* Copy data */
|
hobbit1_evb: fix mqttapp build error | +#ifndef _INTTYPES_H
+#define _INTTYPES_H 1
+
+#if !defined __cplusplus || defined __STDC_FORMAT_MACROS
+
+# if __WORDSIZE == 64
+# define __PRI64_PREFIX "l"
+# define __PRIPTR_PREFIX "l"
+# else
+# define __PRI64_PREFIX "ll"
+# define __PRIPTR_PREFIX
+# endif
+
+/* Unsigned integers. */
+# define PRIu8 "u"
+# define PRIu16 "u"
+# define PRIu32 "u"
+# define PRIu64 __PRI64_PREFIX "u"
+
+#endif
+
+#endif
|
Pop the value off the stack after printing and table resize | @@ -861,12 +861,13 @@ static DictuInterpretResult run(DictuVM *vm) {
DISPATCH();
CASE_CODE(POP_REPL): {
- Value v = pop(vm);
+ Value v = peek(vm, 0);
if (!IS_NIL(v)) {
setReplVar(vm, v);
printValue(v);
printf("\n");
}
+ pop(vm);
DISPATCH();
}
|
Adjust clap_plugin_factory documentation | @@ -11,7 +11,8 @@ extern "C" {
// Every method must be thread-safe.
// It is very important to be able to scan the plugin as quickly as possible.
//
-// If the content of the factory may change due to external events, like the user installed
+// The host may use clap_plugin_invalidation_factory to detect filesystem changes
+// which may change the factory's content.
typedef struct clap_plugin_factory {
// Get the number of plugins available.
// [thread-safe]
|
restyling fixes | @@ -208,6 +208,7 @@ sudo kdb umount user:/tests/storage
```
## Storing Comments
+
Most markup languages provide the possibility of adding comments. Elektra can store those comments in its meta-information as well. This can be achieved by setting the meta Key `comment` for the respective configuration Key. The `hosts` plugin currently stores the comments of the file in the respective Elektra configuration Key:
```sh
@@ -234,6 +235,7 @@ kdb meta-get /tests/hosts/ipv4/localhost 'comment/#0'
As you can see the Key that corresponds to the respective line in the hosts file has additional meta-information. This way comments in the configuration file can easily be imported into the KDB. Be aware that the comment also contains the trailing space preceding the text in the comment, which might be confusing. You can also opt to strip preceding and trailing whitespaces entirely.
## Ordering of Elements
+
If your plugin also has the ability to store configuration options in a certain order, then this is also support by Elektra. Keys can have the meta Key `order`, which indicates in which order lines should be written back to the configuration file. Inversely, when reading from configuration files, plugins should add the `order` meta Key to the respective KDB entries.
This behavior can be illustrated via the usage of the `hosts` plugin, which honors this convention:
|
improve display of hello.log and smokle-fails.log | @@ -56,12 +56,12 @@ echo "====== helloworld ======="
cd $aompdir/test/smoke/helloworld
make clean
OMP_TARGET_OFFLOAD=MANDATORY VERBOSE=1 make run > hello.log 2>&1
-tail -20 hello.log
+sed -n -e '/ld.lld/,$p' hello.log
echo "====== smoke-fails ======="
cd $aompdir/test/smoke-fails
OMP_TARGET_OFFLOAD=MANDATORY ./check_smoke_fails.sh > smoke-fails.log 2>&1
-tail -45 smoke-fails.log
+sed -n -e '/---- Results ---/,$p' smoke-fails.log
echo "====== smoke ======="
cd $aompdir/test/smoke
|
rm oculusmobile from t.headset.drivers;
Replaced by vrapi | @@ -96,7 +96,7 @@ function lovr.boot()
timer = true
},
headset = {
- drivers = { 'leap', 'openxr', 'oculus', 'vrapi', 'oculusmobile', 'openvr', 'webxr', 'webvr', 'desktop' },
+ drivers = { 'leap', 'openxr', 'oculus', 'vrapi', 'openvr', 'webxr', 'webvr', 'desktop' },
offset = 1.7,
msaa = 4
},
|
SELinux: 'create tap' (vhost-net backend TAP) fails when
SELinux is enable
Update the SELinux Policy to allow management of the new vhost-net
backend TAP interface. | @@ -51,6 +51,7 @@ allow vpp_t self:tun_socket { create relabelto relabelfrom };
allow vpp_t self:udp_socket { create ioctl };
allow vpp_t self:unix_dgram_socket { connect create ioctl };
allow vpp_t self:unix_stream_socket { create_stream_socket_perms connectto };
+allow vpp_t self:netlink_route_socket { bind create nlmsg_write read write };
manage_dirs_pattern(vpp_t, vpp_lib_t, vpp_lib_t)
manage_files_pattern(vpp_t, vpp_lib_t, vpp_lib_t)
@@ -92,6 +93,7 @@ dev_rw_userio_dev(vpp_t)
dev_rw_sysfs(vpp_t)
dev_read_cpuid(vpp_t)
dev_rw_vfio_dev(vpp_t)
+dev_rw_vhost( vpp_t )
domain_obj_id_change_exemption(vpp_t)
|
upload log functions | @@ -50,6 +50,25 @@ string exec(string command) {
return result;
}
+void upload_file(){
+ std::string command = "curl --include --request POST https://flightlessmango.com/logs -F 'log[game_id]=26506' -F 'log[user_id]=176' -F 'attachment=true' -A 'mangohud' ";
+ command += " -F 'log[uploads][]=@" + logFiles.back() + "'";
+
+ command += " | grep Location | cut -c11-";
+ std::string url = exec(command);
+ exec("xdg-open " + url);
+}
+
+void upload_files(){
+ std::string command = "curl --include --request POST https://flightlessmango.com/logs -F 'log[game_id]=26506' -F 'log[user_id]=176' -F 'attachment=true' -A 'mangohud' ";
+ for (auto& file : logFiles)
+ command += " -F 'log[uploads][]=@" + file + "'";
+
+ command += " | grep Location | cut -c11-";
+ std::string url = exec(command);
+ exec("xdg-open " + url);
+}
+
void writeFile(string filename){
logFiles.push_back(filename);
out.open(filename, ios::out | ios::app);
|
Operator 203YYY: print a more user-friendly error message | @@ -2373,6 +2373,9 @@ static int process_elements(grib_accessor* a,int flag,long onlySubset,long start
case 2:
/* Operator */
switch(descriptors[i]->X) {
+ case 3:
+ grib_context_log(c,GRIB_LOG_ERROR,"process_elements: operator %d not yet implemented\n",descriptors[i]->X);
+ return GRIB_NOT_IMPLEMENTED;
case 5:
descriptors[i]->width=descriptors[i]->Y*8;
descriptors[i]->type=BUFR_DESCRIPTOR_TYPE_STRING;
|
py: get rid of paddir(deprecated) | @@ -61,7 +61,7 @@ def construct_format(f, type_map=CONSTRUCT_CODE):
return "'{identifier}' / {type_id}".format(type_id=type_map.get(f.type_id),
identifier=f.identifier)
elif f.type_id == 'string' and f.options.get('size', None):
- return "'{id}'/ construct.String({size}, paddir='left')".format(id=f.identifier,
+ return "'{id}'/ construct.String({size})".format(id=f.identifier,
size=f.options['size'].value)
elif f.type_id == 'string':
return "'{id}' / construct.GreedyString(encoding='utf8')".format(id=f.identifier)
|
t/319-gaps.t: also test the gaps command | @@ -37,6 +37,8 @@ my $screen_height = 800;
my $outer_gaps = 20;
my $inner_gaps = 10;
my $total_gaps = $outer_gaps + $inner_gaps;
+
+sub is_gaps {
my $left_rect = $left->rect;
my $right_rect = $right->rect;
@@ -60,5 +62,68 @@ is_deeply($right_rect, {
width => $expected_width,
height => $expected_height,
}, 'right window position and size matches gaps expectations');
+}
+
+is_gaps();
+
+################################################################################
+# gaps command
+################################################################################
+
+# Verify gaps on a different workspace do not influence the existing workspace
+fresh_workspace;
+cmd 'gaps outer current set 30px';
+cmd "workspace $tmp";
+sync_with_i3;
+is_gaps();
+
+# Verify global gaps do influence all workspaces
+cmd 'gaps outer all set 30px';
+sync_with_i3;
+
+$outer_gaps = 30;
+$total_gaps = $outer_gaps + $inner_gaps;
+is_gaps();
+
+# Verify negative outer gaps compensate inner gaps, resulting only in gaps
+# in between adjacent windows or split containers, not towards the screen edges.
+cmd 'gaps outer all set -10px';
+sync_with_i3;
+
+sub is_gaps_in_between_only {
+ my $left_rect = $left->rect;
+ my $right_rect = $right->rect;
+
+ # No gaps towards the screen edges, each window covers half of the screen,
+ # each gets half of the inner gaps.
+ my $expected_width = ($screen_width / 2) - ($inner_gaps / 2);
+
+ # No gaps towards the screen edges at top and bottom.
+ my $expected_height = $screen_height;
+
+ is_deeply($left_rect, {
+ x => 0,
+ y => 0,
+ width => $expected_width,
+ height => $expected_height,
+ }, 'left window position and size matches gaps expectations');
+
+ is_deeply($right_rect, {
+ x => $left_rect->x + $left_rect->width + $inner_gaps,
+ y => 0,
+ width => $expected_width,
+ height => $expected_height,
+ }, 'right window position and size matches gaps expectations');
+}
+
+is_gaps_in_between_only();
+
+# Reduce the inner gaps and verify the outer gaps are adjusted to not
+# over-compensate.
+cmd 'gaps inner all set 6px';
+$inner_gaps = 6;
+$total_gaps = $outer_gaps + $inner_gaps;
+sync_with_i3;
+is_gaps_in_between_only();
done_testing;
|
Java Tutorial: Fix broken link | @@ -57,7 +57,7 @@ kdb.set(set, key);
If you try to save a key without fetching it beforehand, a `KDBException` will be thrown, telling you to call get before set.
The *user* namespace is accessible without special rights, but if you try to write to *system* you will need to have root
-privileges. Check [this](doc/TESTING.md) to see how to run as non-root user. This should only be done in testing
+privileges. Check [this](../TESTING.md) to see how to run as non-root user. This should only be done in testing
environments though as it is not intended for productive systems.
## Examples
|
worker: dup({0,1}) on serf start to prevent accidental use of stdin/stdout. | @@ -883,6 +883,12 @@ u3_worker_boot(void)
c3_i
main(c3_i argc, c3_c* argv[])
{
+ // Close file descriptors 0 and 1 so that we don't use them by accident.
+ int inn_i = dup(0);
+ int out_i = dup(1);
+ close(0);
+ close(1);
+
uv_loop_t* lup_u = uv_default_loop();
c3_c* dir_c = argv[1];
c3_c* key_c = argv[2];
@@ -939,11 +945,11 @@ main(c3_i argc, c3_c* argv[])
err_i = uv_pipe_init(lup_u, &u3V.inn_u.pyp_u, 0);
c3_assert(!err_i);
- uv_pipe_open(&u3V.inn_u.pyp_u, 0);
+ uv_pipe_open(&u3V.inn_u.pyp_u, inn_i);
err_i = uv_pipe_init(lup_u, &u3V.out_u.pyp_u, 0);
c3_assert(!err_i);
- uv_pipe_open(&u3V.out_u.pyp_u, 1);
+ uv_pipe_open(&u3V.out_u.pyp_u, out_i);
}
/* set up writing
|
tests: internal: signv4: initialize context with zeros | @@ -557,7 +557,7 @@ static void aws_test_suite()
struct aws_test *awt;
struct flb_aws_provider *provider;
- config = flb_malloc(sizeof(struct flb_config));
+ config = flb_calloc(1, sizeof(struct flb_config));
if (!config) {
flb_errno();
return;
|
fix reallocarr indirection (see | @@ -92,27 +92,23 @@ mi_decl_restrict void* mi_aligned_alloc(size_t alignment, size_t size) mi_attr_n
void* mi_reallocarray( void* p, size_t count, size_t size ) mi_attr_noexcept { // BSD
void* newp = mi_reallocn(p,count,size);
- if (newp==NULL) errno = ENOMEM;
+ if (newp==NULL) { errno = ENOMEM; }
return newp;
}
int mi_reallocarr( void* p, size_t count, size_t size ) mi_attr_noexcept { // NetBSD
+ mi_assert(p != NULL);
+ if (p == NULL) return EINVAL; // should we set errno as well?
void** op = (void**)p;
- int serrno = errno;
- void* newp = mi_reallocn(p,count,size);
- if (mi_unlikely(newp == NULL)) {
- errno = ENOMEM;
- return errno;
- } else {
+ void* newp = mi_reallocarray(*op, count, size);
+ if (mi_unlikely(newp == NULL)) return errno;
*op = newp;
- errno = serrno;
return 0;
}
-}
void* mi__expand(void* p, size_t newsize) mi_attr_noexcept { // Microsoft
void* res = mi_expand(p, newsize);
- if (res == NULL) errno = ENOMEM;
+ if (res == NULL) { errno = ENOMEM; }
return res;
}
|
fix potential string overflow bug | char packfile[MAX_FILENAME_LEN] = {"bor.pak"};
#if ANDROID
#include <unistd.h>
-char rootDir[MAX_BUFFER_LEN];
+char rootDir[MAX_BUFFER_LEN] = {""};
#endif
char paksDir[MAX_FILENAME_LEN] = {"Paks"};
char savesDir[MAX_FILENAME_LEN] = {"Saves"};
@@ -75,14 +75,14 @@ void borExit(int reset)
int main(int argc, char *argv[])
{
#ifndef SKIP_CODE
- char pakname[MAX_FILENAME_LEN];
+ char pakname[MAX_FILENAME_LEN] = {""};
#endif
#ifdef CUSTOM_SIGNAL_HANDLER
struct sigaction sigact;
#endif
#ifdef DARWIN
- char resourcePath[PATH_MAX];
+ char resourcePath[PATH_MAX] = {""};
CFBundleRef mainBundle;
CFURLRef resourcesDirectoryURL;
mainBundle = CFBundleGetMainBundle();
|
Clarify the character encoding example in rgbasm.5 | @@ -391,8 +391,8 @@ with its corresponding argument in
.Pq So %% Sc is replaced by the So % Sc character .
.El
.Ss Character maps
-When writing text that is meant to be displayed on the Game Boy, the characters used in the source code may need to have a different encoding than the rest of the source code.
-For example, the tiles used for uppercase letters may be placed starting at tile index 128, which would make it difficult to add text strings to the ROM.
+When writing text strings that are meant to be displayed on the Game Boy, the character encoding in the ROM may need to be different than the source file encoding.
+For example, the tiles used for uppercase letters may be placed starting at tile index 128, which differs from ASCII starting at 65.
.Pp
Character maps allow mapping strings to arbitrary 8-bit values:
.Bd -literal -offset indent
|
Fix crash when middle clicking outside tree | @@ -4249,10 +4249,13 @@ BOOLEAN NTAPI PhpProcessTreeNewCallback(
if (GetKeyState(VK_CONTROL) >= 0)
PhDeselectAllProcessNodes();
+ node = (PPH_PROCESS_NODE)mouseEvent->Node;
+ if (!node)
+ break;
+
if (ProcessTreeListSortOrder == NoSortOrder)
{
// in NoSortOrder we select subtree (TheEragon)
- node = (PPH_PROCESS_NODE)mouseEvent->Node;
// init last index to self, this way we select only the process if there are no children (TheEragon)
ULONG lastChildIndex = mouseEvent->Node->Index;
@@ -4267,12 +4270,11 @@ BOOLEAN NTAPI PhpProcessTreeNewCallback(
}
else
{
+ // in sorted order we select all processes with same name (TheEragon)
+
ULONG first = ULONG_MAX;
ULONG last = 0;
- // in sorted order we select all processes with same name (TheEragon)
- node = (PPH_PROCESS_NODE)mouseEvent->Node;
-
for (ULONG i = 0; i < ProcessNodeList->Count; i++)
{
PPH_PROCESS_NODE item = ProcessNodeList->Items[i];
|
Fix actors sometimes facing up after ScriptUpdate_Move is complete if move finishes on exact frame that animation frame changes | @@ -188,8 +188,6 @@ UBYTE ScriptUpdate_MoveActor() {
if (actors[script_actor].pos.x == actor_move_dest_x &&
actors[script_actor].pos.y == actor_move_dest_y) {
actors[script_actor].moving = FALSE;
- actors[script_actor].dir.x = 0;
- actors[script_actor].dir.y = 0;
actors[script_actor].script_control = FALSE;
if (script_actor == 0) {
pl_vel_x = 0;
@@ -238,8 +236,6 @@ UBYTE ScriptUpdate_MoveActorDiag() {
if (actors[script_actor].pos.x == actor_move_dest_x &&
actors[script_actor].pos.y == actor_move_dest_y) {
actors[script_actor].moving = FALSE;
- actors[script_actor].dir.x = 0;
- actors[script_actor].dir.y = 0;
actors[script_actor].script_control = FALSE;
if (script_actor == 0) {
pl_vel_x = 0;
|
Updating clang-format file to better match coding standards | ---
Language: Cpp
-# BasedOnStyle: WebKit
+BasedOnStyle: Google
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
-AlignConsecutiveAssignments: false
-AlignConsecutiveDeclarations: false
-AlignEscapedNewlinesLeft: false
-AlignOperands: false
+AlignConsecutiveAssignments: true
+AlignConsecutiveDeclarations: true
+AlignEscapedNewlinesLeft: true
+AlignOperands: true
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: true
@@ -14,29 +14,28 @@ AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
-AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
- AfterClass: false
- AfterControlStatement: false
- AfterEnum: false
+ AfterClass: true
+ AfterControlStatement: true
+ AfterEnum: true
AfterFunction: true
- AfterNamespace: false
+ AfterNamespace: true
AfterObjCDeclaration: false
- AfterStruct: false
- AfterUnion: false
- BeforeCatch: false
- BeforeElse: false
+ AfterStruct: true
+ AfterUnion: true
+ BeforeCatch: true
+ BeforeElse: true
IndentBraces: false
BreakBeforeBinaryOperators: All
-BreakBeforeBraces: Allman
+BreakBeforeBraces: Custom
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
-ColumnLimit: 0
+ColumnLimit: 78
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 4
@@ -46,44 +45,42 @@ DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
+# Include Ordering: system libraries (<stdio.h>), then external folders ("ipc/config.h"), then everything else
IncludeCategories:
- - Regex: '^"(llvm|llvm-c|clang|clang-c)/'
+ - Regex: '^<'
+ Priority: 1
+ - Regex: '^".*\/'
Priority: 2
- - Regex: '^(<|"(gtest|isl|json)/)'
- Priority: 3
- Regex: '.*'
- Priority: 1
-IndentCaseLabels: false
+ Priority: 3
+IndentCaseLabels: true
IndentWidth: 4
-IndentWrappedFunctionNames: false
+IndentWrappedFunctionNames: true
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
-NamespaceIndentation: Inner
-ObjCBlockIndentWidth: 4
-ObjCSpaceAfterProperty: true
-ObjCSpaceBeforeProtocolList: true
+NamespaceIndentation: All
PenaltyBreakBeforeFirstCallParameter: 19
-PenaltyBreakComment: 300
+PenaltyBreakComment: 0
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
-PenaltyExcessCharacter: 1000000
+PenaltyExcessCharacter: 10
PenaltyReturnTypeOnItsOwnLine: 60
-PointerAlignment: Middle
+PointerAlignment: Right
ReflowComments: true
SortIncludes: true
-SpaceAfterCStyleCast: false
+SpaceAfterCStyleCast: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
-SpacesBeforeTrailingComments: 1
+SpacesBeforeTrailingComments: 4
SpacesInAngles: false
-SpacesInContainerLiterals: true
+SpacesInContainerLiterals: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
-Standard: Cpp03
+Standard: Cpp11
TabWidth: 4
UseTab: Never
...
|
jenkins: move debian stretch to second build stage | @@ -481,20 +481,6 @@ def generateMainBuildStages() {
[TEST.ALL, TEST.MEM, TEST.NOKDB, TEST.INSTALL]
)
- // Add a task that should build the whole project to catch all test errors
- // in a standard environment
- tasks << buildAndTest(
- "debian-stretch-full",
- DOCKER_IMAGES.stretch,
- CMAKE_FLAGS_BUILD_ALL +
- CMAKE_FLAGS_DEBUG +
- CMAKE_FLAGS_BUILD_FULL +
- CMAKE_FLAGS_BUILD_STATIC +
- CMAKE_FLAGS_COVERAGE
- ,
- [TEST.ALL, TEST.MEM, TEST.NOKDB, TEST.INSTALL]
- )
-
// Add a task that should build the whole project to catch all test errors
// in a standard environment
tasks << buildAndTest(
@@ -532,6 +518,20 @@ def generateFullBuildStages() {
// Build doc and upload
tasks << buildDoc()
+ // Add a task that should build the whole project to catch all test errors
+ // in a standard environment
+ tasks << buildAndTest(
+ "debian-stretch-full",
+ DOCKER_IMAGES.stretch,
+ CMAKE_FLAGS_BUILD_ALL +
+ CMAKE_FLAGS_DEBUG +
+ CMAKE_FLAGS_BUILD_FULL +
+ CMAKE_FLAGS_BUILD_STATIC +
+ CMAKE_FLAGS_COVERAGE
+ ,
+ [TEST.ALL, TEST.MEM, TEST.NOKDB, TEST.INSTALL]
+ )
+
// Build Elektra with ASAN enabled
// Detects memory leaks via ASAN
tasks << buildAndTestAsan(
|
Remove duplicate defines | @@ -3062,7 +3062,7 @@ RtlRemoteCall(
_In_ BOOLEAN AlreadySuspended
);
-// Vectored exception handlers
+// Vectored Exception Handlers
NTSYSAPI
PVOID
@@ -4928,38 +4928,6 @@ RtlReportSilentProcessExit(
);
#endif
-// Vectored Exception Handlers
-
-NTSYSAPI
-PVOID
-NTAPI
-RtlAddVectoredExceptionHandler(
- _In_ ULONG First,
- _In_ PVECTORED_EXCEPTION_HANDLER Handler
- );
-
-NTSYSAPI
-ULONG
-NTAPI
-RtlRemoveVectoredExceptionHandler(
- _In_ PVOID Handle
- );
-
-NTSYSAPI
-PVOID
-NTAPI
-RtlAddVectoredContinueHandler(
- _In_ ULONG First,
- _In_ PVECTORED_EXCEPTION_HANDLER Handler
- );
-
-NTSYSAPI
-ULONG
-NTAPI
-RtlRemoveVectoredContinueHandler(
- _In_ PVOID Handle
- );
-
// Random
NTSYSAPI
|
Fix an ssl_test_old test failure
In builds where SSLv3 is enabled ssl_test_old was failing. We need to
make sure we disable SSLv3 related tests when using the FIPS provider.
[extended tests] | @@ -361,6 +361,9 @@ sub testssl {
skip "SSLv3 is not supported by this OpenSSL build", 4
if disabled("ssl3");
+ skip "SSLv3 is not supported by the FIPS provider", 4
+ if $provider eq "fips";
+
ok(run(test([@ssltest, "-bio_pair", "-ssl3"])),
'test sslv3 via BIO pair');
ok(run(test([@ssltest, "-bio_pair", "-ssl3", "-server_auth", @CA])),
|
forgot detection of 802.11 header | @@ -1692,6 +1692,10 @@ if(linktype == DLT_IEEE802_11_RADIO)
packet_ptr += rth->it_len;
caplen -= rth->it_len;
}
+else if(linktype == DLT_IEEE802_11)
+ {
+ /* nothing to do */
+ }
else if(linktype == DLT_PRISM_HEADER)
{
if(caplen < (uint32_t)PRISM_SIZE)
|
add zipatcher to ya tools | "c++filt": { "description": "Run c++filt" },
"nm": { "description": "Run nm" },
"svn": { "description": "Subversion command-line client" },
+ "zipatcher": { "description": "Apply zipatch from file or Arcanum pull request" },
"ymake": { "description": "Run ymake", "visible": false },
"ymake_dev": { "description": "Run ymake dev version", "visible": false },
"test_tool": { "description": "Test tools for tests", "visible": false },
{"host": {"os": "DARWIN", "default": true}}
]
},
+ "zipatcher": {
+ "tools": {
+ "zipatcher": { "bottle": "zipatcher", "executable": "zipatcher" }
+ },
+ "platforms": [
+ {"host": {"os": "LINUX"}, "default": true}
+ ]
+ },
"cmake": {
"tools": {
"cmake": { "bottle": "cmake", "executable": "cmake" }
"svnversion": ["svnversion"]
}
},
+ "zipatcher": {
+ "formula": {
+ "sandbox_id": 352945572,
+ "match": "zipatcher"
+ },
+ "executable": {
+ "zipatcher": ["zipatcher"]
+ }
+ },
"cmake": {
"formula": {
"sandbox_id": 105454515,
|
Fixed undefined terminal_thread in Windows builds
This bug was introduced in | #include <math.h>
#include <ctype.h>
#include <sys/stat.h>
-#include <poll.h>
#if !defined(_WIN32) && !defined(_WIN64)
+#include <poll.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
@@ -423,8 +423,8 @@ static int terminal(void) {
return 0;
}
-#if !defined(_WIN32) && !defined(_WIN64)
static void *terminal_thread(void *arg) {
+#if !defined(_WIN32) && !defined(_WIN64)
struct sockaddr_un addr;
int s;
if( (s = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) { cheatcoin_err("Can't create unix domain socket errno:%d", errno); return 0; }
@@ -454,9 +454,11 @@ static void *terminal_thread(void *arg) {
if (res < 0) exit(0);
}
}
+#else
return 0;
-}
#endif /* WIN */
+}
+
#ifdef CHEATCOINWALLET
int cheatcoin_main(int argc, char **argv) {
|
Completions: Fix minor spelling mistake | #!/usr/bin/fish
-# Not intended to be executed directly, shebang exists to supress checkbashisms warning
+
+# Not intended to be executed directly, shebang exists only to suppress `checkbashisms` warning
# -- Functions -----------------------------------------------------------------------------------------------------------------------------
|
Changed 'Serial Viewer Output' to 'Serial Wire Output'
Didn't find any reference to 'Serial Viewer Output' on any ARM page. Therefore I assume that the correct expression is 'Serial Wire Output'. | @@ -7,7 +7,7 @@ CMSIS provides additional debug functions to enlarge the Debug Access.
Data can be transmitted via a certain global buffer variable towards the target system.
The Cortex-M3 / Cortex-M4 / Cortex-M7 incorporates the <b>Instrumented Trace Macrocell (ITM)</b> that
-provides together with the <b>Serial Viewer Output (SVO)</b> trace capabilities for the
+provides together with the <b>Serial Wire Output (SWO)</b> trace capabilities for the
microcontroller system. The ITM has 32 communication channels; two ITM
communication channels are used by CMSIS to output the following information:
|
Add function definitions used in the tasks_test_access_function.h to cbmc.h | -// CBMC pointer uses BITS bits for object id, remaining bits for offset
-// ProcessDHCPReplies needs 7 bits, most need at most 4
+// CBMC pointer uses BITS bits for object id, remaining bits for
+// offset ProcessDHCPReplies needs 7 bits, most need at most 4
#define CBMC_BITS 7
#define CBMC_MAX_OBJECT_SIZE (0xFFFFFFFF >> CBMC_BITS)
enum CBMC_LOOP_CONDITION { CBMC_LOOP_BREAK, CBMC_LOOP_CONTINUE, CBMC_LOOP_RETURN };
-// CBMC specification: capture old value for precondition/postcondition checking
+// CBMC specification: capture old value for precondition /
+// postcondition checking
#define OLDVAL(var) _old_ ## var
#define SAVE_OLDVAL(var,typ) const typ OLDVAL(var) = var
-// CBMC specification: capture old value for values passed by reference in function abstractions
+// CBMC specification: capture old value for values passed by
+// reference in function abstractions
#define OBJ(var) (*var)
#define OLDOBJ(var) _oldobj_ ## var
@@ -26,12 +28,25 @@ enum CBMC_LOOP_CONDITION { CBMC_LOOP_BREAK, CBMC_LOOP_CONTINUE, CBMC_LOOP_RETURN
#define __CPROVER_printf_ptr(var) { uint8_t *ValueOf_ ## var = (uint8_t *) var; }
#define __CPROVER_printf2_ptr(str,exp) { uint8_t *ValueOf_ ## str = (uint8_t *) (exp); }
-/* xWantedSize is not bounded in this function, but there might be a need to bound it in the future.
- * In theory, CBMC malloc allows to allocate an arbitrary amount of data. This will not be true for
+/* CBMC assert to test pvPortMalloc result when xWantedSize is
+ * 0. Mostly used to report full coverage on pvPortMalloc, but use
+ * with caution as it might complicate debugging
+ */
+#define __CPROVER_assert_zero_allocation() \
+ __CPROVER_assert( pvPortMalloc(0) == NULL, \
+ "pvPortMalloc allows zero-allocated memory.")
+
+/* xWantedSize is not bounded in this function, but there might be a
+ * need to bound it in the future. In theory, CBMC malloc allows to
+ * allocate an arbitrary amount of data. This will not be true for
* embedded devices.
*/
void *pvPortMalloc( size_t xWantedSize )
{
+ if ( xWantedSize == 0 )
+ {
+ return NULL;
+ }
return nondet_bool() ? malloc( xWantedSize ) : NULL;
}
@@ -40,3 +55,7 @@ void vPortFree( void *pv )
(void)pv;
free(pv);
}
+
+BaseType_t nondet_basetype();
+UBaseType_t nondet_ubasetype();
+TickType_t nondet_ticktype();
|
remove unneeded MI_HUGE_OBJ_SIZE_MAX | @@ -156,7 +156,6 @@ typedef int32_t mi_ssize_t;
#define MI_MEDIUM_OBJ_WSIZE_MAX (MI_MEDIUM_OBJ_SIZE_MAX/MI_INTPTR_SIZE)
#define MI_LARGE_OBJ_SIZE_MAX (MI_SEGMENT_SIZE/2) // 32MiB on 64-bit
#define MI_LARGE_OBJ_WSIZE_MAX (MI_LARGE_OBJ_SIZE_MAX/MI_INTPTR_SIZE)
-#define MI_HUGE_OBJ_SIZE_MAX (2*MI_INTPTR_SIZE*MI_SEGMENT_SIZE) // (must match MI_REGION_MAX_ALLOC_SIZE in memory.c)
// Maximum number of size classes. (spaced exponentially in 12.5% increments)
#define MI_BIN_HUGE (73U)
@@ -175,7 +174,7 @@ typedef int32_t mi_ssize_t;
#define MI_MAX_SLICE_OFFSET ((MI_ALIGNMENT_MAX / MI_SEGMENT_SLICE_SIZE) - 1)
// Used as a special value to encode block sizes in 32 bits.
-#define MI_HUGE_BLOCK_SIZE ((uint32_t)MI_HUGE_OBJ_SIZE_MAX)
+#define MI_HUGE_BLOCK_SIZE ((uint32_t)(2*MI_GiB))
// blocks up to this size are always allocated aligned
#define MI_MAX_ALIGN_GUARANTEE (8*MI_MAX_ALIGN_SIZE)
|
sp: parser: allow dots in identifier | @@ -92,7 +92,8 @@ RECORD_TIME return RECORD_TIME;
-?[1-9][0-9]* { yylval->integer = atoi(yytext); return INTEGER; }
-?[1-9][0-9]*\.[0-9]+ { yylval->fval = atof(yytext); return FLOATING; }
\'([^']|'{2})*\' { yylval->string = remove_dup_qoutes(yytext + 1, yyleng - 2); return STRING; }
-[A-Za-z][A-Za-z0-9_]* { yylval->string = flb_strdup(yytext); return IDENTIFIER; }
+
+[A-Za-z][A-Za-z0-9_.]* { yylval->string = flb_strdup(yytext); return IDENTIFIER; }
"*" |
"," |
|
Add install config file script | @@ -144,3 +144,13 @@ kdb meta-get user/tests/hosts/result/ipv6/ip6-localhost comment/#1
```
See how for the comments the `our`version was preserved.
+
+
+
+## elektra-install-config-files
+use the same file base name, but from a different folder!
+pay attention when mounting that mounting into user/ is strange
+use sudo for mounting
+example call is
+elektra-install-config-files system/lines ~/programming/elektra_initiative/stuff/data/artificial/exampletext/new/test line
+elektra-install-config-files system/lines ~/programming/elektra_initiative/stuff/data/artificial/exampletext/test line
|
Use state/lux instead state/illuminance for legacy rule conditions | @@ -397,6 +397,10 @@ RuleCondition::RuleCondition(const QVariantMap &map) :
if (m_address.startsWith(QLatin1String("/sensors")))
{
m_prefix = RSensors;
+ if (m_address.endsWith(QLatin1String("/illuminance")))
+ { // convert old to new style
+ m_address.replace(QLatin1String("/illuminance"), QLatin1String("/lux"));
+ }
}
else if (m_address.startsWith(QLatin1String("/config")))
{
|
arp: Restore CLI for setting ARP proxy entries
Type: fix | @@ -152,8 +152,8 @@ proxy_arp_intfc_walk (proxy_arp_intf_walk_t cb, void *data)
static clib_error_t *
set_int_proxy_arp_command_fn (vlib_main_t * vm,
- unformat_input_t *
- input, vlib_cli_command_t * cmd)
+ unformat_input_t * input,
+ vlib_cli_command_t * cmd)
{
vnet_main_t *vnm = vnet_get_main ();
u32 sw_if_index;
@@ -186,6 +186,43 @@ set_int_proxy_arp_command_fn (vlib_main_t * vm,
return 0;
}
+static clib_error_t *
+set_arp_proxy (vlib_main_t * vm,
+ unformat_input_t * input, vlib_cli_command_t * cmd)
+{
+ ip4_address_t start = {.as_u32 = ~0 }, end =
+ {
+ .as_u32 = ~0};
+ u32 fib_index, table_id = 0;
+ int add = 1;
+
+ while (unformat_check_input (input) != UNFORMAT_END_OF_INPUT)
+ {
+ if (unformat (input, "table-id %d", &table_id))
+ ;
+ else if (unformat (input, "start %U", unformat_ip4_address, &start))
+ ;
+ else if (unformat (input, "end %U", unformat_ip4_address, &end))
+ ;
+ else if (unformat (input, "del") || unformat (input, "delete"))
+ add = 0;
+ else
+ break;
+ }
+
+ fib_index = fib_table_find (FIB_PROTOCOL_IP4, table_id);
+
+ if (~0 == fib_index)
+ return (clib_error_return (0, "no such table: %d", table_id));
+
+ if (add)
+ arp_proxy_add (fib_index, &start, &end);
+ else
+ arp_proxy_del (fib_index, &start, &end);
+
+ return (NULL);
+}
+
/* *INDENT-OFF* */
/*?
* Enable proxy-arp on an interface. The vpp stack will answer ARP
@@ -214,6 +251,14 @@ VLIB_CLI_COMMAND (set_int_proxy_enable_command, static) = {
};
/* *INDENT-ON* */
+/* *INDENT-OFF* */
+VLIB_CLI_COMMAND (set_arp_proxy_command, static) = {
+ .path = "set arp proxy",
+ .short_help = "set arp proxy [del] table-ID <table-ID> start <start-address> end <end-addres>",
+ .function = set_arp_proxy,
+};
+/* *INDENT-ON* */
+
typedef struct
{
u8 packet_data[64];
|
travis MAINTENANCE define osx rpath variable | @@ -13,6 +13,9 @@ if(NOT UNIX)
message(FATAL_ERROR "Only *nix like systems are supported.")
endif()
+# osx specific
+set(CMAKE_MACOSX_RPATH TRUE)
+
set(INCLUDE_INSTALL_SUBDIR ${CMAKE_INSTALL_INCLUDEDIR}/libnetconf2)
set(DATA_INSTALL_DIR ${CMAKE_INSTALL_DATADIR}/libnetconf2)
|
Fix a typo on the SSL_dup page | @@ -31,8 +31,8 @@ B<SSL_CTX> that was used to create I<s>. It additionally duplicates a subset of
the settings in I<s> into the new B<SSL> object.
For SSL_dup() to work, the connection MUST be in its initial state and
-MUST NOT have not yet have started the SSL handshake. For connections
-that are not in their initial state SSL_dup() just increments an internal
+MUST NOT have yet started the SSL handshake. For connections that are not in
+their initial state SSL_dup() just increments an internal
reference count and returns the I<same> handle. It may be possible to
use L<SSL_clear(3)> to recycle an SSL handle that is not in its initial
state for re-use, but this is best avoided. Instead, save and restore
|
Travis: Also try GCC on macOS
Usually the macOS command `gcc` is just a frontend for `clang`. To
compile Elektra with an actual version of GCC on macOS we install the
compiler suite via Homebrew, and change the compiler variables `CC` and
`CXX`. | @@ -39,6 +39,12 @@ before_install:
rvm install 2.3.1;
rvm use 2.3.1;
gem install test-unit --no-document;
+ if [[ "$CC" == "gcc" ]]; then
+ brew install gcc;
+ brew link --overwrite gcc;
+ export CC=gcc-7;
+ export CXX=g++-7;
+ fi;
brew install ninja;
brew install checkbashisms;
brew install swig;
|
Have a couple of SipHash test uses the EVP_PKEY method | @@ -118,7 +118,7 @@ Key = 000102030405060708090A0B0C0D0E0F
Input = 0001020304050607
Output = 3b62a9ba6258f5610f83e264f31497b4
-MAC = SipHash
+MAC = SipHash by EVP_PKEY
Key = 000102030405060708090A0B0C0D0E0F
Input = 000102030405060708
Output = 264499060ad9baabc47f8b02bb6d71ed
@@ -159,6 +159,14 @@ Ctrl = digestsize:13
Key = 000102030405060708090A0B0C0D0E0F
Result = MAC_CTRL_ERROR
+# SIPHASH - default values: 2,4 rounds, explicit 13-byte mac (invalid size)
+# by EVP_PKEY this time
+
+MAC = SipHash by EVP_PKEY
+Ctrl = digestsize:13
+Key = 000102030405060708090A0B0C0D0E0F
+Result = EVPPKEYCTXCTRL_ERROR
+
Title = HMAC tests (from RFC2104 and others)
MAC = HMAC
|
Check U16 bounds of /config/networkopenduration | @@ -1922,7 +1922,7 @@ int DeRestPluginPrivate::modifyConfig(const ApiRequest &req, ApiResponse &rsp)
{
int seconds = map["networkopenduration"].toInt(&ok);
- if (!ok)
+ if (!ok || seconds < 0 || seconds > UINT16_MAX)
{
rsp.list.append(errorToMap(ERR_INVALID_VALUE, QString("/config/networkopenduration"), QString("invalid value, %1, for parameter, networkopenduration").arg(map["networkopenduration"].toString())));
rsp.httpStatus = HttpStatusBadRequest;
|
more note in installation | # Invoke-Expression (Invoke-Webrequest <my location> -UseBasicParsing).Content
$outfile=($env:TMP,$env:TEMP,'.' -ne $null)[0]+"\$pid-xmake-installer.exe"
+try{
+ Write-Output "$pid"|Out-File -FilePath "$outfile"
+ Remove-Item "$outfile"
+}catch{
+ Write-Host 'Cannot write to temp path'
+ Write-Host 'Please set environment var "TMP" to another path'
+ Exit 1
+}
$ver='v2.1.3'
+Write-Host 'Start downloading... Hope amazon S3 is not broken again'
+try{
Invoke-Webrequest "https://github.com/tboox/xmake/releases/download/$ver/xmake-$ver.exe" -OutFile "$outfile"
-Start-Process -FilePath "$outfile" -ArgumentList '/S /D=C:\xmake' -Wait
+}catch{
+ Write-Host 'Download failed!'
+ Write-Host 'Check your network or... the news of S3 break'
+ Exit 1
+}
+Write-Host 'Start installation... Hope your antivirus doesn''t trouble'
+$installdir=$HOME+'\xmake'
+Write-Host "Install to $installdir"
+try{
+ Start-Process -FilePath "$outfile" -ArgumentList "/S /D=$installdir" -Wait
+}catch{
+ Remove-Item "$outfile"
+ Write-Host 'Install failed!'
+ Write-Host 'Close your antivirus then try again'
+ Exit 1
+}
Remove-Item "$outfile"
-$env:Path+=";C:\xmake"
-[Environment]::SetEnvironmentVariable("Path",[Environment]::GetEnvironmentVariable("Path",[System.EnvironmentVariableTarget]::User)+";C:\xmake",[System.EnvironmentVariableTarget]::User)
+Write-Host 'Adding to PATH... almost done'
+$env:Path+=";$installdir"
+[Environment]::SetEnvironmentVariable("Path",[Environment]::GetEnvironmentVariable("Path",[System.EnvironmentVariableTarget]::User)+";$installdir",[System.EnvironmentVariableTarget]::User) # this step is optional because installer writes path to regedit
xmake --version
|
Remove wrong curly bracket | @@ -1292,7 +1292,7 @@ espi_get_reset_sub_cmd(esp_msg_t* msg, uint8_t* is_ok, uint8_t* is_error, uint8_
case ESP_CMD_TCPIP_CIPMUX:
#if ESP_CFG_CONN_MANUAL_TCP_RECEIVE
SET_NEW_CMD(ESP_CMD_TCPIP_CIPRECVMODE); break;
- case ESP_CMD_TCPIP_CIPRECVMODE: {
+ case ESP_CMD_TCPIP_CIPRECVMODE:
#endif /* ESP_CFG_CONN_MANUAL_TCP_RECEIVE */
#if ESP_CFG_MODE_STATION
SET_NEW_CMD(ESP_CMD_WIFI_CWLAPOPT); break;/* Set visible data for CWLAP command */
|
fix: replace BoatIotSdkDeInit(); with BoatFree(); in test_002InitWallet_0001SetEIP155CompSuccess | @@ -563,7 +563,7 @@ START_TEST(test_002InitWallet_0001SetEIP155CompSuccess)
/* 2-2. verify the global variables that be affected */
ck_assert(wallet_ptr->network_info.eip155_compatibility == wallet.eip155_compatibility);
- BoatIotSdkDeInit();
+ BoatFree(wallet_ptr);
}
END_TEST
|
fix x1000 memory use bug | @@ -90,6 +90,13 @@ void rt_hw_board_init(void)
/* init hardware interrupt */
rt_hw_interrupt_init();
+
+#ifdef RT_USING_HEAP
+ /* init memory system */
+ rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
+#endif
+
+ /* init uart */
rt_hw_uart_init();
#ifdef RT_USING_CONSOLE
@@ -97,11 +104,6 @@ void rt_hw_board_init(void)
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
#endif /* RT_USING_CONSOLE */
-#ifdef RT_USING_HEAP
- /* init memory system */
- rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
-#endif
-
#ifdef RT_USING_COMPONENTS_INIT
rt_components_board_init();
#endif
|
Run "wuffs gen" missed for
Commit is "Add more
parse_number_f64_eisel comments". I forgot to run "wuffs gen" after
updating a comment. | @@ -10592,8 +10592,8 @@ wuffs_base__private_implementation__high_prec_dec__round_just_enough(
// wuffs_base__private_implementation__parse_number_f64_eisel produces the IEEE
// 754 double-precision value for an exact mantissa and base-10 exponent. For
// example:
-// - when parsing "456.789e+02", man is 456789 and exp10 is -1.
-// - when parsing "-123", man is 123 and exp10 is 0. Processing the leading
+// - when parsing "12345.678e+02", man is 12345678 and exp10 is -1.
+// - when parsing "-12", man is 12 and exp10 is 0. Processing the leading
// minus sign is the responsibility of the caller, not this function.
//
// On success, it returns a non-negative int64_t such that the low 63 bits hold
|
Remove previous masternode fix attempt | @@ -1015,7 +1015,6 @@ bool AppInit2(boost::thread_group& threadGroup)
std::string errorMessage;
CKey key;
- //key.MakeNewKey(false); // Pretty important.
CPubKey pubkey;
if(!darkSendSigner.SetKey(strMasterNodePrivKey, errorMessage, key, pubkey))
|
nimble/l2cap: Move proc initialization
Without that identifier was incorrectly set to 0 | @@ -1368,6 +1368,10 @@ ble_l2cap_sig_ecoc_connect(uint16_t conn_handle, uint16_t psm, uint16_t mtu,
return BLE_HS_ENOMEM;
}
+ proc->op = BLE_L2CAP_SIG_PROC_OP_CONNECT;
+ proc->id = ble_l2cap_sig_next_id();
+ proc->conn_handle = conn_handle;
+
req = ble_l2cap_sig_cmd_get(BLE_L2CAP_SIG_OP_CREDIT_CONNECT_REQ, proc->id,
sizeof(*req) + num * sizeof(uint16_t), &txom);
if (!req) {
@@ -1396,10 +1400,6 @@ ble_l2cap_sig_ecoc_connect(uint16_t conn_handle, uint16_t psm, uint16_t mtu,
}
proc->connect.chan_cnt = num;
- proc->op = BLE_L2CAP_SIG_PROC_OP_CONNECT;
- proc->id = ble_l2cap_sig_next_id();
- proc->conn_handle = conn_handle;
-
req->psm = htole16(psm);
req->mtu = htole16(chan->coc_rx.mtu);
req->mps = htole16(chan->my_mtu);
|
OcAppleKernelLib: Fix memory initialisation | @@ -411,6 +411,7 @@ ReadAppleKernel (
ASSERT (KernelSize != NULL);
ASSERT (AllocatedSize != NULL);
+ *Is32Bit = FALSE;
*KernelSize = 0;
*AllocatedSize = KERNEL_HEADER_SIZE;
*Kernel = AllocatePool (*AllocatedSize);
|
fix lossless decoding w/WEBP_REDUCE_SIZE
alpha processing is still required when requesting premultiplied output
since:
WEBP_REDUCE_SIZE: disable all rescaler code | @@ -1643,17 +1643,17 @@ int VP8LDecodeImage(VP8LDecoder* const dec) {
#if !defined(WEBP_REDUCE_SIZE)
if (io->use_scaling && !AllocateAndInitRescaler(dec, io)) goto Err;
-
- if (io->use_scaling || WebPIsPremultipliedMode(dec->output_->colorspace)) {
- // need the alpha-multiply functions for premultiplied output or rescaling
- WebPInitAlphaProcessing();
- }
#else
if (io->use_scaling) {
dec->status_ = VP8_STATUS_INVALID_PARAM;
goto Err;
}
#endif
+ if (io->use_scaling || WebPIsPremultipliedMode(dec->output_->colorspace)) {
+ // need the alpha-multiply functions for premultiplied output or rescaling
+ WebPInitAlphaProcessing();
+ }
+
if (!WebPIsRGBMode(dec->output_->colorspace)) {
WebPInitConvertARGBToYUV();
if (dec->output_->u.YUVA.a != NULL) WebPInitAlphaProcessing();
|
pbio/trajectory: Extend final phase from w3.
This can be a nonzero speed, so the new trajectory must adopt it. This
one was missed when implementing w3 throughout. | @@ -442,9 +442,9 @@ pbio_error_t pbio_trajectory_extend(pbio_trajectory_t *trj, pbio_trajectory_comm
c->th0 = trj->th2;
c->th0_ext = trj->th2_ext;
} else {
- // We are in the zero speed phase, so we can restart from its starting point
+ // We are in the final speed phase, so we can restart from its starting point
c->t0 = trj->t3;
- c->w0 = 0;
+ c->w0 = trj->w3;
c->th0 = trj->th3;
c->th0_ext = trj->th3_ext;
}
|
fix tb_print auto add \0 in the end | @@ -52,7 +52,7 @@ tb_void_t tb_print(tb_char_t const* string)
// the data and size
tb_byte_t const* data = (tb_byte_t const*)string;
- tb_size_t size = tb_strlen(string) + 1;
+ tb_size_t size = tb_strlen(string);
// write string to stdout
tb_size_t writ = 0;
|
[net][sal] Add options and types for UDP multicast traffic handling
[net][sal] Add options for level IPPROTO_IP | @@ -97,6 +97,10 @@ typedef uint16_t in_port_t;
#define MSG_DONTWAIT 0x08 /* Nonblocking i/o for this operation only */
#define MSG_MORE 0x10 /* Sender will send more */
+/* Options for level IPPROTO_IP */
+#define IP_TOS 1
+#define IP_TTL 2
+
/* Options for level IPPROTO_TCP */
#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
#define TCP_KEEPALIVE 0x02 /* send KEEPALIVE probes when idle for pcb->keep_idle milliseconds */
@@ -107,6 +111,10 @@ typedef uint16_t in_port_t;
/* Options and types related to multicast membership */
#define IP_ADD_MEMBERSHIP 3
#define IP_DROP_MEMBERSHIP 4
+/* Options and types for UDP multicast traffic handling */
+#define IP_MULTICAST_TTL 5
+#define IP_MULTICAST_IF 6
+#define IP_MULTICAST_LOOP 7
typedef struct ip_mreq
{
@@ -114,6 +122,27 @@ typedef struct ip_mreq
struct in_addr imr_interface; /* local IP address of interface */
} ip_mreq;
+/* The Type of Service provides an indication of the abstract parameters of the quality of service desired */
+#define IPTOS_TOS_MASK 0x1E
+#define IPTOS_TOS(tos) ((tos) & IPTOS_TOS_MASK)
+#define IPTOS_LOWDELAY 0x10
+#define IPTOS_THROUGHPUT 0x08
+#define IPTOS_RELIABILITY 0x04
+#define IPTOS_LOWCOST 0x02
+#define IPTOS_MINCOST IPTOS_LOWCOST
+
+/* The Network Control precedence designation is intended to be used within a network only */
+#define IPTOS_PREC_MASK 0xe0
+#define IPTOS_PREC(tos) ((tos) & IPTOS_PREC_MASK)
+#define IPTOS_PREC_NETCONTROL 0xe0
+#define IPTOS_PREC_INTERNETCONTROL 0xc0
+#define IPTOS_PREC_CRITIC_ECP 0xa0
+#define IPTOS_PREC_FLASHOVERRIDE 0x80
+#define IPTOS_PREC_FLASH 0x60
+#define IPTOS_PREC_IMMEDIATE 0x40
+#define IPTOS_PREC_PRIORITY 0x20
+#define IPTOS_PREC_ROUTINE 0x00
+
/* Options for shatdown type */
#ifndef SHUT_RD
#define SHUT_RD 0
|
Align role certificate checks
UUID from role certificate verification added | @@ -308,26 +308,35 @@ check_role_assertion(oc_sec_cred_t *cred)
#ifdef OC_PKI
static bool
-check_device_uuid_from_identity_cert(size_t device,
- size_t publicdata_size, const uint8_t *publicdata)
+check_uuid_from_cert_raw(size_t publicdata_size, const uint8_t *publicdata,
+ const oc_uuid_t* uuid)
{
bool res = false;
- oc_string_t uuid;
- if (oc_certs_parse_CN_for_UUID_raw(publicdata, publicdata_size, &uuid) == 0) {
- oc_sec_doxm_t* doxm = oc_sec_get_doxm(device);
- if (doxm) {
- char duuid[OC_UUID_LEN];
- oc_uuid_to_str(&doxm->deviceuuid, duuid, OC_UUID_LEN);
- res = (memcmp(oc_string(uuid), duuid, OC_UUID_LEN) == 0);
+ if (!publicdata || !uuid) {
+ return false;
}
- oc_free_string(&uuid);
+
+ oc_string_t uuid_from_cert;
+ if (oc_certs_parse_CN_for_UUID_raw(publicdata, publicdata_size,
+ &uuid_from_cert) == 0) {
+ char uuid_str[OC_UUID_LEN];
+ oc_uuid_to_str(uuid, uuid_str, OC_UUID_LEN);
+ res = (memcmp(oc_string(uuid_from_cert), uuid_str, OC_UUID_LEN) == 0);
+ oc_free_string(&uuid_from_cert);
}
return res;
}
#endif
+static const oc_uuid_t *
+get_device_uuid(size_t device)
+{
+ oc_sec_doxm_t* doxm = oc_sec_get_doxm(device);
+ return doxm ? &doxm->deviceuuid : NULL;
+}
+
int
oc_sec_add_new_cred(size_t device, bool roles_resource, oc_tls_peer_t *client,
int credid, oc_sec_credtype_t credtype,
@@ -339,9 +348,6 @@ oc_sec_add_new_cred(size_t device, bool roles_resource, oc_tls_peer_t *client,
const char *role, const char *authority)
{
(void)publicdata_encoding;
- (void)publicdata_size;
- (void)publicdata;
- (void)roles_resource;
#ifdef OC_PKI
uint8_t public_key[OC_KEYPAIR_PUBKEY_SIZE] = { 0 };
@@ -358,6 +364,10 @@ oc_sec_add_new_cred(size_t device, bool roles_resource, oc_tls_peer_t *client,
if (memcmp(public_key, client->public_key, OC_KEYPAIR_PUBKEY_SIZE) != 0) {
return -1;
}
+ if (!check_uuid_from_cert_raw(publicdata_size + 1, publicdata,
+ &client->uuid)) {
+ return -1;
+ }
}
#endif /* OC_PKI */
@@ -389,8 +399,8 @@ oc_sec_add_new_cred(size_t device, bool roles_resource, oc_tls_peer_t *client,
if (memcmp(kp->public_key, public_key, OC_KEYPAIR_PUBKEY_SIZE) != 0) {
return -1;
}
- if (!check_device_uuid_from_identity_cert(device,
- publicdata_size + 1, publicdata)) {
+ if (!check_uuid_from_cert_raw(publicdata_size + 1, publicdata,
+ get_device_uuid(device))) {
return -1;
}
}
|
frdm-k64f; allow building without any of the UARTs enabled. | #include "hal/hal_flash_int.h"
#include "flash_map/flash_map.h"
#include "hal/hal_flash.h"
+#if MYNEWT_VAL(UART_0) || MYNEWT_VAL(UART_1) || MYNEWT_VAL(UART_2) || \
+ MYNEWT_VAL(UART_3) || MYNEWT_VAL(UART_4) || MYNEWT_VAL(UART_5)
#include "uart/uart.h"
#include "uart_hal/uart_hal.h"
#include "hal/hal_uart.h"
+#endif
#include "bsp/cmsis_nvic.h"
#include "mcu/frdm-k64f_hal.h"
#include "fsl_device_registers.h"
@@ -158,6 +161,7 @@ hal_bsp_init(void)
{
int rc = 0;
+ (void)rc;
// Init pinmux and other hardware setup.
init_hardware();
BOARD_BootClockRUN();
|
feat(venachain):Restore chain support options for main Makefile | @@ -7,13 +7,13 @@ BOAT_BUILD_DIR := $(BOAT_BASE_DIR)/build
# Set chain support
# Set to 1 to enable releated chain, to 0 to disable
BOAT_PROTOCOL_USE_ETHEREUM ?= 1
-BOAT_PROTOCOL_USE_PLATON ?= 0
-BOAT_PROTOCOL_USE_PLATONE ?= 0
-BOAT_PROTOCOL_USE_FISCOBCOS ?= 0
-BOAT_PROTOCOL_USE_HLFABRIC ?= 0
-BOAT_PROTOCOL_USE_HWBCS ?= 0
-BOAT_PROTOCOL_USE_CHAINMAKER ?= 0
-BOAT_DISCOVERY_PEER_QUERY ?= 0
+BOAT_PROTOCOL_USE_PLATON ?= 1
+BOAT_PROTOCOL_USE_PLATONE ?= 1
+BOAT_PROTOCOL_USE_FISCOBCOS ?= 1
+BOAT_PROTOCOL_USE_HLFABRIC ?= 1
+BOAT_PROTOCOL_USE_HWBCS ?= 1
+BOAT_PROTOCOL_USE_CHAINMAKER ?= 1
+BOAT_DISCOVERY_PEER_QUERY ?= 1
BOAT_PROTOCOL_USE_VENACHAIN ?= 1
# Chain config check
|
ll_dtm: add missing critical sections | @@ -384,7 +384,9 @@ ble_ll_dtm_rx_start(void)
#ifdef BLE_XCVR_RFCLK
if (ble_ll_xcvr_rfclk_state() == BLE_RFCLK_STATE_OFF) {
+ OS_ENTER_CRITICAL(sr);
ble_ll_xcvr_rfclk_start_now(os_cputime_get32());
+ OS_EXIT_CRITICAL(sr);
}
#endif
@@ -430,7 +432,9 @@ ble_ll_dtm_ctx_free(struct dtm_ctx * ctx)
ble_phy_disable_dtm();
ble_ll_state_set(BLE_LL_STATE_STANDBY);
#ifdef BLE_XCVR_RFCLK
+ OS_ENTER_CRITICAL(sr);
ble_ll_xcvr_rfclk_stop();
+ OS_EXIT_CRITICAL(sr);
#endif
os_mbuf_free_chain(ctx->om);
|
docs/library/bluetooth.rst: Fix typo in HR/UART services example. | @@ -214,7 +214,7 @@ writes from a central to a given characteristic, use
HR_UUID = bluetooth.UUID(0x180D)
HR_CHAR = (bluetooth.UUID(0x2A37), bluetooth.FLAG_READ | bluetooth.FLAG_NOTIFY,)
- HR_SERVICE = (HR_SERVICE, (HR_CHAR,),)
+ HR_SERVICE = (HR_UUID, (HR_CHAR,),)
UART_UUID = bluetooth.UUID('6E400001-B5A3-F393-E0A9-E50E24DCCA9E')
UART_TX = (bluetooth.UUID('6E400003-B5A3-F393-E0A9-E50E24DCCA9E'), bluetooth.FLAG_READ | bluetooth.FLAG_NOTIFY,)
UART_RX = (bluetooth.UUID('6E400002-B5A3-F393-E0A9-E50E24DCCA9E'), bluetooth.FLAG_WRITE,)
|
VirtualScroller: fix scrollbar positioning | @@ -136,11 +136,12 @@ export default class VirtualScroller<T> extends Component<VirtualScrollerProps<T
}
const { scrollTop, scrollHeight, offsetHeight } = this.window;
- const unloaded = (this.startOffset() / this.props.size);
+ const unloaded = (this.startOffset() / this.pageSize);
+ const totalpages = this.props.size / this.pageSize;
- const loadedCen = (scrollTop / scrollHeight);
- const loaded = (loadedCen / (this.pageSize / this.props.averageHeight));
- const result = (unloaded + loaded)*this.window.offsetHeight;
+ const loaded = (scrollTop / scrollHeight);
+ const total = unloaded + loaded;
+ const result = ((unloaded + loaded) / totalpages) *this.window.offsetHeight;
this.scrollRef.style[this.props.origin] = `${result}px`;
}, 50);
|
[bsp][amebaz] Update WIFI driver | @@ -91,10 +91,16 @@ int rthw_wifi_register(struct ameba_wifi *wifi)
if ((wifi->flag & WIFI_INIT_FLAG) == 0)
{
+ wlan = rt_malloc(sizeof(struct rt_wlan_device));
+ RT_ASSERT(wlan != RT_NULL);
if (wifi->type == WIFI_TYPE_STA)
- wlan = rt_wlan_dev_register(RT_WLAN_DEVICE_STA_NAME, &ops, 0, wifi);
+ {
+ rt_wlan_dev_register(wlan, RT_WLAN_DEVICE_STA_NAME, &ops, 0, wifi);
+ }
if (wifi->type == WIFI_TYPE_AP)
- wlan = rt_wlan_dev_register(RT_WLAN_DEVICE_AP_NAME, &ops, 0, wifi);
+ {
+ rt_wlan_dev_register(wlan, RT_WLAN_DEVICE_AP_NAME, &ops, 0, wifi);
+ }
wifi->flag |= WIFI_INIT_FLAG;
wifi->wlan = wlan;
LOG_D("F:%s L:%d wifi:0x%08x wlan:0x%08x\n", __FUNCTION__, __LINE__, wifi, wlan);
|
convert new witherspoon to dt helper | @@ -483,7 +483,7 @@ DECLARE_PLATFORM(witherspoon) = {
.exit = ipmi_wdt_final_reset,
.terminate = ipmi_terminate,
- .pci_get_slot_info = map_pci_dev_to_slot,
+ .pci_get_slot_info = dt_slot_get_slot_info,
};
DECLARE_PLATFORM(old_witherspoon) = {
|
Change the arguments list in ecma_builtin_array_reduce_from .
This change deletes two routine arguments and creates an argument list in their place.
JerryScript-DCO-1.0-Signed-off-by: Virag Orkenyi | @@ -2097,15 +2097,14 @@ ecma_builtin_array_prototype_object_filter (ecma_value_t arg1, /**< callbackfn *
* Returned value must be freed with ecma_free_value.
*/
static ecma_value_t
-ecma_builtin_array_reduce_from (ecma_value_t callbackfn, /**< routine's 1st argument */
- ecma_value_t initial_value, /**< routine's 2nd argument */
+ecma_builtin_array_reduce_from (const ecma_value_t args_p[], /**< routine's arguments */
ecma_length_t args_number, /**< arguments list length */
bool start_from_left, /**< whether the reduce starts from left or right */
ecma_object_t *obj_p, /**< array object */
uint32_t len) /**< array object's length */
{
/* 4. */
- if (!ecma_op_is_callable (callbackfn))
+ if (!ecma_op_is_callable (args_p[0]))
{
return ecma_raise_type_error (ECMA_ERR_MSG ("Callback function is not callable."));
}
@@ -2116,8 +2115,8 @@ ecma_builtin_array_reduce_from (ecma_value_t callbackfn, /**< routine's 1st argu
return ecma_raise_type_error (ECMA_ERR_MSG ("Reduce of empty array with no initial value."));
}
- JERRY_ASSERT (ecma_is_value_object (callbackfn));
- ecma_object_t *func_object_p = ecma_get_object_from_value (callbackfn);
+ JERRY_ASSERT (ecma_is_value_object (args_p[0]));
+ ecma_object_t *func_object_p = ecma_get_object_from_value (args_p[0]);
ecma_value_t accumulator = ECMA_VALUE_UNDEFINED;
@@ -2128,7 +2127,7 @@ ecma_builtin_array_reduce_from (ecma_value_t callbackfn, /**< routine's 1st argu
/* 7.a */
if (args_number > 1)
{
- accumulator = ecma_copy_value (initial_value);
+ accumulator = ecma_copy_value (args_p[1]);
}
else
{
@@ -2716,8 +2715,7 @@ ecma_builtin_array_prototype_dispatch_routine (uint16_t builtin_routine_id, /**<
case ECMA_ARRAY_PROTOTYPE_REDUCE:
case ECMA_ARRAY_PROTOTYPE_REDUCE_RIGHT:
{
- ret_value = ecma_builtin_array_reduce_from (routine_arg_1,
- routine_arg_2,
+ ret_value = ecma_builtin_array_reduce_from (arguments_list_p,
arguments_number,
builtin_routine_id == ECMA_ARRAY_PROTOTYPE_REDUCE,
obj_p,
|
Update missing flag in storage/posix test.
The storageNewItrP() permissions test was running twice with the errorOnMissing flag set to false. Fix by setting to true for one test.
Also update the comments to be clearer about what the tests are doing and fix minor formatting. | @@ -356,9 +356,12 @@ testRun(void)
TEST_RESULT_PTR(storageNewItrP(storageTest, STRDEF(BOGUS_STR), .nullOnMissing = true), NULL, "ignore missing dir");
#ifdef TEST_CONTAINER_REQUIRED
+ // -------------------------------------------------------------------------------------------------------------------------
+ TEST_TITLE("error on permission denied, regardless of errorOnMissing setting");
+
TEST_ERROR_FMT(
- storageNewItrP(storageTest, pathNoPerm), PathOpenError, STORAGE_ERROR_LIST_INFO ": [13] Permission denied",
- strZ(pathNoPerm));
+ storageNewItrP(storageTest, pathNoPerm, .errorOnMissing = true), PathOpenError,
+ STORAGE_ERROR_LIST_INFO ": [13] Permission denied", strZ(pathNoPerm));
// Should still error even when ignore missing
TEST_ERROR_FMT(
@@ -516,7 +519,7 @@ testRun(void)
#ifdef TEST_CONTAINER_REQUIRED
// -------------------------------------------------------------------------------------------------------------------------
- TEST_TITLE("error on missing, regardless of errorOnMissing setting");
+ TEST_TITLE("error on permission denied, regardless of errorOnMissing setting");
TEST_ERROR_FMT(
storageListP(storageTest, pathNoPerm, .errorOnMissing = true), PathOpenError,
@@ -524,8 +527,8 @@ testRun(void)
// Should still error even when ignore missing
TEST_ERROR_FMT(
- storageListP(storageTest, pathNoPerm), PathOpenError,
- STORAGE_ERROR_LIST_INFO ": [13] Permission denied", strZ(pathNoPerm));
+ storageListP(storageTest, pathNoPerm), PathOpenError, STORAGE_ERROR_LIST_INFO ": [13] Permission denied",
+ strZ(pathNoPerm));
#endif // TEST_CONTAINER_REQUIRED
// -------------------------------------------------------------------------------------------------------------------------
|
Disables path monitoring until I properly fix it | @@ -23,8 +23,8 @@ protoop_arg_t path_manager(picoquic_cnx_t* cnx) {
return 0;
}
+#ifdef PATH_MONITORING
uint64_t now = picoquic_current_time();
-
for (int i = 0; i < bpfd->nb_proposed; i++) {
pd = bpfd->paths[i];
if (pd->state == path_active) {
@@ -81,6 +81,7 @@ protoop_arg_t path_manager(picoquic_cnx_t* cnx) {
reserve_path_update(cnx, pd->path_id, 0);
}
}
+#endif
if (bpfd->nb_active >= N_PATHS) {
return 0;
|
Remove extra function on some installs. | # Defaults
#
+###START###
+
+# Overriden on some installs.
(def- exe-dir
"Directory containing jpm script"
(do
(def i (last (string/find-all sep exe)))
(slice exe 0 i)))
-###START###
-# Overriden on some installs.
(def- install-paths
{:headerpath (os/realpath (string exe-dir "/../include/janet"))
:libpath (os/realpath (string exe-dir "/../lib"))
:binpath exe-dir})
+
###END###
# Default based on janet binary location
|
Larger sprite preview in SpriteSheetSelectButton | @@ -79,9 +79,9 @@ const Button = styled.button`
}
canvas {
- max-width: 48px;
- max-height: 48px;
- image-rendering: pixelated;
+ height: 48px;
+ width: 48px;
+ object-fit: contain;
}
`;
|
Onboard Linux Release tests to AZP for comparison | @@ -539,13 +539,14 @@ stages:
- template: ./templates/post-process-performance.yml
#
-# Windows Release BVTs
+# Release BVTs
#
-- stage: test_bvt_windows_release
- displayName: BVT Windows Release
+- stage: test_bvt_release
+ displayName: BVT Release
dependsOn:
- build_windows_release
+ - build_linux_release
jobs:
- template: ./templates/run-bvt.yml
parameters:
@@ -563,6 +564,13 @@ stages:
logProfile: Full.Light
config: Release
extraArgs: -SkipUnitTests -EnableTcpipVerifier
+ - template: ./templates/run-bvt.yml
+ parameters:
+ image: ubuntu-latest
+ platform: linux
+ tls: openssl
+ config: Release
+ extraArgs: -Filter -*CredValidation*
- stage: test_bvt_winkernel_release
displayName: BVT Windows Kernel Release
|
[chainmaker][#436]add tests test_03Contract_00010QueryFailureContractNull | @@ -241,6 +241,22 @@ START_TEST(test_03Contract_0009QueryFailureMethodNull)
}
END_TEST
+
+START_TEST(test_03Contract_00010QueryFailureContractNull)
+{
+ BOAT_RESULT result;
+ BoatHlchainmakerTx tx_ptr;
+ BoatInvokeReponse invoke_reponse;
+
+ result = test_contrct_invoke_prepara(&tx_ptr);
+ ck_assert_int_eq(result, BOAT_SUCCESS);
+
+ result = BoatHlchainmakerContractInvoke(&tx_ptr, "save", NULL, true, &invoke_reponse); ;
+ ck_assert(result == BOAT_ERROR_INVALID_ARGUMENT);
+}
+END_TEST
+
+
Suite *make_contract_suite(void)
{
/* Create Suite */
@@ -262,6 +278,8 @@ Suite *make_contract_suite(void)
tcase_add_test(tc_contract_api, test_03Contract_0008QueryFailureTxNull);
tcase_add_test(tc_contract_api, test_03Contract_0009QueryFailureMethodNull);
+ tcase_add_test(tc_contract_api, test_03Contract_00010QueryFailureContractNull);
+
return s_contract;
}
|
Update xmake.lua
Supports Ampere architecture. | @@ -43,8 +43,8 @@ rule("cuda.gencodes")
-- sm_20 and compute_20 is supported until CUDA 8
-- sm_30 and compute_30 is supported until CUDA 10
- local known_v_archs = hashset.of(20, 30, 32, 35, 37, 50, 52, 53, 60, 61, 62, 70, 72, 75, 80)
- local known_r_archs = hashset.of(20, 30, 32, 35, 37, 50, 52, 53, 60, 61, 62, 70, 72, 75, 80)
+ local known_v_archs = hashset.of(20, 30, 32, 35, 37, 50, 52, 53, 60, 61, 62, 70, 72, 75, 80, 86, 87)
+ local known_r_archs = hashset.of(20, 30, 32, 35, 37, 50, 52, 53, 60, 61, 62, 70, 72, 75, 80, 86, 87)
local function nf_cugencode(archs)
if type(archs) ~= "string" then
|
Travis: if "make update" created a diff, please show it | @@ -168,7 +168,7 @@ script:
else
echo -e '+\057 MAKE UPDATE FAILED'; false;
fi;
- git diff --quiet
+ git diff --exit-code
- if [ -n "$CHECKDOCS" ]; then
if $make doc-nits; then
echo -e '+\057\057 MAKE DOC-NITS OK';
|
turned off the selection test | {"category":"databases","file":"exodus.py","cases":["exodus_13a","exodus_13b"]},
{"category":"databases","file":"chgcar.py","cases":["chgcar_01"]},
{"category":"hybrid","file":"selections.py"},
+ {"category":"hybrid","file":"selections_pp.py"},
{"category":"databases","file":"diff.py"},
{"category":"databases","file":"silo.py","cases":["silo_05","silo_06"]},
{"category":"databases","file":"silo_altdriver.py","cases":["silo_05","silo_06"]},
{"category":"databases","file":"exodus.py","cases":["exodus_13a","exodus_13b"]},
{"category":"databases","file":"chgcar.py","cases":["chgcar_01"]},
{"category":"hybrid","file":"selections.py"},
+ {"category":"hybrid","file":"selections_pp.py"},
{"category":"databases","file":"diff.py"},
{"category":"databases","file":"zipwrapper.py"},
{"category":"databases","file":"pixie.py","cases":["pixie_04"]},
{"category":"databases","file": "pixie.py","cases":["pixie_04"]},
{"category":"database","file": "silo.py","cases":["silo_04","silo_05"]},
{"category":"hybrid","file":"selections.py"},
+ {"category":"hybrid","file":"selections_pp.py"},
{"category":"databases","file":"diff.py"},
{"category":"databases","file":"silo.py","cases":["silo_05","silo_06"]},
{"category":"databases","file":"silo_altdriver.py","cases":["silo_05","silo_06"]},
|
tools/Win.mk
fix shell conditional | @@ -123,7 +123,7 @@ MKEXPORT_ARGS += -u
endif
ifneq ($(APPDIR),)
-ifneq ($(shell [ -e $(APPDIR)/Makefile ] && echo yes),)
+ifneq ($(shell if exist "$(APPDIR)/Makefile" echo yes),)
MKEXPORT_ARGS += -a "$(APPDIR)"
MKEXPORT_ARGS += -m "$(MAKE)"
endif
|
json: fix escaping. Treat invalid UTF bytes as binary, leave valid UTF8 intact. | @@ -458,6 +458,37 @@ CJSONEntry CJSONEntry::getEntry(const char* name) const
return quoteValue( rho::common::convertToStringA(strValue) );
}
+
+//return size of UTF char ( 2,3,4 ) or 0 for invalid char
+static inline int isValidUTF8Sequence( const char* p, int maxLen )
+{
+ if ( maxLen > 4 ) {
+ maxLen = 4;
+ }
+
+ int expectedLen = 0;
+ const char c = *p;
+
+ //determine sequence length from first char
+ //11110xxx = 4, 1110xxxx = 3, 110xxxxx = 2, treat 1-byte UTF as invalid
+ if ( (c&0xF8)==0xF0 ) {
+ expectedLen = 4;
+ } else if ( (c&0xF0)==0xE0) {
+ expectedLen = 3;
+ } else if ( (c&0xE0)==0xC0) {
+ expectedLen = 2;
+ }
+
+ //no breaks here is intentional. Check rest bytes in sequence for valid mask: 10xxxxxx.
+ switch(expectedLen) {
+ case 4: if ((p[3]&0xC0)!=0x80) return 0;
+ case 3: if ((p[2]&0xC0)!=0x80) return 0;
+ case 2: if ((p[1]&0xC0)!=0x80) return 0;
+ }
+
+ return expectedLen;
+}
+
/*static*/ String CJSONEntry::quoteValue(const String& strValue)
{
// string for symbols
@@ -497,9 +528,15 @@ CJSONEntry CJSONEntry::getEntry(const char* name) const
break;
}
} else if ( c >= 0x80 ) {
- char buf[5];
- sprintf( buf, "\\x%02x", (int)c );
- sym += buf;
+ const char* pStr = &(strValue.c_str()[pos]);
+ int utfChars = isValidUTF8Sequence(pStr, len-pos);
+ if (utfChars > 1) { //valid 2-3-4 byte UTF8 sequence
+ pos += (utfChars-1); //shift position
+ } else { //assume a binary value, escape as byte
+ sym = "\\u00";
+ sym += json_hex_chars[c >> 4];
+ sym += json_hex_chars[c & 0xf];
+ }
}
else {
switch (c) {
|
Fix for svnversion build | @@ -672,12 +672,13 @@ class Build(object):
def find_svn():
for i in range(0, 3):
for path in (['.svn', 'wc.db'], ['.svn', 'entries'], ['.git', 'HEAD']):
- path_parts = [self.arcadia.root] + [os.pardir] * i + path
- full_path = os.path.join(*path_parts)
+ path_parts = [os.pardir] * i + path
+ full_path = os.path.join(self.arcadia.root, *path_parts)
# HACK(somov): No "normpath" here. ymake fails with the "source file name is outside the build tree" error
# when .svn/wc.db found in "trunk" instead of "arcadia". But $ARCADIA_ROOT/../.svn/wc.db is ok.
if os.path.exists(full_path):
- return '${input;hide:"%s"}' % full_path
+ out_path = os.path.join('${ARCADIA_ROOT}', *path_parts)
+ return '${input;hide:"%s"}' % out_path
return ''
emit('SVN_DEPENDS', find_svn())
|
VERSION bump to version 2.2.2 | @@ -64,7 +64,7 @@ endif()
# micro version is changed with a set of small changes or bugfixes anywhere in the project.
set(SYSREPO_MAJOR_VERSION 2)
set(SYSREPO_MINOR_VERSION 2)
-set(SYSREPO_MICRO_VERSION 1)
+set(SYSREPO_MICRO_VERSION 2)
set(SYSREPO_VERSION ${SYSREPO_MAJOR_VERSION}.${SYSREPO_MINOR_VERSION}.${SYSREPO_MICRO_VERSION})
# Version of the library
|
smoke tests: exit with appropriate status | @@ -6,8 +6,6 @@ set -o pipefail
CMD=${0##*/}
-export STOP_ON_TEST_FAIL=0
-export KEEP_KVDB=0
export VERBOSE=1
# set for each test
@@ -29,6 +27,9 @@ test_script_options=
test_list=()
test_args=()
show_test_names=1
+stop_on_test_fail=0
+keep_kvdb=0
+test_fail_count=0
exported_functions+=(err)
@@ -298,12 +299,13 @@ run_one_test () {
if (( test_failed )); then
touch $LOG_DIR/stat.failed
- if (( STOP_ON_TEST_FAIL )); then
+ (( test_fail_count++ ))
+ if (( stop_on_test_fail )); then
err "TEST FAILED"
fi
fi
- if (( ! KEEP_KVDB )); then
+ if (( ! keep_kvdb )); then
destroy_all_kvs
fi
@@ -480,9 +482,9 @@ while getopts ":C:d:ghklLm:m:rsvV:x" option; do
(r) action=show_report;;
(d) LOG_TOPDIR=$OPTARG;;
- (k) KEEP_KVDB=1;;
+ (k) keep_kvdb=1;;
(m) mpool=$OPTARG;;
- (s) STOP_ON_TEST_FAIL=1;;
+ (s) stop_on_test_fail=1;;
(v) (( VERBOSE++ ));;
(V) (( VERBOSE=OPTARG )); [[ "$VERBOSE" =~ ^[0-9]+$ ]] || err "Invalid verbosity value: $OPTARG";;
(x) test_script_options="-x";;
@@ -591,4 +593,8 @@ for ((i = 0; i < count; i++)); do
run_one_test $i $count "$script"
done
+if (( test_fail_count > 0 )); then
+ exit 1
+fi
+
exit 0
|
Remove CodeQL section from DVL logs for Windows Server 2012 | @@ -68,5 +68,5 @@ exit /B 1
:process_xml
echo creating "%~dpn1-compat%~x1"
-findstr /v /c:"General.Checksum" "%~1" > "%~dpn1-compat%~x1"
+findstr /v /c:"General.Checksum" "%~1" | findstr /v /c:".Semmle." > "%~dpn1-compat%~x1"
goto :eof
|
fix(ci): set Ubuntu version for MicroPython test | @@ -8,7 +8,7 @@ jobs:
build:
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
name: Build ${{ matrix.port }} port
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
continue-on-error: true
strategy:
matrix:
|
sse2: fix _mm_stream_si64 GCC < 5.3
I broke it in Oops. | @@ -3426,9 +3426,9 @@ SIMDE__FUNCTION_ATTRIBUTES
void
simde_mm_stream_si64 (int64_t* mem_addr, int64_t a) {
#if defined(SIMDE_SSE2_NATIVE) && defined(SIMDE_ARCH_AMD64)
- #if defined(HEDLEY_GCC_VERSION)
+ #if HEDLEY_GCC_VERSION_CHECK(5,3,0) // https://github.com/gcc-mirror/gcc/commit/821b85a2a0869b5128bd67e192a5a97748cbd90d
_mm_stream_si64((long long*) mem_addr, a);
- #elif !defined(HEDLEY_PGI_VERSION)
+ #elif !defined(HEDLEY_PGI_VERSION) && !defined(HEDLEY_GCC_VERSION)
_mm_stream_si64(mem_addr, a);
#else
*mem_addr = a;
|
i2s: fixed tdm mclk doubled issue
Closes: | @@ -40,14 +40,12 @@ static esp_err_t i2s_tdm_calculate_clock(i2s_chan_handle_t handle, const i2s_tdm
clk_info->bclk = rate * handle->total_slot * slot_bits;
clk_info->mclk = rate * clk_cfg->mclk_multiple;
clk_info->bclk_div = clk_info->mclk / clk_info->bclk;
- /* While RECEIVING multiple slots, the data will go wrong if the bclk_div is euqal or smaller than 2 */
- do {
- clk_info->mclk *= 2;
- clk_info->bclk_div = clk_info->mclk / clk_info->bclk;
+ /* While RECEIVING multiple slots, the data will go wrong if the bclk_div is equal or smaller than 2 */
if (clk_info->bclk_div <= 2) {
+ clk_info->bclk_div = 3;
+ clk_info->mclk = clk_info->bclk * clk_info->bclk_div;
ESP_LOGW(TAG, "the current mclk multiple is too small, adjust the mclk multiple to %"PRIu32, clk_info->mclk / rate);
}
- } while (clk_info->bclk_div <= 2);
} else {
if (clk_cfg->bclk_div < 8) {
ESP_LOGW(TAG, "the current bclk division is too small, adjust the bclk division to 8");
|
compile modules in topological order | @@ -67,31 +67,44 @@ local function mods2so(mods)
return sos
end
-local sources = { }
-
local generated_code, deps = coder.generate(args.modname, ast)
-table.insert(sources, { source = args.output, deps = mods2so(deps) })
generated_code = pretty.reindent_c(generated_code)
ok, errmsg = util.set_file_contents(args.output, generated_code)
if not ok then exit(errmsg) end
-for name, mod in pairs(checker.imported) do
- if name ~= args.modname then
+local CC = os.getenv("CC") or "gcc"
+local CFLAGS = os.getenv("CFLAGS") or "--std=c99 -O2 -Wall"
+
+local function compile_module(name)
+ if not checker.imported[name].compiled then
+ local mod = checker.imported[name]
local code, deps = coder.generate(name, mod.ast)
code = pretty.reindent_c(code)
local filename = mod.filename:gsub("[.]titan$", "") .. ".c"
- ok, errmsg = util.set_file_contents(filename, code)
- if not ok then exit(errmsg) end
- table.insert(sources, { source = filename, deps = mods2so(deps) })
+ local ok, err = util.set_file_contents(filename, code)
+ if not ok then return exit(err) end
+ for i = 1, #deps do
+ compile_module(deps[i])
+ deps[i] = mods2so(deps[i])
+ end
+ local soname = filename:gsub("[.]c$", ".so")
+ local cc_cmd = string.format([[
+ %s %s -I%s -fPIC -shared %s %s -o %s
+ ]], CC, CFLAGS, args.lua, filename, table.concat(deps, " "), soname)
+ --print(cc_cmd)
+ local ok, err = os.execute(cc_cmd)
+ if not ok then return exit(err) end
+ checker.imported[name].compiled = true
end
end
-local CC = os.getenv("CC") or "gcc"
-local CFLAGS = os.getenv("CFLAGS") or "--std=c99 -O2 -Wall"
+for name, _ in pairs(checker.imported) do
+ if name ~= args.modname then
+ compile_module(name)
+ end
+end
-for _, source in ipairs(sources) do
- local soname = source.source:gsub("[.]c$", ".so")
+local soname = args.output:gsub("[.]c$", ".so")
os.execute(string.format([[
%s %s -I%s -fPIC -shared %s %s -o %s
-]], CC, CFLAGS, args.lua, source.source, table.concat(source.deps, " "), soname))
-end
+]], CC, CFLAGS, args.lua, args.output, table.concat(mods2so(deps), " "), soname))
|
storage: use new cio_load() prototype | @@ -521,7 +521,7 @@ int flb_storage_create(struct flb_config *ctx)
cio_set_max_chunks_up(ctx->cio, ctx->storage_max_chunks_up);
/* Load content from the file system if any */
- ret = cio_load(ctx->cio);
+ ret = cio_load(ctx->cio, NULL);
if (ret == -1) {
flb_error("[storage] error scanning root path content: %s",
ctx->storage_path);
|
options/elf: add Elf32_auxv_t | #include <stdint.h>
#include <bits/inline-definition.h>
+#include <abi-bits/auxv.h>
// TODO: Convert the enums to #defines so that they work with #ifdef.
@@ -413,6 +414,13 @@ typedef struct {
} a_un;
} Elf64_auxv_t;
+typedef struct {
+ uint32_t a_type;
+ union {
+ uint32_t a_val;
+ } a_un;
+} Elf32_auxv_t;
+
typedef struct {
Elf32_Word n_namesz;
Elf32_Word n_descsz;
|
show event: allow command to run when no PMM on system
Cannot target PMM in this case | @@ -99,11 +99,14 @@ ShowEvent(
// Populate the list of DIMM_INFO structures with relevant information
ReturnCode = GetDimmList(pNvmDimmConfigProtocol, DIMM_INFO_CATEGORY_NONE, &pDimms, &DimmCount);
if (EFI_ERROR(ReturnCode)) {
+ // Allow show event to run even if there are no DIMMs
+ if (ReturnCode != EFI_NOT_FOUND) {
goto Finish;
}
+ }
// check targets
- if (ContainTarget(pCmd, DIMM_TARGET)) {
+ if ((ContainTarget(pCmd, DIMM_TARGET) && (DimmCount > 0))) {
pTargetValue = GetTargetValue(pCmd, DIMM_TARGET);
ReturnCode = GetDimmUidFromString(pTargetValue, pDimms, DimmCount, DimmUid);
if (EFI_ERROR(ReturnCode)) {
|
test: add ethereum test case
test_005ParametersSet_0005SetValueFailureNullTx | @@ -364,6 +364,27 @@ START_TEST(test_005ParametersSet_0004SetValueSuccess)
}
END_TEST
+START_TEST(test_005ParametersSet_0005SetValueFailureNullTx)
+{
+ BSINT32 rtnVal;
+ BoatEthTx tx_ptr;
+ rtnVal = ethereumWalletPrepare();
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+
+ rtnVal = BoatEthTxInit(g_ethereum_wallet_ptr, &tx_ptr, TEST_IS_SYNC_TX, TEST_GAS_PRICE,
+ TEST_GAS_LIMIT, TEST_RECIPIENT_ADDRESS);
+ ck_assert(rtnVal == BOAT_SUCCESS);
+
+ BoatFieldMax32B value;
+ value.field_len = UtilityHexToBin(value.field, 32, "0x2386F26FC10000",
+ TRIMBIN_LEFTTRIM, BOAT_TRUE);
+ rtnVal = BoatEthTxSetValue(NULL, &value);
+ ck_assert(rtnVal == BOAT_ERROR_COMMON_INVALID_ARGUMENT);
+
+ BoatIotSdkDeInit();
+}
+END_TEST
+
Suite *make_parameters_suite(void)
{
/* Create Suite */
@@ -391,6 +412,7 @@ Suite *make_parameters_suite(void)
tcase_add_test(tc_param_api, test_005ParametersSet_0002SetNonceSuccess);
tcase_add_test(tc_param_api, test_005ParametersSet_0003SetNonceFailureNullTx);
tcase_add_test(tc_param_api, test_005ParametersSet_0004SetValueSuccess);
+ tcase_add_test(tc_param_api, test_005ParametersSet_0005SetValueFailureNullTx);
return s_param;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.