message
stringlengths
6
474
diff
stringlengths
8
5.22k
test UPDATE flags fix
@@ -5716,17 +5716,6 @@ cache_diff_change_cb(sr_session_ctx_t *session, uint32_t sub_id, const char *mod ret = sr_get_change_next(session, iter, &op, &old_val, &new_val); assert_int_equal(ret, SR_ERR_OK); - assert_int_equal(op, SR_OP_CREATED); - assert_null(old_val); - assert_non_null(new_val); - assert_string_equal(new_val->xpath, "/ietf-interfaces:interfaces"); - - sr_free_val(new_val); - - /* 2nd change */ - ret = sr_get_change_next(session, iter, &op, &old_val, &new_val); - assert_int_equal(ret, SR_ERR_OK); - assert_int_equal(op, SR_OP_CREATED); assert_null(old_val); assert_non_null(new_val); @@ -5734,7 +5723,7 @@ cache_diff_change_cb(sr_session_ctx_t *session, uint32_t sub_id, const char *mod sr_free_val(new_val); - /* 3rd change */ + /* 2nd change */ ret = sr_get_change_next(session, iter, &op, &old_val, &new_val); assert_int_equal(ret, SR_ERR_OK); @@ -5745,7 +5734,7 @@ cache_diff_change_cb(sr_session_ctx_t *session, uint32_t sub_id, const char *mod sr_free_val(new_val); - /* 4th change */ + /* 3rd change */ ret = sr_get_change_next(session, iter, &op, &old_val, &new_val); assert_int_equal(ret, SR_ERR_OK); @@ -5756,7 +5745,7 @@ cache_diff_change_cb(sr_session_ctx_t *session, uint32_t sub_id, const char *mod sr_free_val(new_val); - /* 5th change */ + /* 4th change */ ret = sr_get_change_next(session, iter, &op, &old_val, &new_val); assert_int_equal(ret, SR_ERR_OK); @@ -5767,7 +5756,7 @@ cache_diff_change_cb(sr_session_ctx_t *session, uint32_t sub_id, const char *mod sr_free_val(new_val); - /* 6th change */ + /* 5th change */ ret = sr_get_change_next(session, iter, &op, &old_val, &new_val); assert_int_equal(ret, SR_ERR_OK); @@ -5778,7 +5767,7 @@ cache_diff_change_cb(sr_session_ctx_t *session, uint32_t sub_id, const char *mod sr_free_val(new_val); - /* 7th change */ + /* 6th change */ ret = sr_get_change_next(session, iter, &op, &old_val, &new_val); assert_int_equal(ret, SR_ERR_OK); @@ -5789,7 +5778,7 @@ cache_diff_change_cb(sr_session_ctx_t *session, uint32_t sub_id, const char *mod sr_free_val(new_val); - /* 8th change */ + /* 7th change */ ret = sr_get_change_next(session, iter, &op, &old_val, &new_val); assert_int_equal(ret, SR_ERR_OK);
improve to generate cmake
@@ -144,6 +144,9 @@ function _add_target_sources(cmakelists, target) for _, sourcefile in ipairs(target:sourcefiles()) do cmakelists:print(" " .. _get_unix_path(sourcefile)) end + for _, headerfile in ipairs(target:headerfiles()) do + cmakelists:print(" " .. _get_unix_path(headerfile)) + end cmakelists:print(")") end
btc: copy truncated address
@@ -19,13 +19,14 @@ export default class Balance extends Component { this.state = { sending: false, - copied: false, + copiedButton: false, + copiedString: false, } this.copyAddress = this.copyAddress.bind(this); } - copyAddress() { + copyAddress(arg) { let address = this.props.state.address; function listener(e) { e.clipboardData.setData('text/plain', address); @@ -37,10 +38,14 @@ export default class Balance extends Component { document.removeEventListener('copy', listener); this.props.api.btcWalletCommand({'gen-new-address': null}); - this.setState({copied: true}); - setTimeout(() => { - this.setState({copied: false}); - }, 2000); + + if (arg === 'button'){ + this.setState({copiedButton: true}); + setTimeout(() => { this.setState({copiedButton: false}); }, 2000); + } else if (arg === 'string') { + this.setState({copiedString: true}); + setTimeout(() => { this.setState({copiedString: false}); }, 2000); + } } @@ -89,7 +94,10 @@ export default class Balance extends Component { > <Row justifyContent="space-between"> <Text color="orange" fontSize={1}>Balance</Text> - <Text color="lightGray" fontSize="14px" mono>{addressText}</Text> + <Text color="lightGray" fontSize="14px" mono style={{cursor: "pointer"}} + onClick={() => {this.copyAddress('string')}}> + {this.state.copiedString ? "copied" : addressText} + </Text> <CurrencyPicker denomination={denomination} currencies={this.props.state.currencyRates} @@ -113,19 +121,19 @@ export default class Balance extends Component { px="24px" onClick={() => this.setState({sending: true})} /> - <Button children={(this.state.copied) ? "Address Copied!" : "Copy Address"} + <Button children={(this.state.copiedButton) ? "Address Copied!" : "Copy Address"} mr={3} - disabled={this.state.copied} + disabled={this.state.copiedButton} fontSize={1} fontWeight="bold" - color={(this.state.copied) ? "green" : "orange"} - backgroundColor={(this.state.copied) ? "veryLightGreen" : "midOrange" } - style={{cursor: (this.state.copied) ? "default" : "pointer"}} + color={(this.state.copiedButton) ? "green" : "orange"} + backgroundColor={(this.state.copiedButton) ? "veryLightGreen" : "midOrange" } + style={{cursor: (this.state.copiedButton) ? "default" : "pointer"}} borderColor="none" borderRadius="24px" py="24px" px="24px" - onClick={this.copyAddress} + onClick={() => {this.copyAddress('button')}} /> </Row> </Col>
docs - when to set *_collapse_limit gucs to a smaller value
@@ -249,6 +249,14 @@ Gather Motion 2:1 (slice1; segments: 2) (cost=0.00..20.88 rows=1 width=13) adjust <codeph>enable_&lt;operator&gt; </codeph>parameters to see if you can force the Postgres Planner to choose a different plan by disabling a particular query plan operator for that query.</li> + <li id="in1825305"><b>Does the query planning time exceed query execution time?</b> + When the query involves many table joins, the Postgres Planner uses a dynamic + algorithm to plan the query that is in part based on the number of table joins. You + can reduce the amount of time that the Postgres Planner spends planning the query + by setting the <codeph>join_collapse_limit</codeph> and + <codeph>from_collapse_limit</codeph> server configuration parameters to a smaller + value, such as <codeph>8</codeph>. Note that while smaller values reduce planning + time, they may also yield inferior query plans.</li> <li id="in182538"><b>Are the optimizer's estimates close to reality?</b> Run <codeph>EXPLAIN ANALYZE</codeph> and see if the number of rows the optimizer estimates is close to the number of rows the query operation actually returns. If there is a large discrepancy,
Let example/convert-to-nia handle I/O redirects
@@ -239,7 +239,11 @@ load_image_type() { } TRY(read_more_src()); } + return NULL; +} +const char* // +initialize_image_decoder() { wuffs_base__status status; switch (g_fourcc) { case WUFFS_BASE__FOURCC__BMP: @@ -285,14 +289,63 @@ load_image_type() { return "main: unsupported file format"; } +const char* // +advance_for_redirect() { + wuffs_base__io_buffer empty = wuffs_base__empty_io_buffer(); + wuffs_base__more_information minfo = wuffs_base__empty_more_information(); + wuffs_base__status status = wuffs_base__image_decoder__tell_me_more( + g_image_decoder, &empty, &minfo, &g_src); + if (status.repr != NULL) { + return wuffs_base__status__message(&status); + } else if (minfo.flavor != + WUFFS_BASE__MORE_INFORMATION__FLAVOR__IO_REDIRECT) { + return "main: unsupported file format"; + } + g_fourcc = + (int32_t)(wuffs_base__more_information__io_redirect__fourcc(&minfo)); + if (g_fourcc <= 0) { + return "main: unsupported file format"; + } + + // Advance g_src's reader_position to pos. + uint64_t pos = + wuffs_base__more_information__io_redirect__range(&minfo).min_incl; + if (pos < wuffs_base__io_buffer__reader_position(&g_src)) { + // Redirects must go forward. + return "main: unsupported file format"; + } + while (true) { + uint64_t relative_pos = + pos - wuffs_base__io_buffer__reader_position(&g_src); + if (relative_pos <= (g_src.meta.wi - g_src.meta.ri)) { + g_src.meta.ri += relative_pos; + break; + } + g_src.meta.ri = g_src.meta.wi; + TRY(read_more_src()); + } + return NULL; +} + const char* // load_image_config() { + bool redirected = false; +redirect: + TRY(initialize_image_decoder()); + // Decode the wuffs_base__image_config. while (true) { wuffs_base__status status = wuffs_base__image_decoder__decode_image_config( g_image_decoder, &g_image_config, &g_src); if (status.repr == NULL) { break; + } else if (status.repr == wuffs_base__note__i_o_redirect) { + if (redirected) { + return "main: unsupported file format"; + } + redirected = true; + TRY(advance_for_redirect()); + goto redirect; } else if (status.repr != wuffs_base__suspension__short_read) { return wuffs_base__status__message(&status); }
Fix test/recipes/95-test_external_krb5.t "skip() needs to know $how_many tests are in the block"
@@ -16,7 +16,7 @@ setup("test_external_krb5"); plan tests => 1; SKIP: { - skip "No external tests in this configuration" + skip "No external tests in this configuration", 1 if disabled("external-tests"); skip "krb5 not available", 1 if ! -f srctop_file("krb5", "README");
refactor(Warning): resolve "Warning(api_hw_bcs.c) : unused variable 'status' "
@@ -507,7 +507,10 @@ BOAT_RESULT BoatHwbcsTxInit(BoatHwbcsTx *tx_ptr, mbedtls_x509_crt m_certificate; mbedtls_x509_crt_init(&m_certificate); uint32_t status = mbedtls_x509_crt_parse(&m_certificate, (const unsigned char *)tx_ptr->wallet_ptr->account_info.cert.field_ptr, tx_ptr->wallet_ptr->account_info.cert.field_len); - + if(status != 0){ + BoatLog(BOAT_LOG_CRITICAL, "certificate parse failed."); + boat_throw(BOAT_ERROR, BoatHlfabricTxInit_exception); + } const mbedtls_x509_name *name = &m_certificate.subject; char value[64]; size_t value_len;
esp_netif tests: Add manual DHCP state transision tests Extended test cases for DHCP server and DHCP client state transitions to include also manual transitions using esp_netif_dhcps_start/stop() esp_netif_dhcpc_start/stop()
@@ -84,8 +84,20 @@ TEST_CASE("esp_netif: test dhcp client state transitions for wifi station", "[es TEST_ASSERT_EQUAL(ESP_NETIF_DHCP_INIT, state); esp_netif_action_connected(sta, NULL, 0, NULL); TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcpc_get_status(sta, &state)); + TEST_ASSERT_EQUAL(ESP_NETIF_DHCP_STARTED, state); + // test manual DHCP state transitions using dhcpc-start/stop API + TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcpc_stop(sta)); + TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcpc_get_status(sta, &state)); + TEST_ASSERT_EQUAL(ESP_NETIF_DHCP_STOPPED, state); + TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcpc_start(sta)); + TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcpc_get_status(sta, &state)); TEST_ASSERT_EQUAL(ESP_NETIF_DHCP_STARTED, state); + TEST_ASSERT_EQUAL(ESP_ERR_ESP_NETIF_DHCP_ALREADY_STARTED, esp_netif_dhcpc_start(sta)); + TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcpc_get_status(sta, &state)); + TEST_ASSERT_EQUAL(ESP_NETIF_DHCP_STARTED, state); + + // stop the netif and test dhcp state update esp_netif_action_stop(sta, NULL, 0, NULL); TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcpc_get_status(sta, &state)); @@ -117,6 +129,18 @@ TEST_CASE("esp_netif: test dhcp server state transitions for wifi soft AP", "[es TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcps_get_status(ap, &state)); TEST_ASSERT_EQUAL(ESP_NETIF_DHCP_STARTED, state); + // test manual DHCP state transitions using dhcps-start/stop API + TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcps_stop(ap)); + TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcps_get_status(ap, &state)); + TEST_ASSERT_EQUAL(ESP_NETIF_DHCP_STOPPED, state); + TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcps_start(ap)); + TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcps_get_status(ap, &state)); + TEST_ASSERT_EQUAL(ESP_NETIF_DHCP_STARTED, state); + TEST_ASSERT_EQUAL(ESP_ERR_ESP_NETIF_DHCP_ALREADY_STARTED, esp_netif_dhcps_start(ap)); + TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcps_get_status(ap, &state)); + TEST_ASSERT_EQUAL(ESP_NETIF_DHCP_STARTED, state); + + // stop the netif and test dhcp state update esp_netif_action_stop(ap, NULL, 0, NULL); TEST_ASSERT_EQUAL(ESP_OK, esp_netif_dhcps_get_status(ap, &state)); TEST_ASSERT_EQUAL(ESP_NETIF_DHCP_INIT, state);
BugID:17420256:set PK DN DS to adapt new MQTT APIs
@@ -61,6 +61,9 @@ static void handle_ota_cmd(char *buf, int blen, int argc, char **argv) strncpy(ctx.dn, argv[2], sizeof(ctx.dn)-1); strncpy(ctx.ds, argv[3], sizeof(ctx.ds)-1); strncpy(ctx.ps, argv[4], sizeof(ctx.ps)-1); + HAL_SetProductKey(ctx.pk); + HAL_SetDeviceName(ctx.dn); + HAL_SetDeviceSecret(ctx.ds); HAL_SetProductSecret(ctx.ps); ctx.trans_protcol = 0; ctx.dl_protcol = 3;
sve/add: switch some _x implementations to use _x instead of _z
@@ -38,7 +38,7 @@ SIMDE_FUNCTION_ATTRIBUTES simde_svint8_t simde_svadd_s8_x(simde_svbool_t pg, simde_svint8_t op1, simde_svint8_t op2) { #if defined(SIMDE_ARM_SVE_NATIVE) - return svadd_s8_z(pg, op1, op2); + return svadd_s8_x(pg, op1, op2); #else simde_svint8_t r; HEDLEY_STATIC_CAST(void, pg); @@ -112,7 +112,7 @@ SIMDE_FUNCTION_ATTRIBUTES simde_svint8_t simde_svadd_n_s8_x(simde_svbool_t pg, simde_svint8_t op1, int8_t op2) { #if defined(SIMDE_ARM_SVE_NATIVE) - return svadd_n_s8_z(pg, op1, op2); + return svadd_n_s8_x(pg, op1, op2); #else return simde_svadd_s8_x(pg, op1, simde_svdup_n_s8(op2)); #endif
Poll not manufacturer name (yet, todo own resource item)
@@ -301,7 +301,7 @@ void PollManager::pollTimerFired() if (item && (item->toString().isEmpty() || item->toString() == QLatin1String("unknown"))) { clusterId = BASIC_CLUSTER_ID; - attributes.push_back(0x0004); // manufacturer + //attributes.push_back(0x0004); // manufacturer attributes.push_back(0x0005); // model id } }
Fix compiler error in Ota update demo in winsim
@@ -162,9 +162,10 @@ static BaseType_t prxCreateNetworkConnection( void ) configPRINTF(( "Waiting for a network connection.\r\n" )); ( void ) xSemaphoreTake( xNetworkAvailableLock, portMAX_DELAY ); } - +#if defined(CONFIG_OTA_UPDATE_DEMO_ENABLED) /* Connect to one of the network type.*/ xRet = xMqttDemoCreateNetworkConnection( &xConnection, otaDemoNETWORK_TYPES ); +#endif if( xRet == pdTRUE ) { @@ -249,8 +250,9 @@ void vRunOTAUpdateDemo( void ) configPRINTF( ( "ERROR: MQTT_AGENT_Connect() Failed.\r\n" ) ); } - +#if defined(CONFIG_OTA_UPDATE_DEMO_ENABLED) vMqttDemoDeleteNetworkConnection(&xConnection); +#endif /* After failure to connect or a disconnect, wait an arbitrary one second before retry. */ vTaskDelay( myappONE_SECOND_DELAY_IN_TICKS ); }else @@ -285,7 +287,9 @@ static void App_OTACompleteCallback( OTA_JobEvent_t eEvent ) { configPRINTF( ( "Received eOTA_JobEvent_Activate callback from OTA Agent.\r\n" ) ); IotMqtt_Disconnect( xConnection.xMqttConnection, 0 ); +#if defined(CONFIG_OTA_UPDATE_DEMO_ENABLED) vMqttDemoDeleteNetworkConnection( &xConnection ); +#endif OTA_ActivateNewImage(); } else if (eEvent == eOTA_JobEvent_Fail)
crypto: Crypto SW Scheduler Coverity Warnings Type: fix
@@ -543,7 +543,7 @@ sw_scheduler_show_workers (vlib_main_t * vm, unformat_input_t * input, u32 i; vlib_cli_output (vm, "%-7s%-20s%-8s", "ID", "Name", "Crypto"); - for (i = vlib_num_workers () >= 0; i < vlib_thread_main.n_vlib_mains; i++) + for (i = 1; i < vlib_thread_main.n_vlib_mains; i++) { vlib_cli_output (vm, "%-7d%-20s%-8s", vlib_get_worker_index (i), (vlib_worker_threads + i)->name,
CHANGELOG: Add z14 hardware counter support
@@ -5,6 +5,9 @@ Release history for s390-tools (MIT version) For Linux kernel version: 4.15 + Changes of existing tools: + - lscpumf: add support for IBM z14 hardware counters + Bug Fixes: - zgetdump: Fix handling of DASD multi-volume dump for partitions above 4 GB
add soft support for C++14
@@ -21,7 +21,7 @@ Based on above guidelines, below are the C++ version support guidelines and futu 2. **C++11 features usability** : The 1DS SDK is written using C++11 features, and developers are encouraged to use these features as and when needed. 3. **C++14 features usability** : One of the omissisions from C++11 standards, and made available in C++14 standard is support for `std::make_unique`. This is already [backported](https://github.com/microsoft/cpp_client_telemetry/blob/780205d2ea0298e41e82d54a3d203366f051cdf4/lib/utils/Utils.hpp#L28) in 1DS SDK, and hence compiles successfully with C++11 compilers. -If there are any other features which needs to be used, contributions through PRs to backport them for C++11 compiler in 1DS SDK can be done. As of now, there is no urgent requirement for supporting C++14 std features, but this would be re-visited once Azure SDK lifts the requirement for supporting GCC 4.8 compiler. +If there are any other features which needs to be used, contributions through PRs to backport them for C++11 compiler in 1DS SDK can be done. One of the benefit of supporing C++14 would be to enable use of Guidelines Support Library(GSL) library. We would re-visited this once Azure SDK lifts the requirement for supporting GCC 4.8 compiler. As of now, plan is to do "soft-switch" to C++14 for Windows platform-specific code ( eg Winlnet or WinHTTP client, or other platform bindings), because we are alredy building with either Visual Studio 2017+ or modern clang (Chromium). This is planned by end of 2020. 4. **C++17 features usability** : C++17 features are not yet supported as per Chromium C++ guideline (see above), and hence 1DS SDK doesn't support using these features. This would be revisited around Mid-2021 once Chromium removes this restrictions. There are plans to backport some of the needed features like [std::variant](https://en.cppreference.com/w/cpp/utility/variant), [std::string_view](https://en.cppreference.com/w/cpp/string/basic_string_view), and [std::visit](https://en.cppreference.com/w/cpp/utility/variant/visit) during this year(2020). For any other feature requirements, contributions through PRs to backport them for C++11 compiler in 1DS SDK can be done. Guidelines for backporting are been discussed in (Issue#557)[https://github.com/microsoft/cpp_client_telemetry/issues/557] and would be finalized soon. @@ -34,6 +34,6 @@ Summarising roadmap in tabular format: | C++ Compilers | Currently Support | Start of Support | End of Support | | --- | --- | -- | -- | | C++11 | Yes | - | Mid-2021 | -| C++14 | No | Won't be supported | N/A | +| C++14 | No | Soft support for Windows(Dec-2020) | N/A | | C++17 | No | Mid-2021 | No Plans | | C++20 | No | No Plans | No Plans |
fix typo (taupo?)
@@ -182,7 +182,7 @@ If you were to try and draw a single "grey" pixel it will end up either black or ##### Inky Frame -Inky Frame is a special case- the display itself supports only 7 (8 if you include its cleaning "clear" colour, which we call Tapue) colours. +Inky Frame is a special case- the display itself supports only 7 (8 if you include its cleaning "clear" colour, which we call Taupe) colours. These are:
plugins: in_tcp: removed lagging references to flb_base_conn
@@ -169,10 +169,10 @@ int tcp_conn_event(void *data) char *tmp; struct mk_event *event; struct tcp_conn *conn; - struct flb_base_conn *connection; + struct flb_connection *connection; struct flb_in_tcp_config *ctx; - connection = (struct flb_base_conn *) data; + connection = (struct flb_connection *) data; conn = connection->user_data; @@ -364,7 +364,6 @@ int tcp_conn_del(struct tcp_conn *conn) /* Release resources */ mk_list_del(&conn->_head); - // flb_socket_close(conn->fd); flb_free(conn->buf_data); flb_free(conn);
Remove WDK Install Workaround
@@ -12,24 +12,6 @@ jobs: - checkout: self submodules: recursive - # Temporary work around until AZP is fixed (ETA 2/28/2020). - - task: PowerShell@1 - displayName: Install WDK for VS - inputs: - scriptType: inlineScript - inlineScript: | - try { - $process = Start-Process ` - -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VSIXInstaller.exe" ` - -ArgumentList ("/quiet", '"C:\Program Files (x86)\Windows Kits\10\Vsix\VS2019\WDK.vsix"') ` - -Wait ` - -PassThru - } catch { - Write-Host "There is an error during WDK.vsix installation" - $_ - exit 1 - } - - task: VSBuild@1 continueOnError: true inputs:
remove debug/commented out code from src/main.c
@@ -541,19 +541,6 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n" } if (options->iss) { - // PlutoConstraints *dom = pluto_constraints_read(stdin); - // printf("Input set\n"); - // pluto_constraints_compact_print(stdout, dom); - // PlutoConstraints **doms = malloc(1*sizeof(PlutoConstraints *)); - // doms[0] = dom; - // pluto_find_iss(doms, 1, 1, NULL); - // PlutoMatrix *mat = pluto_matrix_input(stdin); - // pluto_constraints_print(stdout, dom); - // pluto_matrix_print(stdout, mat); - // PlutoConstraints *farkas = farkas_affine(dom, mat); - //pluto_constraints_pretty_print(stdout, farkas); - // pluto_constraints_free(dom); - // pluto_options_free(options); pluto_iss_dep(prog); }
output: register flb_output_name()
@@ -515,7 +515,7 @@ static inline int flb_output_config_map_set(struct flb_output_instance *ins, struct flb_output_instance *flb_output_new(struct flb_config *config, const char *output, void *data); - +const char *flb_output_name(struct flb_output_instance *in); int flb_output_set_property(struct flb_output_instance *out, const char *k, const char *v); const char *flb_output_get_property(const char *key, struct flb_output_instance *ins);
CI: change icmp example test address Use a server that is inside the great firewall of china for CI test. This avoid issues due to proxies, network configs etc.
from __future__ import unicode_literals import re import ttfw_idf +import os @ttfw_idf.idf_example_test(env_tag='Example_WIFI') @@ -11,7 +12,10 @@ def test_examples_icmp_echo(env, extra_data): dut.expect('example_connect: Connected to') dut.expect('esp>') - dut.write('ping www.espressif.com') + + ping_dest = os.getenv('EXAMPLE_ICMP_SERVER', 'www.espressif.com') + dut.write('ping {}'.format(ping_dest)) + ip_re = r'\.'.join((r'\d{1,3}',) * 4) ip = dut.expect(re.compile(r'64 bytes from ({}) icmp_seq=1 ttl=\d+ time=\d+ ms'.format(ip_re)))[0]
extmod/modwebrepl: Fix logic to handle a put of file of size 0. Fixes issue
@@ -108,6 +108,15 @@ STATIC mp_obj_t webrepl_make_new(const mp_obj_type_t *type, size_t n_args, size_ return o; } +STATIC void check_file_op_finished(mp_obj_webrepl_t *self) { + if (self->data_to_recv == 0) { + mp_stream_close(self->cur_file); + self->hdr_to_recv = sizeof(struct webrepl_file); + DEBUG_printf("webrepl: Finished file operation %d\n", self->hdr.type); + write_webrepl_resp(self->sock, 0); + } +} + STATIC int write_file_chunk(mp_obj_webrepl_t *self) { const mp_stream_p_t *file_stream = mp_get_stream(self->cur_file); byte readbuf[2 + 256]; @@ -160,6 +169,7 @@ STATIC void handle_op(mp_obj_webrepl_t *self) { if (self->hdr.type == PUT_FILE) { self->data_to_recv = self->hdr.size; + check_file_op_finished(self); } else if (self->hdr.type == GET_FILE) { self->data_to_recv = 1; } @@ -266,12 +276,7 @@ STATIC mp_uint_t _webrepl_read(mp_obj_t self_in, void *buf, mp_uint_t size, int } } - if (self->data_to_recv == 0) { - mp_stream_close(self->cur_file); - self->hdr_to_recv = sizeof(struct webrepl_file); - DEBUG_printf("webrepl: Finished file operation %d\n", self->hdr.type); - write_webrepl_resp(self->sock, 0); - } + check_file_op_finished(self); #ifdef MICROPY_PY_WEBREPL_DELAY // Some platforms may have broken drivers and easily gets
router_add_cluster: add post checks/fixups
@@ -695,15 +695,51 @@ router_add_server( char * router_add_cluster(router *r, cluster *cl) { - cluster *w; + cluster *cw; cluster *last = NULL; + servers *w; - for (w = r->clusters; w != NULL; last = w, w = w->next) - if (strcmp(w->name, cl->name) == 0) + for (cw = r->clusters; cw != NULL; last = cw, cw = cw->next) + if (strcmp(cw->name, cl->name) == 0) return(ra_strdup(r, "cluster with the same name already defined")); if (last == NULL) last = r->clusters; last->next = cl; + + /* post checks/fixups */ + if (cl->type == ANYOF || cl->type == FAILOVER) { + size_t i = 0; + cl->members.anyof->servers = + ra_malloc(r, sizeof(server *) * cl->members.anyof->count); + if (cl->members.anyof->servers == NULL) + return(ra_strdup(r, "malloc failed for anyof servers")); + for (w = cl->members.anyof->list; w != NULL; w = w->next) + cl->members.anyof->servers[i++] = w->server; + for (w = cl->members.anyof->list; w != NULL; w = w->next) { + server_add_secondaries(w->server, + cl->members.anyof->servers, + cl->members.anyof->count); + if (cl->type == FAILOVER) + server_set_failover(w->server); + } + } else if (cl->type == CARBON_CH || + cl->type == FNV1A_CH || + cl->type == JUMP_CH) + { + /* check that replication count is actually <= the + * number of servers */ + size_t i = 0; + char errbuf[512]; + for (w = cl->members.ch->servers; w != NULL; w = w->next) + i++; + if (i < cl->members.ch->repl_factor) { + snprintf(errbuf, sizeof(errbuf), + "invalid cluster '%s': replication count (%u) is " + "larger than the number of servers (%zu)\n", + cl->name, cl->members.ch->repl_factor, i); + return(ra_strdup(r, errbuf)); + } + } return NULL; }
usdt.py: print errors to stderr in enable_probe_or_bail()
# See the License for the specific language governing permissions and # limitations under the License. +from __future__ import print_function import ctypes as ct import os, sys from .libbcc import lib, _USDT_CB, _USDT_PROBE_CB, \ @@ -160,7 +161,7 @@ To check which probes are present in the process, use the tplist tool. try: self.enable_probe(probe, fn_name) except USDTException as e: - print(e) + print(e, file=sys.stderr) sys.exit(1) def get_context(self):
Reorder Configure output "Configuring..." was displayed with './Configure LIST'. This reorders the display of that line to happen after the "targets" LIST, TABLE and HASH have been checked.
@@ -293,9 +293,6 @@ if (defined $ENV{$local_config_envname}) { } } - -print "Configuring OpenSSL version $config{version} ($config{version_num})\n"; - $config{prefix}=""; $config{openssldir}=""; $config{processor}=""; @@ -853,6 +850,9 @@ if ($target eq "HASH") { exit 0; } +print "Configuring OpenSSL version $config{version} ($config{version_num})\n"; +print "for $target\n"; + # Backward compatibility? if ($target =~ m/^CygWin32(-.*)$/) { $target = "Cygwin".$1; @@ -922,7 +922,6 @@ foreach (sort (keys %disabled)) print "\n"; } -print "Configuring for $target\n"; # Support for legacy targets having a name starting with 'debug-' my ($d, $t) = $target =~ m/^(debug-)?(.*)$/; if ($d) {
is31fl3743b: Move register reset code to is31fl3743b_init This patch moves register reset code from is31fl3743b_reset to is31fl3743b_init. BRANCH=None TEST=Vell
@@ -79,11 +79,6 @@ static int is31fl3743b_write(struct rgbkbd *ctx, uint8_t addr, uint8_t value) return spi_transaction(SPI(ctx->cfg->spi), buf, frame_len, NULL, 0); } -static int is31fl3743b_reset(struct rgbkbd *ctx) -{ - return is31fl3743b_write(ctx, IS31FL3743B_REG_RSTN, 0xae); -} - static int is31fl3743b_enable(struct rgbkbd *ctx, bool enable) { uint8_t u8 = IS31FL3743B_CONFIG(IS31FL3743B_CFG_SWS_1_11, 0, @@ -159,14 +154,16 @@ static int is31fl3743b_init(struct rgbkbd *ctx) { int rv; - rv = is31fl3743b_reset(ctx); + /* Reset registers to the default values. */ + rv = is31fl3743b_write(ctx, IS31FL3743B_REG_RSTN, 0xae); + if (rv) + return rv; msleep(3); return EC_SUCCESS; } const struct rgbkbd_drv is31fl3743b_drv = { - .reset = is31fl3743b_reset, .init = is31fl3743b_init, .enable = is31fl3743b_enable, .set_color = is31fl3743b_set_color,
Working around in UIImageSetLayerContents. Fixes
@@ -69,7 +69,9 @@ void UIImageSetLayerContents(CALayer* layer, UIImage* image) { if ([layer contentsOrientation] != [image imageOrientation]) { [layer setContentsOrientation:[image imageOrientation]]; } - CGRect stretch = [image _imageStretch]; + + // Working around #1965; only call '_imageStretch' if 'image' is non-nil + CGRect stretch = (image ? [image _imageStretch] : CGRectZero); if (!CGRectEqualToRect([layer contentsCenter], stretch)) { [layer setContentsCenter:stretch]; }
test/runtest: Null-terminate segments of log entry Overly long segments (test case name, suite name, and message) were not being null-terminated. This caused malformed JSON to be included in the log.
@@ -165,8 +165,10 @@ runtest_log_result(const char *msg, bool passed) int m_len; int len; - /* str length of {"k":"","n":"","s":"","m":"","r":1}<token> */ - len = 35 + strlen(runtest_token); + /* str length of {"k":"","n":"","s":"","m":"","r":1}<token> plus three + * null-terminators. + */ + len = 38 + strlen(runtest_token); /* How much of the test name can we log? */ n_len = strlen(tu_case_name); @@ -175,7 +177,8 @@ runtest_log_result(const char *msg, bool passed) } len += n_len; n = buf; - strncpy(n, tu_case_name, n_len + 1); + strncpy(n, tu_case_name, n_len); + n[n_len] = '\0'; /* How much of the suite name can we log? */ s_len = strlen(runtest_current_ts->ts_name); @@ -184,7 +187,8 @@ runtest_log_result(const char *msg, bool passed) } len += s_len; s = n + n_len + 2; - strncpy(s, runtest_current_ts->ts_name, s_len + 1); + strncpy(s, runtest_current_ts->ts_name, s_len); + s[s_len] = '\0'; /* How much of the message can we log? */ m_len = strlen(msg); @@ -192,7 +196,8 @@ runtest_log_result(const char *msg, bool passed) m_len = LOG_PRINTF_MAX_ENTRY_LEN - len - 1; } m = s + s_len + 2; - strncpy(m, msg, m_len + 1); + strncpy(m, msg, m_len); + m[m_len] = '\0'; /* XXX Hack to allow the idle task to run and update the timestamp. */ os_time_delay(1);
Add argument to janet_panicf call
@@ -1493,7 +1493,9 @@ JanetSignal janet_pcall( Janet janet_mcall(const char *name, int32_t argc, Janet *argv) { /* At least 1 argument */ - if (argc < 1) janet_panicf("method :%s expected at least 1 argument"); + if (argc < 1) { + janet_panicf("method :%s expected at least 1 argument", name); + } /* Find method */ Janet method = janet_method_lookup(argv[0], name); if (janet_checktype(method, JANET_NIL)) {
Moved init logic upstream.
::> populate state on first boot. ::> creates our default mailbox and journal. :: - ::TODO but now init it spread out over two arms? ugly! - =< (ta-delta %init ~) :: side-effects + =< %- ta-deltas :: side-effects + =+ sen=(above our.bol) + ?: ?| !=(%czar (clan sen)) + =(sen our.bol) + =(%pawn (clan our.bol)) + == + ~ + [%init ~]~ %+ roll ^- (list {security knot cord}) :~ [%brown (main our.bol) 'default home'] ++ da-init ::< startup side-effects ::> :: - =+ sen=(above our.bol) - ::TODO move this logic to ta-init - ?: ?| !=(%czar (clan sen)) - =(sen our.bol) - =(%pawn (clan our.bol)) - == - ..da-init %- da-emit :* 0 %peer /burden - [sen %talk-guardian] + [(above our.bol) %talk-guardian] /burden/(scot %p our.bol) == ::
board/moli/pwm.c: Format with clang-format BRANCH=none TEST=none
#include "pwm_chip.h" const struct pwm_t pwm_channels[] = { - [PWM_CH_LED_AMBER] = { - .channel = 0, - .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP, - .freq = 2000 - }, - [PWM_CH_FAN] = { - .channel = 5, + [PWM_CH_LED_AMBER] = { .channel = 0, + .flags = PWM_CONFIG_ACTIVE_LOW | + PWM_CONFIG_DSLEEP, + .freq = 2000 }, + [PWM_CH_FAN] = { .channel = 5, .flags = PWM_CONFIG_OPEN_DRAIN, - .freq = 25000 - }, - [PWM_CH_LED_BLUE] = { - .channel = 2, - .flags = PWM_CONFIG_ACTIVE_LOW | PWM_CONFIG_DSLEEP, - .freq = 2000 - }, + .freq = 25000 }, + [PWM_CH_LED_BLUE] = { .channel = 2, + .flags = PWM_CONFIG_ACTIVE_LOW | + PWM_CONFIG_DSLEEP, + .freq = 2000 }, }; BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
Update arm_depthwise_conv_u8_basic_ver1.c
@@ -224,7 +224,7 @@ static void depthwise_conv_u8_generic(const uint8_t *input, * @param[in] dilation_x Dilation along width. Not used and intended for future enhancement. * @param[in] dilation_y Dilation along height. Not used and intended for future enhancement. * @param[in] bias Pointer to optional bias values. If no bias is - * availble, NULL is expected + * available, NULL is expected * @param[in] input_offset Input tensor zero offset * @param[in] filter_offset Kernel tensor zero offset * @param[in] output_offset Output tensor zero offset
FIX: clear azk_count during zookeeper rejoin process
@@ -340,6 +340,13 @@ static void inc_count(int delta) pthread_mutex_unlock(&azk_mtx); } +static void clear_count(void) +{ + pthread_mutex_lock(&azk_mtx); + azk_count = 0; + pthread_mutex_unlock(&azk_mtx); +} + static int wait_count(int timeout) { struct timeval tv; @@ -1674,6 +1681,8 @@ int arcus_zk_rejoin_ensemble() { int ret = 0; + clear_count(); + pthread_mutex_lock(&zk_lock); if (main_zk->zh != NULL) {
fix (encrypt-async): Fix output port in example test data corresponding to the P4 change
#define encrypt4 op(encrypt, "656c6c6f776f726c6461736400000000", "5d8f891abb54cbfe8ef3a330f0853bd5") fake_cmd_t t4p4s_testcase_common[][RTE_MAX_LCORE] = SINGLE_LCORE( - FAST(0, 1, hETH4(ETH04, ETH1A), hIP4("00", cIP4_0, cIP4_0), PAYLOAD(encrypt1)), - FAST(0, 1, hETH4(ETH04, ETH1A), hIP4("00", cIP4_0, cIP4_0), PAYLOAD(encrypt2)), - FAST(0, 1, hETH4(ETH04, ETH1A), hIP4("00", cIP4_0, cIP4_0), PAYLOAD(encrypt3)), - FAST(0, 1, hETH4(ETH04, ETH1A), hIP4("00", cIP4_0, cIP4_0), PAYLOAD(encrypt4)) + FAST(0, 0, hETH4(ETH04, ETH1A), hIP4("00", cIP4_0, cIP4_0), PAYLOAD(encrypt1)), + FAST(0, 0, hETH4(ETH04, ETH1A), hIP4("00", cIP4_0, cIP4_0), PAYLOAD(encrypt2)), + FAST(0, 0, hETH4(ETH04, ETH1A), hIP4("00", cIP4_0, cIP4_0), PAYLOAD(encrypt3)), + FAST(0, 0, hETH4(ETH04, ETH1A), hIP4("00", cIP4_0, cIP4_0), PAYLOAD(encrypt4)) );
esp32c2/clk_cali: fix rtc slow clk cali logic
@@ -57,16 +57,21 @@ uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) rtc_clk_8m_enable(true, true); clk_ll_rc_fast_d256_digi_enable(); } - /* Prepare calibration */ - REG_SET_FIELD(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_CLK_SEL, cal_clk); /* There may be another calibration process already running during we call this function, * so we should wait the last process is done. */ - if (!GET_PERI_REG_MASK(TIMG_RTCCALICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT)) { if (GET_PERI_REG_MASK(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_START_CYCLING)) { - while (!GET_PERI_REG_MASK(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_RDY)); - } + /** + * Set a small timeout threshold to accelerate the generation of timeout. + * The internal circuit will be reset when the timeout occurs and will not affect the next calibration. + */ + REG_SET_FIELD(TIMG_RTCCALICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT_THRES, 1); + while (!GET_PERI_REG_MASK(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_RDY) + && !GET_PERI_REG_MASK(TIMG_RTCCALICFG2_REG(0), TIMG_RTC_CALI_TIMEOUT)); } + + /* Prepare calibration */ + REG_SET_FIELD(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_CLK_SEL, cal_clk); CLEAR_PERI_REG_MASK(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_START_CYCLING); REG_SET_FIELD(TIMG_RTCCALICFG_REG(0), TIMG_RTC_CALI_MAX, slowclk_cycles); /* Figure out how long to wait for calibration to finish */
forgot one comment
@@ -106,7 +106,7 @@ CTEST2(p2d,sanity) { ASSERT_TRUE(status==0); ASSERT_DBL_NEAR(1,pk/pk_model_analytical(exp(lktest),atest)); - //Evaluate at very low z and see if it checks out + //Evaluate at very high z and see if it checks out double alo=0.02; pk=ccl_p2d_t_eval(psp,lktest,alo,NULL,&status); ASSERT_TRUE(status==0);
add break statement to prevent implicit fallthrough
@@ -392,6 +392,7 @@ Token scanToken(Scanner *scanner) { if (match(scanner, '.')) { return makeToken(scanner, TOKEN_DOT_DOT_DOT); } + break; } else { return makeToken(scanner, TOKEN_DOT); }
xfpga: fix potential memory leaks in sysfs.c
@@ -879,7 +879,7 @@ fpga_result opae_glob_path(char *path) default: res = FPGA_EXCEPTION; } - if (pglob.gl_pathc && pglob.gl_pathv) { + if (pglob.gl_pathv) { globfree(&pglob); } } @@ -992,10 +992,6 @@ fpga_result make_sysfs_object(char *sysfspath, const char *name, if (flags & FPGA_OBJECT_GLOB) { res = opae_glob_path(sysfspath); } - obj = alloc_fpga_object(sysfspath, name); - if (!obj) { - return FPGA_NO_MEMORY; - } statres = stat(sysfspath, &objstat); if (statres < 0) { FPGA_MSG("Error accessing %s: %s", sysfspath, strerror(errno)); @@ -1017,6 +1013,10 @@ fpga_result make_sysfs_object(char *sysfspath, const char *name, if (S_ISDIR(objstat.st_mode)) { return make_sysfs_group(sysfspath, name, object, flags, handle); } + obj = alloc_fpga_object(sysfspath, name); + if (!obj) { + return FPGA_NO_MEMORY; + } obj->handle = handle; obj->type = FPGA_SYSFS_FILE; obj->buffer = calloc(pg_size, sizeof(uint8_t));
[snitch] Correctly calculate line count in I$
@@ -21,9 +21,9 @@ module mempool_tile #( // Boot address parameter logic [31:0] BootAddr = 32'h0000_1000 , // Instruction cache - parameter int unsigned ICacheSizeByte = 1024 * NumCoresPerTile , // Total Size of instruction cache in bytes - parameter int unsigned ICacheSets = NumCoresPerTile , - parameter int unsigned ICacheLineWidth = 64 , + parameter int unsigned ICacheSizeByte = 512 * NumCoresPerTile , // Total Size of instruction cache in bytes + parameter int unsigned ICacheSets = NumCoresPerTile , // Number of sets + parameter int unsigned ICacheLineWidth = 64 , // Size of each cache line in bits // AXI parameter type axi_aw_t = logic , parameter type axi_w_t = logic , @@ -179,7 +179,7 @@ module mempool_tile #( /// Cache Line Width .L0_LINE_COUNT (4 ), .LINE_WIDTH (ICacheLineWidth ), - .LINE_COUNT (ICacheSizeByte / (NumCoresPerTile * NumCoresPerTile * 4)), + .LINE_COUNT (ICacheSizeByte / (ICacheSets * ICacheLineWidth / 8) ), .SET_COUNT (ICacheSets ), .FETCH_AW (AddrWidth ), .FETCH_DW (DataWidth ),
Fix `SOURCE_DIRS` for barstools [ci skip]
@@ -71,7 +71,7 @@ else lookup_srcs = $(shell fd -L ".*\.$(2)" $(1)) endif -SOURCE_DIRS = $(addprefix $(base_dir)/,generators sims/firesim/sim tools/barstools/iocell fpga/fpga-shells fpga/src) +SOURCE_DIRS = $(addprefix $(base_dir)/,generators sims/firesim/sim tools/barstools fpga/fpga-shells fpga/src) SCALA_SOURCES = $(call lookup_srcs,$(SOURCE_DIRS),scala) VLOG_SOURCES = $(call lookup_srcs,$(SOURCE_DIRS),sv) $(call lookup_srcs,$(SOURCE_DIRS),v) # This assumes no SBT meta-build sources
u3: %evil leaves no trace
@@ -1348,6 +1348,11 @@ u3m_soft(c3_w mil_w, pro = u3nc(u3k(cod), u3_nul); } + // %evil leaves no trace + // + else if ( c3__evil == cod ) { + pro = u3nc(u3k(cod), u3_nul); + } else { u3_noun mok = u3dc("mook", 2, u3k(tax)); pro = u3nc(u3k(cod), u3k(u3t(mok)));
artik053/openocd: fix URLs of the libusbX This commit fix URLs of libusb0 and libusb1.
@@ -9,10 +9,11 @@ OPENOCD_SRC_URL=http://excellmedia.dl.sourceforge.net/project/openocd/openocd/0. OPENOCD_SRC_MD5SUM=8971d16aee5c2642b33ee55fc6c86239 LIBFTDI_SRC_URL=http://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.3.tar.bz2 LIBFTDI_SRC_MD5SUM=156cdf40cece9f8a3ce1582db59a502a -LIBUSB0_SRC_URL=http://sourceforge.net/projects/libusb/files/libusb-compat-0.1/libusb-compat-0.1.4/libusb-compat-0.1.4.tar.bz2 -LIBUSB0_SRC_MD5SUM=2ca521fffadd0c28fdf174e6ec73865b -LIBUSB1_SRC_URL=http://excellmedia.dl.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.21/libusb-1.0.21.tar.gz -LIBUSB1_SRC_MD5SUM=74473305ac0835d10660d53eb39583e6 +LIBUSB0_SRC_URL=https://github.com/libusb +LIBUSB0_SRC_NAME=libusb-compat-0.1 +LIBUSB0_SRC_VERSION=0.1.6-rc2 +LIBUSB1_SRC_URL=https://downloads.sourceforge.net/project/libusb/libusb-1.0/libusb-1.0.21/libusb-1.0.21.tar.bz2 +LIBUSB1_SRC_MD5SUM=1da9ea3c27b3858fa85c5f4466003e44 srcRoot=`dirname $0` if [ "${0:0:1}" == "." ]; then @@ -64,14 +65,10 @@ fetch_libftdi() { } fetch_libusb0() { - IMG=`basename $LIBUSB0_SRC_URL` - wget $LIBUSB0_SRC_URL -O /tmp/$IMG - if [ $LIBUSB0_SRC_MD5SUM != `md5sum /tmp/$IMG | awk '{print $1}'` ]; then - die "Checksum failed: $LIBUSB0_SRC_URL($LIBUSB0_SRC_MD5SUM)" - fi - mkdir $srcRoot/libusb0 - tar -xvf /tmp/$IMG --strip-components 1 -C $srcRoot/libusb0 - rm -rf /tmp/$IMG + git clone $LIBUSB0_SRC_URL/$LIBUSB0_SRC_NAME.git \ + --depth 1 \ + --branch v$LIBUSB0_SRC_VERSION \ + $srcRoot/libusb0 } fetch_libusb1() { @@ -134,6 +131,7 @@ build-libusb0() { rm -rf $buildDir/libusb0-install mkdir -p $buildDir/libusb0-install cd $srcRoot/libusb0 + ./bootstrap.sh $srcRoot/libusb0/configure --enable-static --prefix=$buildDir/libusb0-install make -j$CORES make install @@ -144,7 +142,6 @@ build-libusb1() { rm -rf $buildDir/libusb1-install mkdir -p $buildDir/libusb1-install cd $srcRoot/libusb1 - ./bootstrap.sh $srcRoot/libusb1/configure --enable-static --prefix=$buildDir/libusb1-install make -j$CORES make install
da1469x: use uint16 TLV tag mcuboot: updates the tag type to uint16_t. Use the same.
@@ -86,7 +86,7 @@ boot_custom_start(uintptr_t flash_base, struct boot_rsp *rsp) const struct flash_area *fap; uint32_t off; uint16_t len; - uint8_t type; + uint16_t type; uint8_t buf[8]; uint8_t key; uint32_t nonce[2];
options/posix: Add endianness #defs in sys/param.h
#ifndef _SYS_PARAM_H #define _SYS_PARAM_H +#ifdef __GNUC__ +# define BYTE_ORDER __BYTE_ORDER__ +# define LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ +# define BIG_ENDIAN __ORDER_BIG_ENDIAN__ +# define PDP_ENDIAN __ORDER_PDP_ENDIAN__ +#else +# error "Unsupported compiler" +#endif + #ifdef __cplusplus extern "C" { #endif
test: Add test_008Contract_0001CallNoneInputContractFuction
* limitations under the License. *****************************************************************************/ #include "tcase_ethereum.h" +#include "TestABIContract.h" #define TEST_EIP155_COMPATIBILITY BOAT_FALSE #define TEST_ETHEREUM_CHAIN_ID 5777 #define TEST_GAS_PRICE "0x4A817C800" #define TEST_IS_SYNC_TX BOAT_TRUE #define TEST_RECIPIENT_ADDRESS "0xde4c806b372Df8857C97cF36A08D528bB8E261Bd" -#define TEST_STOREREAD_ADDRESS "0x" +#define TEST_CONTRACT_ADDRESS "0x" extern BoatEthWalletConfig get_ethereum_wallet_settings(); @@ -213,6 +214,28 @@ START_TEST(test_002InitWallet_0012InitEthWalletSuccess) } END_TEST +START_TEST(test_008Contract_0001CallNoneInputContractFuction) +{ + BoatEthTx tx_ctx; + BoatEthWallet *rtnVal; + BCHAR *result_str; + BOAT_RESULT result; + BoatEthWalletConfig walletConfig = get_ethereum_wallet_settings(); + + /* 1. execute unit test */ + rtnVal = BoatEthWalletInit(&walletConfig, sizeof(BoatEthWalletConfig)); + ck_assert_ptr_ne(rtnVal, NULL); + + result = BoatEthTxInit(rtnVal, &tx_ctx, BOAT_TRUE, NULL, + "0x333333", + (BCHAR *)TEST_CONTRACT_ADDRESS); + ck_assert_int_eq(result, BOAT_SUCCESS); + + result_str = TestABIContract_count(&tx_ctx); + ck_assert_ptr_ne(rtnVal, NULL); +} +END_TEST + Suite *make_general_suite(void) { /* Create Suite */ @@ -236,5 +259,7 @@ Suite *make_general_suite(void) tcase_add_test(tc_general_api, test_002InitWallet_0005SetNodeUrlSuccess); tcase_add_test(tc_general_api, test_002InitWallet_0012InitEthWalletSuccess); + tcase_add_test(tc_general_api, test_008Contract_0001CallNoneInputContractFuction); + return s_general; } \ No newline at end of file
check status before go to next.
@@ -176,7 +176,7 @@ void radio_setFrequency(uint16_t channel) { void radio_rfOn(void) { //put the radio in the TRXPREP state at86rf215_spiStrobe(CMD_RF_TRXOFF); - //while(radio_vars.state != RADIOSTATE_TX_ENABLED); + while(at86rf215_status() != RF_STATE_TRXOFF); } void radio_rfOff(void) { @@ -185,6 +185,7 @@ void radio_rfOff(void) { radio_vars.state = RADIOSTATE_TURNING_OFF; at86rf215_spiStrobe(CMD_RF_TRXOFF); + while(at86rf215_status() != RF_STATE_TRXOFF); // wiggle debug pin debugpins_radio_clr(); leds_radio_off();
* Upgraded flutter pubspec.yaml
@@ -5,6 +5,7 @@ homepage: https://ejdb.org environment: sdk: '>=2.5.0 <3.0.0' + flutter: ">=1.10.0 <2.0.0" dependencies: flutter: @@ -27,8 +28,13 @@ flutter: # be modified. They are used by the tooling to maintain consistency when # adding or updating assets for this project. plugin: - androidPackage: com.softmotions.ejdb2 + platforms: + android: + package: com.softmotions.ejdb2 pluginClass: Ejdb2FlutterPlugin + ios: + pluginClass: Ejdb2FlutterPlugin + # To add assets to your plugin package, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg
sysdeps/managarm: Implement sys_getcwd()
@@ -459,6 +459,51 @@ int sys_ttyname(int fd, char *buf, size_t size) { } } +int sys_getcwd(char *buffer, size_t size) { + SignalGuard sguard; + HelAction actions[4]; + globalQueue.trim(); + + managarm::posix::CntRequest<MemoryAllocator> req(getSysdepsAllocator()); + req.set_request_type(managarm::posix::CntReqType::GETCWD); + req.set_size(size); + + frigg::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 = kHelItemChain; + actions[3].type = kHelActionRecvToBuffer; + actions[3].flags = 0; + actions[3].buffer = buffer; + actions[3].length = size; + HEL_CHECK(helSubmitAsync(getPosixLane(), actions, 4, + globalQueue.getQueue(), 0, 0)); + + auto element = globalQueue.dequeueSingle(); + auto offer = parseSimple(element); + auto send_req = parseSimple(element); + auto recv_resp = parseInline(element); + auto recv_path = parseInline(element); + + HEL_CHECK(offer->error); + HEL_CHECK(send_req->error); + HEL_CHECK(recv_resp->error); + HEL_CHECK(recv_path->error); + + managarm::posix::SvrResponse<MemoryAllocator> resp(getSysdepsAllocator()); + resp.ParseFromArray(recv_resp->data, recv_resp->length); + __ensure(resp.error() == managarm::posix::Errors::SUCCESS); + if(resp.size() >= size) + return ERANGE; + return 0; +} + int sys_vm_map(void *hint, size_t size, int prot, int flags, int fd, off_t offset, void **window) { __ensure(!hint);
Fix init scroll overflow warning
@@ -217,8 +217,8 @@ void RefreshScroll() { void InitScroll() { pending_w_i = 0; pending_h_i = 0; - scroll_x = 0xF000; - scroll_y = 0xF000; + scroll_x = 0x7FFF; + scroll_y = 0x7FFF; } void RenderScreen() {
add scp upload step
@@ -46,10 +46,41 @@ jobs: key: ${{ runner.os }}-platformio - name: build ${{ matrix.target }} - run: bash script/build-tester.sh ${{ matrix.target }} + run: bash script/build-tester.sh build ${{ matrix.target }} - name: upload artifacts uses: actions/upload-artifact@v3 with: name: ${{ matrix.target }} path: output/quicksilver*.hex + + upload: + needs: build + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v3 + + - name: build html page + run: bash script/build-tester.sh html + + - uses: actions/download-artifact@v3 + with: + path: output + + - name: upload hanfer + uses: appleboy/scp-action@master + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + password: ${{ secrets.SSH_PASSWORD }} + strip_components: 1 + overwrite: true + source: output/*/quicksilver*.hex,output/index.html + target: /mnt/hanfer/public/quicksilver/${{ github.ref_name }} + + - name: release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: output/*/quicksilver*.hex
Fix title issues with `pyto_ui`
@@ -119,7 +119,11 @@ import WebKit private var _title: String? { didSet { - (self.viewController as? UINavigationController)?.title = _title + for vc in (self.viewController as? UINavigationController)?.viewControllers ?? [] { + if vc.view == view { + vc.title = _title + } + } } } @@ -1000,6 +1004,7 @@ import WebKit let vc = ViewController.init() vc.view.addSubview(view.view) + vc.title = view.title navVC?.pushViewController(vc, animated: true) }
release: disable building of documentation for initial installation
@@ -15,7 +15,15 @@ install_elektra() { rm -rf $BUILD_DIR mkdir $BUILD_DIR cd $BUILD_DIR - cmake -DBUILD_SHARED=ON -DBUILD_FULL=ON -DBUILD_STATIC=ON -DKDB_DB_SYSTEM="${WORKSPACE}/config/kdb/system" -DKDB_DB_SPEC="${WORKSPACE}/config/kdb/spec" -DKDB_DB_HOME="${WORKSPACE}/config/kdb/home" -DCMAKE_INSTALL_PREFIX="${WORKSPACE}/system" .. + cmake -DBUILD_SHARED=ON \ + -DBUILD_FULL=ON \ + -DBUILD_STATIC=ON \ + -DBUILD_DOCUMENTATION=OFF \ + -DKDB_DB_SYSTEM="${WORKSPACE}/config/kdb/system" \ + -DKDB_DB_SPEC="${WORKSPACE}/config/kdb/spec" \ + -DKDB_DB_HOME="${WORKSPACE}/config/kdb/home" \ + -DCMAKE_INSTALL_PREFIX="${WORKSPACE}/system" \ + .. make make install export LD_LIBRARY_PATH=${WORKSPACE}/system/lib:$LD_LIBRARY_PATH
Document the recursive option
@@ -13,6 +13,7 @@ B<openssl> B<storeutl> [B<-passin arg>] [B<-text arg>] [B<-engine id>] +[B<-r>] B<uri> ... =head1 DESCRIPTION @@ -54,6 +55,10 @@ to attempt to obtain a functional reference to the specified engine, thus initialising it if needed. The engine will then be set as the default for all available algorithms. +=item B<-r> + +Fetch objects recursively when possible. + =back =head1 SEE ALSO
Add initialization of hyperbolic secant pulses to sim.c
@@ -58,6 +58,7 @@ int main_sim(int argc, char* argv[argc]) data.seq = simdata_seq_defaults; data.voxel = simdata_voxel_defaults; data.pulse = simdata_pulse_defaults; + data.pulse.hs = hs_pulse_defaults; data.grad = simdata_grad_defaults; data.tmp = simdata_tmp_defaults;
Remove unsued parameter from c0sk_queue_ingest
@@ -1107,8 +1107,9 @@ c0sk_ingest_tune(struct c0sk_impl *self, struct c0_usage *usage) /* GCOV_EXCL_START */ merr_t -c0sk_queue_ingest(struct c0sk_impl *self, struct c0_kvmultiset *old, struct c0_kvmultiset *new) +c0sk_queue_ingest(struct c0sk_impl *self, struct c0_kvmultiset *old) { + struct c0_kvmultiset *new = NULL; struct mtx_node * node; struct c0_usage usage = { 0 }; @@ -1287,7 +1288,7 @@ c0sk_flush_current_multiset(struct c0sk_impl *self, u64 *genp) } } - err = c0sk_queue_ingest(self, old, NULL); + err = c0sk_queue_ingest(self, old); c0kvms_putref(old); @@ -1395,7 +1396,7 @@ c0sk_putdel( if (merr_errno(err) != ENOMEM) break; - c0sk_queue_ingest(self, dst, NULL); + c0sk_queue_ingest(self, dst); c0kvms_putref(dst); }
tests/run-tests: Enable bool1.py test with native emitter. It should work reliably now.
@@ -359,7 +359,6 @@ def run_tests(pyb, tests, args, base_path="."): skip_tests.update({'basics/%s.py' % t for t in 'try_reraise try_reraise2'.split()}) # require raise_varargs skip_tests.update({'basics/%s.py' % t for t in 'with_break with_continue with_return'.split()}) # require complete with support skip_tests.add('basics/array_construct2.py') # requires generators - skip_tests.add('basics/bool1.py') # seems to randomly fail skip_tests.add('basics/builtin_hash_gen.py') # requires yield skip_tests.add('basics/class_bind_self.py') # requires yield skip_tests.add('basics/del_deref.py') # requires checking for unbound local
Disallow ocf_cache_mode_max in io_class config
@@ -235,12 +235,8 @@ static int _ocf_mngt_io_class_validate_cfg(ocf_cache_t cache, if (!cfg->name) return 0; - /* TODO(r.baldyga): ocf_cache_mode_max is allowed for compatibility - * with OCF 3.1 kernel adapter (upgrade in flight) and casadm. - * Forbid ocf_cache_mode_max after fixing these problems. - */ if (cfg->cache_mode < ocf_cache_mode_none || - cfg->cache_mode > ocf_cache_mode_max) { + cfg->cache_mode >= ocf_cache_mode_max) { return -OCF_ERR_INVAL; }
Fix leaked String in cfgParseSize().
@@ -106,6 +106,8 @@ cfgParseSize(const String *const value) if (valueInt > INT64_MAX / multiplier) THROW_FMT(FormatError, "value '%s' is out of range", strZ(value)); + strFree(valueLower); + FUNCTION_TEST_RETURN(INT64, valueInt * multiplier); }
Update cpp wrapper tests with linear hash Given the linear hash's current functionality, these tests are tailored to avoid open/close until memory errors are fixed.
@@ -2736,6 +2736,7 @@ test_master_table_dictionary_open_close_all( PLANCK_UNIT_ASSERT_INT_ARE_EQUAL(tc, ion_dictionary_status_ok, dictionary->dict.status); test_master_table_dictionary_open_close(tc, dictionary, 7, dictionary_type_skip_list_t); + /* Uncomment when LinearHash dictionary open memory issue fixed. */ /* dictionary = new LinearHash<int, int>(1, key_type_numeric_signed, sizeof(int), sizeof(int), 7); */ /* PLANCK_UNIT_ASSERT_INT_ARE_EQUAL(tc, ion_dictionary_status_ok, dictionary->dict.status); */ /* test_master_table_dictionary_open_close(tc, dictionary, 7, dictionary_type_linear_hash_t); */ @@ -2771,7 +2772,8 @@ test_master_table( /* Close dictionary before closing master table or ensure dictionary instance has been closed previously to initialize it. */ - + /* Remove if-statement when linear hash dictionary open memory issue fixed. */ + if (dictionary_type_linear_hash_t != dictionary_type) { master_table_close_dictionary(tc, master_table, dictionary); master_table_open_dictionary(tc, master_table, dictionary, id); @@ -2790,6 +2792,7 @@ test_master_table( /* Test re-open dictionary */ master_table_open_dictionary(tc, master_table, dictionary, 1); + } /* Test lookup 1st dictionary */ ion_dictionary_config_info_t config; @@ -2822,6 +2825,8 @@ test_master_table( /***********************************/ + /* Remove if-statement when linear hash dictionary open memory issue fixed. */ + if (dictionary_type_linear_hash_t != dictionary_type) { /* Test close dictionary */ master_table_close_dictionary(tc, master_table, dictionary2); @@ -2829,6 +2834,7 @@ test_master_table( /* Test open dictionary */ master_table_open_dictionary(tc, master_table, dictionary2, id2); + } /* Test delete dictionary */ @@ -2892,13 +2898,13 @@ test_master_table_all( delete dictionary; delete dictionary2; -/* dictionary = new LinearHash<int, int>(1, key_type_numeric_signed, sizeof(int), 10, 20); */ -/* PLANCK_UNIT_ASSERT_INT_ARE_EQUAL(tc, ion_dictionary_status_ok, dictionary->dict.status); */ -/* dictionary2 = new LinearHash<int, int>(2, key_type_numeric_signed, sizeof(short), 7, 14); */ -/* PLANCK_UNIT_ASSERT_INT_ARE_EQUAL(tc, ion_dictionary_status_ok, dictionary->dict.status); */ -/* test_master_table(tc, dictionary, dictionary2, dictionary_type_linear_hash_t); */ -/* delete dictionary; */ -/* delete dictionary2; */ + dictionary = new LinearHash<int, int>(1, key_type_numeric_signed, sizeof(int), 10, 20); + PLANCK_UNIT_ASSERT_INT_ARE_EQUAL(tc, ion_dictionary_status_ok, dictionary->dict.status); + dictionary2 = new LinearHash<int, int>(2, key_type_numeric_signed, sizeof(short), 7, 14); + PLANCK_UNIT_ASSERT_INT_ARE_EQUAL(tc, ion_dictionary_status_ok, dictionary->dict.status); + test_master_table(tc, dictionary, dictionary2, dictionary_type_linear_hash_t); + delete dictionary; + delete dictionary2; } /**
Missing logging of error details.
@@ -3697,6 +3697,9 @@ load_source_finally: process_group, application_group, filename); } Py_END_ALLOW_THREADS + + wsgi_log_python_error(r, NULL, filename, 0); + return NULL; }
Fix syntax error in metasprite canvas worker
@@ -48,7 +48,7 @@ workerCtx.onmessage = async (evt) => { img.width, img.height ); - chromaKeyData(tileImageData.data);); + chromaKeyData(tileImageData.data); tilesCanvases = { OBP0: new OffscreenCanvas(img.width, img.height),
uart.c: Have a separate callback for each UART.
@@ -537,7 +537,7 @@ esp_err_t uart_intr_config(uart_port_t uart_num, const uart_intr_config_t *intr_ return ESP_OK; } -static uart_rx_callback_t uart_rx_callback = NULL; +static uart_rx_callback_t uart_rx_callback[3] = { NULL }; //internal isr handler for default driver code. static void uart_rx_intr_handler_default(void *param) @@ -667,8 +667,8 @@ static void uart_rx_intr_handler_default(void *param) while(buf_idx < rx_fifo_len) { uint8_t rx_data = uart_reg->fifo.rw_byte; p_uart->rx_data_buf[buf_idx++] = rx_data; - if (uart_rx_callback) { - uart_rx_callback(uart_num, rx_data); + if (uart_rx_callback[uart_num]) { + uart_rx_callback[uart_num](uart_num, rx_data); } } //After Copying the Data From FIFO ,Clear intr_status @@ -1085,7 +1085,7 @@ esp_err_t uart_driver_install(uart_port_t uart_num, int rx_buffer_size, int tx_b return ESP_FAIL; } - uart_rx_callback = rx_callback; + uart_rx_callback[uart_num] = rx_callback; r=uart_isr_register(uart_num, uart_rx_intr_handler_default, p_uart_obj[uart_num], intr_alloc_flags, &p_uart_obj[uart_num]->intr_handle); if (r!=ESP_OK) goto err; uart_intr_config_t uart_intr = {
VmaAllocator_T::CalcPreferredBlockSize: Minor improvement - treating HOST_CACHED memory type as small heap.
@@ -6862,8 +6862,10 @@ VkDeviceSize VmaAllocator_T::CalcPreferredBlockSize(uint32_t memTypeIndex) { const uint32_t heapIndex = MemoryTypeIndexToHeapIndex(memTypeIndex); const VkDeviceSize heapSize = m_MemProps.memoryHeaps[heapIndex].size; - return (heapSize <= VMA_SMALL_HEAP_MAX_SIZE) ? - m_PreferredSmallHeapBlockSize : m_PreferredLargeHeapBlockSize; + const bool isSmallHeap = heapSize <= VMA_SMALL_HEAP_MAX_SIZE || + // HOST_CACHED memory type is treated as small despite it has full size of CPU memory heap, because we usually don't use much of it. + (m_MemProps.memoryTypes[memTypeIndex].propertyFlags & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) != 0; + return isSmallHeap ? m_PreferredSmallHeapBlockSize : m_PreferredLargeHeapBlockSize; } VkResult VmaAllocator_T::AllocateMemoryOfType(
Fix sample code Fix memory leak in sample encryption code and check return value of fopen. CLA: trivial
@@ -552,6 +552,7 @@ Encrypt a string using IDEA: if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, intext, strlen(intext))) { /* Error */ + EVP_CIPHER_CTX_free(ctx); return 0; } /* @@ -560,6 +561,7 @@ Encrypt a string using IDEA: */ if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) { /* Error */ + EVP_CIPHER_CTX_free(ctx); return 0; } outlen += tmplen; @@ -571,6 +573,10 @@ Encrypt a string using IDEA: * NULs. */ out = fopen(outfile, "wb"); + if (out == NULL) { + /* Error */ + return 0; + } fwrite(outbuf, 1, outlen, out); fclose(out); return 1;
Add a test for 0RTT replay protection
@@ -1858,6 +1858,58 @@ static int test_early_data_read_write(int idx) return testresult; } +static int test_early_data_replay(int idx) +{ + SSL_CTX *cctx = NULL, *sctx = NULL; + SSL *clientssl = NULL, *serverssl = NULL; + int testresult = 0; + SSL_SESSION *sess = NULL; + + if (!TEST_true(setupearly_data_test(&cctx, &sctx, &clientssl, + &serverssl, &sess, idx))) + goto end; + + /* + * The server is configured to accept early data. Create a connection to + * "use up" the ticket + */ + if (!TEST_true(create_ssl_connection(serverssl, clientssl, SSL_ERROR_NONE)) + || !TEST_true(SSL_session_reused(clientssl))) + goto end; + + SSL_shutdown(clientssl); + SSL_shutdown(serverssl); + SSL_free(serverssl); + SSL_free(clientssl); + serverssl = clientssl = NULL; + + if (!TEST_true(create_ssl_objects(sctx, cctx, &serverssl, + &clientssl, NULL, NULL)) + || !TEST_true(SSL_set_session(clientssl, sess)) + || !TEST_true(create_ssl_connection(serverssl, clientssl, + SSL_ERROR_NONE)) + /* + * This time we should not have resumed the session because we + * already used it once. + */ + || !TEST_false(SSL_session_reused(clientssl))) + goto end; + + testresult = 1; + + end: + if (sess != clientpsk) + SSL_SESSION_free(sess); + SSL_SESSION_free(clientpsk); + SSL_SESSION_free(serverpsk); + clientpsk = serverpsk = NULL; + SSL_free(serverssl); + SSL_free(clientssl); + SSL_CTX_free(sctx); + SSL_CTX_free(cctx); + return testresult; +} + /* * Helper function to test that a server attempting to read early data can * handle a connection from a client where the early data should be skipped. @@ -3688,6 +3740,11 @@ int setup_tests(void) #endif #ifndef OPENSSL_NO_TLS1_3 ADD_ALL_TESTS(test_early_data_read_write, 3); + /* + * We don't do replay tests for external PSK. Replay protection isn't used + * in that scenario. + */ + ADD_ALL_TESTS(test_early_data_replay, 2); ADD_ALL_TESTS(test_early_data_skip, 3); ADD_ALL_TESTS(test_early_data_skip_hrr, 3); ADD_ALL_TESTS(test_early_data_not_sent, 3);
Osiris: Remove const keyword from rgbkbd_type variable Rgbkbd_type could be set at runtime, remove const. BRANCH=none TEST=None Cq-Depend: chromium:3864982, chromium:3861817, chromium:3866411
@@ -80,7 +80,7 @@ const uint8_t rgbkbd_count = ARRAY_SIZE(rgbkbds); const uint8_t rgbkbd_hsize = RGB_GRID0_COL; const uint8_t rgbkbd_vsize = RGB_GRID0_ROW; -const enum ec_rgbkbd_type rgbkbd_type = EC_RGBKBD_TYPE_FOUR_ZONES_12_LEDS; +enum ec_rgbkbd_type rgbkbd_type = EC_RGBKBD_TYPE_FOUR_ZONES_12_LEDS; #define LED(x, y) RGBKBD_COORD((x), (y)) #define DELM RGBKBD_DELM
Improve PhStdGetClientIdNameEx/handle enumeration performance
@@ -922,17 +922,50 @@ PPH_STRING PhStdGetClientIdNameEx( } // Combine everything - result = PhFormatString( - ClientId->UniqueThread ? L"%s%.*s (%lu): %s%.*s (%lu)" : L"%s%.*s (%lu)", - isProcessTerminated ? L"Terminated " : L"", - processNameRef.Length / sizeof(WCHAR), - processNameRef.Buffer, - HandleToUlong(ClientId->UniqueProcess), - isThreadTerminated ? L"terminated " : L"", - threadNameRef.Length / sizeof(WCHAR), - threadNameRef.Buffer, - HandleToUlong(ClientId->UniqueThread) - ); + + if (ClientId->UniqueThread) + { + PH_FORMAT format[10]; + + // L"%s%.*s (%lu): %s%.*s (%lu)" + PhInitFormatS(&format[0], isProcessTerminated ? L"Terminated " : L""); + PhInitFormatSR(&format[1], processNameRef); + PhInitFormatS(&format[2], L" ("); + PhInitFormatU(&format[3], HandleToUlong(ClientId->UniqueProcess)); + PhInitFormatS(&format[4], L"): "); + PhInitFormatS(&format[5], isThreadTerminated ? L"terminated " : L""); + PhInitFormatSR(&format[6], threadNameRef); + PhInitFormatS(&format[7], L" ("); + PhInitFormatU(&format[8], HandleToUlong(ClientId->UniqueThread)); + PhInitFormatC(&format[9], L')'); + + result = PhFormat(format, RTL_NUMBER_OF(format), 0x50); + } + else + { + PH_FORMAT format[5]; + + // L"%s%.*s (%lu)" + PhInitFormatS(&format[0], isProcessTerminated ? L"Terminated " : L""); + PhInitFormatSR(&format[1], processNameRef); + PhInitFormatS(&format[2], L" ("); + PhInitFormatU(&format[3], HandleToUlong(ClientId->UniqueProcess)); + PhInitFormatC(&format[4], L')'); + + result = PhFormat(format, RTL_NUMBER_OF(format), 0x50); + } + + //result = PhFormatString( + // ClientId->UniqueThread ? L"%s%.*s (%lu): %s%.*s (%lu)" : L"%s%.*s (%lu)", + // isProcessTerminated ? L"Terminated " : L"", + // processNameRef.Length / sizeof(WCHAR), + // processNameRef.Buffer, + // HandleToUlong(ClientId->UniqueProcess), + // isThreadTerminated ? L"terminated " : L"", + // threadNameRef.Length / sizeof(WCHAR), + // threadNameRef.Buffer, + // HandleToUlong(ClientId->UniqueThread) + // ); if (processName) PhDereferenceObject(processName);
refactor(bot-slash-commands.c): simplify input read
#include <string.h> #include <assert.h> #include <errno.h> -#include <inttypes.h> /* PRIu64 */ +#include <inttypes.h> /* SCNu64, PRIu64 */ #include "discord.h" @@ -115,7 +115,7 @@ void on_interaction_create(struct discord *client, gender = value; } else if (0 == strcmp("favorite", name)) { - sscanf(value, "%" PRIu64, &channel_id); + sscanf(value, "%" SCNu64, &channel_id); } } @@ -165,9 +165,7 @@ int main(int argc, char *argv[]) "https://discord.com/developers/applications\n"); do { printf("Application ID:\n"); - char input[32]; - fgets(input, sizeof(input), stdin); - g_application_id = strtoull(input, NULL, 10); + fscanf(stdin, "%llu", &g_application_id); } while (!g_application_id || errno == ERANGE); printf(
disable keywords in /etc/hosts update example for BOS
@@ -12,7 +12,7 @@ your SMS host name is resolvable locally. Depending on the manner in which you installed the BOS, there may be an adequate entry already defined in \path{/etc/hosts}. If not, the following addition can be used to identify your SMS host. -\begin{lstlisting}[language=bash] +\begin{lstlisting}[language=bash,keywords={}] [sms](*\#*) echo ${sms_ip} ${sms_name} >> /etc/hosts \end{lstlisting}
rms/slurm: testing build without pmix
%include %{_sourcedir}/OHPC_macros %global _with_mysql 1 -%global _with_pmix --with-pmix=%{OHPC_ADMIN}/pmix +#global _with_pmix --with-pmix=%{OHPC_ADMIN}/pmix %global _with_hwloc 1 %global _with_numa 1
Change meaning of nanoseconds field in UTC Time msg (no change in msg_id).
@@ -122,12 +122,12 @@ definitions: - seconds: type: u8 units: seconds - desc: seconds of minute (range 0-60) + desc: seconds of minute (range 0-60) rounded down - ns: - type: s32 + type: u32 units: nanoseconds - desc: Nanosecond residual of millisecond-rounded TOW (ranges - from -500000 to 500000) + desc: nanosecond in current second + (range 0-1000000000) - MSG_DOPS: id: 0x0208
Fixed mac os x env
@@ -9,14 +9,14 @@ if [[ $TRAVIS_OS_NAME == 'osx' ]]; then py27) # Install some custom Python 2.7 requirements on OS X echo "No specific requirements on osx for now" - easy_install pip + easy_install --user pip pip install --user nose ;; py36) # Install some custom Python 3.6 requirements on OS X echo "No specific requirements on osx for now" brew update - brew install python3 + brew upgrade python virtualenv venv -p python3 source venv/bin/activate pip install --user nose numpy
move rounded-ending from lv_arc.c to lv_draw.arc.c
*********************/ #include "lv_draw_arc.h" #include "lv_draw_mask.h" +#include "../lv_misc/lv_math.h" // LV_TRIGO_SHIFT /********************* * DEFINES @@ -69,7 +70,6 @@ void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, cons lv_draw_mask_remove_id(mask_angle_id); - // draw rounded-ending if(style->line.rounded) { circle_style.body.main_color = style->line.color; circle_style.body.grad_color = style->line.color;
fix(sdio_slave): fix the intr_recv issue that trigger receiving too fast cause assertion failed. also fix a race risk issue when recycle receiving buffers.
@@ -187,7 +187,7 @@ typedef struct { /*------- receiving ---------------*/ buf_stailq_t recv_link_list; // now ready to/already hold data buf_tailq_t recv_reg_list; // removed from the link list, registered but not used now - buf_desc_t* recv_cur_ret; + volatile buf_desc_t* recv_cur_ret; // next desc to return, NULL if all loaded descriptors are returned portMUX_TYPE recv_spinlock; } sdio_context_t; @@ -1137,8 +1137,6 @@ static void sdio_intr_recv(void* arg) portBASE_TYPE yield = 0; if ( SLC.slc0_int_raw.tx_done ) { SLC.slc0_int_clr.tx_done = 1; - assert( context.recv_cur_ret != NULL ); - while ( context.recv_cur_ret && context.recv_cur_ret->owner == 0 ) { // This may cause the ``cur_ret`` pointer to be NULL, indicating the list is empty, // in this case the ``tx_done`` should happen no longer until new desc is appended. @@ -1163,15 +1161,24 @@ esp_err_t sdio_slave_recv_load_buf(sdio_slave_buf_handle_t handle) desc->owner = 1; desc->not_receiving = 0; //manually remove the prev link (by set not_receiving=0), to indicate this is in the queue - // 1. If all desc are returned in the ISR, the pointer is moved to NULL. The pointer is set to the newly appended desc here. - // 2. If the pointer is move to some not-returned desc (maybe the one appended here), do nothing. - // The ``cur_ret`` pointer must be checked and set after new desc appended to the list, or the pointer setting may fail. + buf_desc_t *const tail = STAILQ_LAST(queue, buf_desc_s, qe); + STAILQ_INSERT_TAIL( queue, desc, qe ); - if ( context.recv_cur_ret == NULL ) { + if (tail == NULL || (tail->owner == 0)) { + //in this case we have to set the ret pointer + if (tail != NULL) { + /* if the owner of the tail is returned to the software, the ISR is + * expect to write this pointer to NULL in a short time, wait until + * that and set new value for this pointer + */ + while (context.recv_cur_ret != NULL) {} + } + assert(context.recv_cur_ret == NULL); context.recv_cur_ret = desc; } + assert(context.recv_cur_ret != NULL); - if ( desc == STAILQ_FIRST(queue) ) { + if (tail == NULL) { //no one in the ll, start new ll operation. SLC.slc0_tx_link.addr = (uint32_t)desc; SLC.slc0_tx_link.start = 1;
Follow meson guidlines for static/shared libs Use only one library definition for faster builds.
@@ -124,12 +124,7 @@ core_image = custom_target('core_image', output : 'core_image.gen.c', command : [janet_boot, '@OUTPUT@', 'JANET_PATH', janet_path, 'JANET_HEADERPATH', header_path]) -libjanet = shared_library('janet', core_src, core_image, - include_directories : incdir, - dependencies : [m_dep, dl_dep], - install : true) - -libjanet_static = static_library('janet', core_src, core_image, +libjanet = library('janet', core_src, core_image, include_directories : incdir, dependencies : [m_dep, dl_dep], install : true) @@ -186,10 +181,8 @@ endforeach run_target('repl', command : [janet_nativeclient]) # For use as meson subproject (wrap) -janet_shared_dep = declare_dependency(include_directories : incdir, +janet_dep = declare_dependency(include_directories : incdir, link_with : libjanet) -janet_static_dep = declare_dependency(include_directories : incdir, - link_with : libjanet_static) # Installation install_man('janet.1')
mesh/net.c: replace dup_cache size magic value
@@ -86,7 +86,7 @@ struct bt_mesh_net bt_mesh = { #endif }; -static u32_t dup_cache[4]; +static u32_t dup_cache[MYNEWT_VAL(BLE_MESH_MSG_CACHE_SIZE)]; static int dup_cache_next; static bool check_dup(struct os_mbuf *data)
ocvalidate: Forgotten codestyle cleanup
@@ -60,7 +60,12 @@ CheckConfig ( return ErrorCount; } -int ENTRY_POINT(int argc, const char *argv[]) { +INT32 +ENTRY_POINT ( + IN INT32 Argc, + IN CONST CHAR8 *Argv[] + ) +{ UINT8 *ConfigFileBuffer; UINT32 ConfigFileSize; CONST CHAR8 *ConfigFileName; @@ -83,15 +88,15 @@ int ENTRY_POINT(int argc, const char *argv[]) { // // Print usage. // - if (argc != 2) { - DEBUG ((DEBUG_ERROR, "Usage: %a <path/to/config.plist>\n\n", argv[0])); + if (Argc != 2) { + DEBUG ((DEBUG_ERROR, "Usage: %a <path/to/config.plist>\n\n", Argv[0])); return -1; } // // Read config file (Only one single config is supported). // - ConfigFileName = argv[1]; + ConfigFileName = Argv[1]; ConfigFileBuffer = UserReadFile (ConfigFileName, &ConfigFileSize); if (ConfigFileBuffer == NULL) { DEBUG ((DEBUG_ERROR, "Failed to read %a\n", ConfigFileName)); @@ -147,7 +152,12 @@ int ENTRY_POINT(int argc, const char *argv[]) { return 0; } -INT32 LLVMFuzzerTestOneInput(CONST UINT8 *Data, UINTN Size) { +INT32 +LLVMFuzzerTestOneInput ( + IN CONST UINT8 *Data, + IN UINTN Size + ) +{ VOID *NewData; OC_GLOBAL_CONFIG Config;
out_stackdriver: fix gce metadata header length (CID 185754)
@@ -54,7 +54,7 @@ static int fetch_metadata(struct flb_upstream *ctx, char *uri, flb_http_buffer_size(c, 4096); flb_http_add_header(c, "User-Agent", 10, "Fluent-Bit", 10); - flb_http_add_header(c, "Content-Type", 12, "application/text", 20); + flb_http_add_header(c, "Content-Type", 12, "application/text", 16); flb_http_add_header(c, "Metadata-Flavor", 15, "Google", 6); /* Send HTTP request */
Add python macros to allow OHPC-style builds of multiple python flavored packages from a single spec
@@ -59,6 +59,7 @@ BuildRequires: ohpc-buildroot %{!?compiler_family: %global compiler_family gnu7} %{!?mpi_family: %global mpi_family openmpi3} +%{!?python_family: %global python_family python3} # Compiler dependencies %if 0%{?ohpc_compiler_dependent} == 1 @@ -115,9 +116,32 @@ Requires: openmpi3-%{compiler_family}%{PROJ_DELIM} %endif %endif +# Python dependencies and macros +%if 0%{?ohpc_python_dependent} == 1 +%if "%{python_family}" == "python3" +%global __python %__python3 +%global python_lib_dir python3.4 +%if "%{rhel_version}" == "700" +%global python_prefix python34 +%endif +%if 0%{?suse_version} +%global python_prefix python3 +%endif +%endif +%if "%{python_family}" == "python2" +%global python_lib_dir python2.7 +%global python_prefix python +%endif +BuildRequires: %{python_prefix}-devel +BuildRequires: %{python_prefix}-setuptools +BuildRequires: python-rpm-macros +Requires: %{python_prefix} +%endif + %global ohpc_setup_compiler %{expand:\ . %{OHPC_ADMIN}/ohpc/OHPC_setup_compiler %{compiler_family} \ %if 0%{?ohpc_mpi_dependent} == 1 \ . %{OHPC_ADMIN}/ohpc/OHPC_setup_mpi %{mpi_family} \ %endif \ } +
Fix detection of ktls support in cross-compile environment on Linux Fixes
@@ -1709,20 +1709,13 @@ unless ($disabled{devcryptoeng}) { unless ($disabled{ktls}) { $config{ktls}=""; + my $cc = $config{CROSS_COMPILE}.$config{CC}; if ($target =~ m/^linux/) { - my $usr = "/usr/$config{cross_compile_prefix}"; - chop($usr); - if ($config{cross_compile_prefix} eq "") { - $usr = "/usr"; - } - my $minver = (4 << 16) + (13 << 8) + 0; - my @verstr = split(" ",`cat $usr/include/linux/version.h | grep LINUX_VERSION_CODE`); - - if ($verstr[2] < $minver) { + system("printf '#include <sys/types.h>\n#include <linux/tls.h>' | $cc -E - >/dev/null 2>&1"); + if ($? != 0) { disable('too-old-kernel', 'ktls'); } } elsif ($target =~ m/^BSD/) { - my $cc = $config{CROSS_COMPILE}.$config{CC}; system("printf '#include <sys/types.h>\n#include <sys/ktls.h>' | $cc -E - >/dev/null 2>&1"); if ($? != 0) { disable('too-old-freebsd', 'ktls');
added `make ${TEST}-exec` target for integ tests New target to exec in an existing test container.
@@ -69,13 +69,14 @@ all: fi $(TESTS): - @$(MAKE) -s $(@)-build + @[ -n "$(NOBUILD)" ] || $(MAKE) -s $(@)-build @echo @echo "===================================================================" @echo " $(shell date)" @echo " Running \"$@\" Test" @echo "===================================================================" - @time $(COMPOSE) run --rm $@ || { echo >&2 "error: $(@) test failed."; exit 1; } + @time $(COMPOSE) run --rm --name scope-$(@)-it $@ || \ + { echo >&2 "error: $(@) test failed."; exit 1; } build: $(addsuffix -build, $(TESTS)) @@ -123,13 +124,24 @@ push: $(addsuffix -push, $(TESTS)) %-shell: @[ -n "$(filter $(@:%-shell=%),$(TESTS))" ] || \ { echo >&2 "error: $(@:%-shell=%) isn't a test."; exit 1; } - @$(MAKE) -s $(@:%-shell=%)-build + @[ -n "$(NOBUILD)" ] || $(MAKE) -s $(@:%-shell=%)-build @echo @echo "===================================================================" @echo " $(shell date)" @echo " Shell in Container for \"$(@:%-shell=%)\" Test" @echo "===================================================================" - @$(COMPOSE) run --rm --service-ports $(@:%-shell=%) $(CMD) + @$(COMPOSE) run --rm --service-ports --name scope-$(@:%-shell=%)-it $(@:%-shell=%) $(CMD) + +%-exec: CMD?=/bin/bash +%-exec: + @[ -n "$(filter $(@:%-exec=%),$(TESTS))" ] || \ + { echo >&2 "error: $(@:%-exec=%) isn't a test."; exit 1; } + @echo + @echo "===================================================================" + @echo " $(shell date)" + @echo " Exec'ing into Container for \"$(@:%-exec=%)\" Test" + @echo "===================================================================" + @$(DOCKER) exec -it scope-$(@:%-exec=%)-it $(CMD) .PHONY: help all build push $(TESTS) %-build %-push %-shell
fix build error for shadowing a global declaration warning: declaration of 'index' shadows a global declaration
@@ -406,10 +406,10 @@ struct s2n_ticket_key *s2n_get_ticket_encrypt_decrypt_key(struct s2n_config *con return s2n_set_get(config->ticket_keys, encrypt_decrypt_keys_index[0]); } - int8_t index; - GUARD_PTR(index = s2n_compute_weight_of_encrypt_decrypt_keys(config, encrypt_decrypt_keys_index, num_encrypt_decrypt_keys, now)); + int8_t idx; + GUARD_PTR(idx = s2n_compute_weight_of_encrypt_decrypt_keys(config, encrypt_decrypt_keys_index, num_encrypt_decrypt_keys, now)); - return s2n_set_get(config->ticket_keys, index); + return s2n_set_get(config->ticket_keys, idx); } /* This function is used in s2n_decrypt_session_ticket in order for s2n to
Add missing assertion in lstFind().
@@ -185,6 +185,7 @@ lstFind(const List *this, const void *item) FUNCTION_TEST_END(); ASSERT(this != NULL); + ASSERT(this->comparator != NULL); ASSERT(item != NULL); if (this->sortOrder == sortOrderAsc)
gitlab/ci: reverting libfec CI integration for the time being
@@ -19,8 +19,8 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup libfec - run: git clone https://github.com/jgaeddert/libfec.git && cd libfec && ./configure && make && sudo make install + #- name: Setup libfec + # run: git clone https://github.com/jgaeddert/libfec.git && cd libfec && ./configure && make && sudo make install - name: bootstrap run: ./bootstrap.sh
add deep sleep tracking for CC26xx
@@ -185,7 +185,7 @@ wake_up(void) { lpm_registered_module_t *module; - ENERGEST_SWITCH(ENERGEST_TYPE_LPM, ENERGEST_TYPE_CPU); + ENERGEST_SWITCH(ENERGEST_TYPE_DEEP_LPM, ENERGEST_TYPE_CPU); /* Sync so that we get the latest values before adjusting recharge settings */ ti_lib_sys_ctrl_aon_sync(); @@ -485,7 +485,7 @@ deep_sleep(void) ti_lib_pwr_ctrl_source_set(PWRCTRL_PWRSRC_ULDO); } - ENERGEST_SWITCH(ENERGEST_TYPE_CPU, ENERGEST_TYPE_LPM); + ENERGEST_SWITCH(ENERGEST_TYPE_CPU, ENERGEST_TYPE_DEEP_LPM); /* Sync the AON interface to ensure all writes have gone through. */ ti_lib_sys_ctrl_aon_sync();
Update grammer issues a bit
@@ -69,12 +69,12 @@ The following steps describe how to build and run buildroot Linux on the prototy Building Linux with FireMarshal ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Since the prototype does not have a block device we build Linux with the rootfs built into the binary (otherwise known as "initramfs" or "nodisk" version of Linux). +Since the prototype does not have a block device, we build Linux with the rootfs built into the binary (otherwise known as "initramfs" or "nodisk" version of Linux). To make building this type of Linux binary easy, we will use the FireMarshal platform (see :ref:`fire-marshal` for more information). 1. Setup FireMarshal (see :ref:`fire-marshal` on the initial setup). -2. By default FireMarshal is setup to work with FireSim. - Instead we want to target the prototype platform. +2. By default, FireMarshal is setup to work with FireSim. + Instead, we want to target the prototype platform. This is done by switching the FireMarshal "board" from "firechip" to "prototype" using ``marshal-config.yaml``: .. code-block:: shell @@ -83,8 +83,8 @@ To make building this type of Linux binary easy, we will use the FireMarshal pla .. Note:: Refer to the FireMarshal docs on more ways to set the board differently through environment variables and more. -3. Next build the workload (a.k.a buildroot Linux) with nodisk with FireMarshal. - For the rest of these steps we will assume you are using the base ``br-base.json`` workload. +3. Next, build the workload (a.k.a buildroot Linux) with nodisk with FireMarshal. + For the rest of these steps, we will assume you are using the base ``br-base.json`` workload. This workload has basic support for GPIO and SPI drivers but you can build off it in different workloads (refer to FireMarshal docs on workload inheritance). .. code-block:: shell @@ -92,7 +92,7 @@ To make building this type of Linux binary easy, we will use the FireMarshal pla ./marshal -v -d build br-base.json # here the -d indicates --nodisk or initramfs .. Note:: Using the "board" FireMarshal functionality allows any child workload depending on ``br-base.json`` to use the "prototype" ``br-base.json`` rather than the FireChip version. - Thus you can re-use existing workloads that depend on ``br-base.json`` on the prototype platform by just changing the "board"! + Thus, you can re-use existing workloads that depend on ``br-base.json`` on the prototype platform by just changing the "board"! 4. The last step to generate the proper binary is to flatten it. This is done by using FireMarshal's install feature and will produce a ``*-flat`` binary in the ``$PATH_TO_FIREMARSHAL/images`` directory (in our case ``br-base-bin-nodisk-flat``). @@ -120,7 +120,8 @@ Additionally, these instructions assume you are using Linux with ``sudo`` privil Change the default partition alignment to `1` so you can write to sector `34`. Do this with the `l` command. -3. Create the new GPT with `o`. Click yes on all the prompts. +3. Create the new GPT with `o`. + Click yes on all the prompts. 4. Create a 512MiB partition to store the Linux binary (this can be smaller but it must be larger than the size of the Linux binary). Use `n` and select sector 34, with size `+1048576` (corresponding to 512MiB).
[docs] [ci skip] Alon's comments
@@ -11,7 +11,8 @@ The following pages introduce the generators integrated with the Chipyard framew Chipyard bundles the source code for the generators, under the ``generators`` directory. It builds them from source each time (although the build system will cache results if they have not changed), -so changes to the generators themselves will automatically be used when building with Chipyard. +so changes to the generators themselves will automatically be used when building with Chipyard and propagate to software simulation, FPGA-accelerated simulation, and VLSI flows. + .. toctree:: :maxdepth: 2
[awm2] Add dependency on preferences messages crate
@@ -16,6 +16,7 @@ awm_messages = {path = "../awm_messages" } libgui = { path = "../libgui", default-features = false } mouse_driver_messages = {path = "../mouse_driver_messages" } kb_driver_messages = {path = "../kb_driver_messages" } +preferences_messages = {path = "../preferences_messages" } file_manager_messages = {path = "../file_manager_messages" } # PT: Just for holding a global RNG for random colors, not vital... rand = { version = "0.8.5", default-features = false, features = ["small_rng"] }
Plugins Framework: Use fence for code snippet
@@ -113,8 +113,10 @@ Plugins can also export arbitrary additional functions. To export it, simply add another `exports` symbol to the contract: +```c keyNew ("system/elektra/modules/dump/exports/checkconf", KEY_FUNC, - elektraCcodeCheckConf, KEY_END), + elektraCcodeCheckConf, KEY_END); +``` `checkconf` is the most important function that is not available as built-in function. It is used to validate
msresamp/autotest: adjusting rate in copy() test to exercise stages
@@ -135,11 +135,11 @@ void autotest_msresamp_crcf_num_output_7(){ testbench_msresamp_crcf_num_output(e void autotest_msresamp_crcf_copy() { // create initial object - float rate = 0.71239213987520f; + float rate = 0.071239213987520f; msresamp_crcf q0 = msresamp_crcf_create(rate, 60.0f); // run samples through filter - unsigned int i, nw_0, nw_1, buf_len = 240; + unsigned int i, nw_0, nw_1, buf_len = 640; float complex buf [buf_len]; // input buffer float complex buf_0[buf_len]; float complex buf_1[buf_len];
performance fix for
@@ -150,10 +150,11 @@ void MaskFastaFromBed::PrettyPrintChrom(ofstream &out, string chrom, const strin CHRPOS seqLength = sequence.size(); - out << ">" << chrom << endl; + out << ">" << chrom << '\n'; for(CHRPOS i = 0; i < seqLength; i += (CHRPOS)width) { - if (i + width < seqLength) out << sequence.substr(i, width) << endl; - else out << sequence.substr(i, seqLength-i) << endl; + if (i + width < seqLength) out << sequence.substr(i, width) << '\n'; + else out << sequence.substr(i, seqLength-i) << '\n'; } + out.flush(); }
Use STRDEF() instead of STR() in command/help module. STRDEF() is more efficient since this is a constant string.
@@ -330,7 +330,7 @@ helpRender(const Buffer *const helpData) optionData[optionId] = (HelpOptionData) { .internal = pckReadBoolP(pckHelp), - .section = pckReadStrP(pckHelp, .defaultValue = STR("general")), + .section = pckReadStrP(pckHelp, .defaultValue = STRDEF("general")), .summary = pckReadStrP(pckHelp), .description = pckReadStrP(pckHelp), };
Fix uninitialized lock in hostepoll.c
@@ -147,6 +147,7 @@ static oe_fd_t* _epoll_create1(oe_device_t* device_, int32_t flags) epoll_t* epoll = NULL; device_t* device = _cast_device(device_); oe_host_fd_t retval; + oe_mutexattr_t attr; oe_errno = 0; @@ -167,6 +168,15 @@ static oe_fd_t* _epoll_create1(oe_device_t* device_, int32_t flags) epoll->magic = EPOLL_MAGIC; epoll->host_fd = retval; + if (oe_mutexattr_init(&attr) != OE_OK) + OE_RAISE_ERRNO(OE_EFAULT); + + if (oe_mutexattr_settype(&attr, OE_MUTEX_RECURSIVE) != OE_OK) + OE_RAISE_ERRNO(OE_EFAULT); + + if (oe_mutex_init(&epoll->lock, &attr) != OE_OK) + OE_RAISE_ERRNO(OE_EFAULT); + ret = &epoll->base; epoll = NULL;
scripts: change logic how to find source dir
-# Usage: cd build && source run_dev_shell +if [ ! -f CMakeCache.txt ] +then + echo "You must be within the build folder before you source this script" + echo + echo "Usage: cd build && source run_dev_env" + return +fi + # common configure script -SCRIPTS_DIR=$(dirname "$0") +ELEKTRA_DIR=`grep "^Elektra_SOURCE_DIR" CMakeCache.txt | cut -f 2 -d "="` +SCRIPTS_DIR="${ELEKTRA_DIR}/scripts" . "${SCRIPTS_DIR}/include-common" BUILD=`pwd` -if [ -d "$1" ] -then - BUILD=$(readlink -f "$1") -fi # set paths if [ -z "$PATH" ]
removes old event-log declarations
uv_mutex_t mex_u; // mutex for non-daemon term state } u3_utat; - /* u3_uled: event log header. - */ - typedef struct { - c3_l mag_l; // mug of log format, 'a', 'b'... - c3_w kno_w; // kernel number validated with - c3_l sal_l; // salt for passcode - c3_l key_l; // mug of crypto key, or 0 - c3_l sev_l; // host process identity - c3_l tno_l; // terminal count in host - } u3_uled; - - /* u3_olar: event log trailer, old version. - */ - typedef struct { - c3_w syn_w; // must equal mug of address - c3_w ent_w; // event sequence number - c3_w len_w; // word length of this event - c3_w mug_w; // mug of entry - } u3_olar; - - /* u3_ular: event log trailer. - */ - typedef struct { - c3_w syn_w; // must equal mug of address - c3_d ent_d; // event sequence number - c3_w len_w; // word length of this event - c3_w mug_w; // mug of entry - c3_w tem_w; // raft term of event - c3_w typ_w; // type of event, %ra|%ov - } u3_ular; - - /* u3_ulog: unix event log. - */ - typedef struct { - c3_i fid_i; // file descriptor - c3_d len_d; // length in words - } u3_ulog; - struct _u3_umon; struct _u3_udir; struct _u3_ufil;
file-server: since %glob hash changes per commit, cache for 1wk instead of 1da
[not-found:gen %.n] :_ public.u.content =/ mime-type=@t (rsh 3 (crip <p.u.data>)) - :: Should maybe inspect to see how long cache should hold - :: =/ headers :~ content-type+mime-type - max-1-da:gen + max-1-wk:gen 'service-worker-allowed'^'/' == [[200 headers] `q.u.data]
pretty-print spacing for PTScotch
@@ -700,9 +700,9 @@ echo Libraries: fi if test "x$enable_ptscotch" = "xyes"; then - echo ' 'PTScotch.................... : enabled + echo ' 'PTScotch.................. : enabled else - echo ' 'PTScotch.................... : disabled + echo ' 'PTScotch.................. : disabled fi if test "x$enable_R" = "xyes"; then
Apply CODATA/IAU constants
@@ -31,22 +31,23 @@ extern "C" { #define K_PIVOT 0.05 /** - * Lightspeed / H0 in units of Mpc/h + * Lightspeed / H0 in units of Mpc/h (from CODATA 2014) */ #define CLIGHT_HMPC 2997.92458 //H0^-1 in Mpc/h /** * Newton's gravitational constant in units of m^3/Kg/s^2 */ -//#define GNEWT 6.6738e-11 //(from PDG 2013) in m^3/Kg/s^2 -#define GNEWT 6.67428e-11 // CLASS VALUE +//#define GNEWT 6.6738e-11 /(from PDG 2013) in m^3/Kg/s^2 +//#define GNEWT 6.67428e-11 // CLASS VALUE +#define GNEWT 6.67408e-11 // from CODATA 2014 /** * Solar mass in units of kg (from GSL) */ -#define SOLAR_MASS GSL_CONST_MKSA_SOLAR_MASS +//#define SOLAR_MASS GSL_CONST_MKSA_SOLAR_MASS //#define SOLAR_MASS 1.9885e30 //(from PDG 2015) in Kg - +#define SOLAR_MASS 1.9884754153381438e+30 //from IAU 2015 /** * Mpc to meters (from PDG 2013) */ @@ -65,27 +66,31 @@ extern "C" { /** * Boltzmann constant in units of J/K */ -#define KBOLTZ GSL_CONST_MKSA_BOLTZMANN +//#define KBOLTZ GSL_CONST_MKSA_BOLTZMANN +#define KBOLTZ 1.38064852e-23 //from CODATA 2014 /** * Stefan-Boltzmann constant in units of kg/s^3 / K^4 */ -#define STBOLTZ GSL_CONST_MKSA_STEFAN_BOLTZMANN_CONSTANT - +//#define STBOLTZ GSL_CONST_MKSA_STEFAN_BOLTZMANN_CONSTANT +#define STBOLTZ 5.670367e-8 //from CODATA 2014 /** * Planck's constant in units kg m^2 / s */ -#define HPLANCK GSL_CONST_MKSA_PLANCKS_CONSTANT_H +//#define HPLANCK GSL_CONST_MKSA_PLANCKS_CONSTANT_H +#define HPLANCK 6.626070040e-34 //from CODATA 2014 /** * The speed of light in m/s */ -#define CLIGHT GSL_CONST_MKSA_SPEED_OF_LIGHT +//#define CLIGHT GSL_CONST_MKSA_SPEED_OF_LIGHT +#define CLIGHT 299792458.0 //from CODATA 2014 /** * Electron volt to Joules convestion */ -#define EV_IN_J GSL_CONST_MKSA_ELECTRON_VOLT +//#define EV_IN_J GSL_CONST_MKSA_ELECTRON_VOLT +#define EV_IN_J 1.6021766208e-19 //from CODATA 2014 /** * Temperature of the CMB in K
idf.py: Detect symlinks on Windows during fullclean Closes
@@ -327,6 +327,26 @@ def reconfigure(action, args): _ensure_build_directory(args, True) +def _delete_windows_symlinks(directory): + """ + It deletes symlinks recursively on Windows. It is useful for Python 2 which doesn't detect symlinks on Windows. + """ + deleted_paths = [] + if os.name == 'nt': + import ctypes + for root, dirnames, filenames in os.walk(directory): + for d in dirnames: + full_path = os.path.join(root, d) + try: + full_path = full_path.decode('utf-8') + except Exception: + pass + if ctypes.windll.kernel32.GetFileAttributesW(full_path) & 0x0400: + os.rmdir(full_path) + deleted_paths.append(full_path) + return deleted_paths + + def fullclean(action, args): build_dir = args.build_dir if not os.path.isdir(build_dir): @@ -345,8 +365,16 @@ def fullclean(action, args): if os.path.exists(red): raise FatalError("Refusing to automatically delete files in directory containing '%s'. Delete files manually if you're sure." % red) # OK, delete everything in the build directory... + # Note: Python 2.7 doesn't detect symlinks on Windows (it is supported form 3.2). Tools promising to not + # follow symlinks will actually follow them. Deleting the build directory with symlinks deletes also items + # outside of this directory. + deleted_symlinks = _delete_windows_symlinks(build_dir) + if args.verbose and len(deleted_symlinks) > 1: + print('The following symlinks were identified and removed:\n%s' % "\n".join(deleted_symlinks)) for f in os.listdir(build_dir): # TODO: once we are Python 3 only, this can be os.scandir() f = os.path.join(build_dir, f) + if args.verbose: + print('Removing: %s' % f) if os.path.isdir(f): shutil.rmtree(f) else:
klog: Fix warnings JIRA:
#define KLOG_BUFSZ (2 * SIZE_PAGE) #endif - #define TCGETS 0x405c7401 @@ -59,6 +58,7 @@ static struct { klog_reader_t *readers; } klog_common; +#if KLOG_ENABLE static int _fifo_empty(void) { @@ -93,13 +93,6 @@ static char _fifo_get(offs_t off) } -void _klog_init(void) -{ - hal_memset(&klog_common, 0, sizeof(klog_common)); - proc_lockInit(&klog_common.lock); -} - - static klog_reader_t *klog_readerFind(unsigned pid) { klog_reader_t *r, *ret = NULL; @@ -269,37 +262,6 @@ static int klog_devctl(msg_t *msg) } -int klog_write(const char *data, size_t len) -{ -#if KLOG_ENABLE - int i = 0, overwrite = 0; - char c; - - proc_lockSet(&klog_common.lock); - - if (klog_common.tail + len >= klog_common.head + KLOG_BUFSZ) - overwrite = 1; - - for (i = 0; i < len; ++i) - _fifo_push(data[i]); - - if (overwrite) { - do { - c = _fifo_pop(); - } while (c != '\n' && c != '\0' && !_fifo_empty()); - } - - if (i > 0) - _klog_updateReaders(); - proc_lockClear(&klog_common.lock); -#else - hal_consolePrint(ATTR_NORMAL, data); -#endif /* KLOG_ENABLE */ - - return len; -} - - static int klog_readerBlock(klog_reader_t *r, msg_t *msg, unsigned long rid) { klog_readMsg_t *rmsg; @@ -374,6 +336,46 @@ static void msgthr(void *arg) } } +#endif /* KLOG_ENABLE */ + + +int klog_write(const char *data, size_t len) +{ +#if KLOG_ENABLE + int i = 0, overwrite = 0; + char c; + + proc_lockSet(&klog_common.lock); + + if (klog_common.tail + len >= klog_common.head + KLOG_BUFSZ) + overwrite = 1; + + for (i = 0; i < len; ++i) + _fifo_push(data[i]); + + if (overwrite) { + do { + c = _fifo_pop(); + } while (c != '\n' && c != '\0' && !_fifo_empty()); + } + + if (i > 0) + _klog_updateReaders(); + proc_lockClear(&klog_common.lock); +#else + hal_consolePrint(ATTR_NORMAL, data); +#endif /* KLOG_ENABLE */ + + return len; +} + + +void _klog_init(void) +{ + hal_memset(&klog_common, 0, sizeof(klog_common)); + proc_lockInit(&klog_common.lock); +} + void _klog_initSrv(void) {