message
stringlengths 6
474
| diff
stringlengths 8
5.22k
|
---|---|
README.md: Use version 2.04.70 | @@ -24,19 +24,19 @@ Packages for Qt4 and Raspbian Wheezy are available but not described here.
##### Install deCONZ and development package
1. Download deCONZ package
- wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.04.67-qt5.deb
+ wget http://www.dresden-elektronik.de/rpi/deconz/beta/deconz-2.04.70-qt5.deb
2. Install deCONZ package
- sudo dpkg -i deconz-2.04.67-qt5.deb
+ sudo dpkg -i deconz-2.04.70-qt5.deb
3. Download deCONZ development package
- wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.04.67.deb
+ wget http://www.dresden-elektronik.de/rpi/deconz-dev/deconz-dev-2.04.70.deb
4. Install deCONZ development package
- sudo dpkg -i deconz-dev-2.04.67.deb
+ sudo dpkg -i deconz-dev-2.04.70.deb
##### Get and compile the plugin
1. Checkout the repository
@@ -46,7 +46,7 @@ Packages for Qt4 and Raspbian Wheezy are available but not described here.
2. Checkout related version tag
cd deconz-rest-plugin
- git checkout -b mybranch V2_04_67
+ git checkout -b mybranch V2_04_70
3. Compile the plugin
|
Update: should be dep var | *setopname 9 ^say
//how to calculate bird view area of car
-<((<(car * $x) --> length> &/ <(car * $y) --> width>) &/ <({SELF} * ($x * $y)) --> ^mul>) =/> <mul --> [executed]>>.
+<((<(car * #1) --> length> &/ <(car * #2) --> width>) &/ <({SELF} * (#1 * #2)) --> ^mul>) =/> <mul --> [executed]>>.
//comparison with parking lot of size 10
<((<mul --> [executed]> &/ <#1 --> result>) &/ <({SELF} * (#1 * 10)) --> ^smaller>) =/> <smaller --> [executed]>>.
//report comparison result
|
Fix for CVE-2019-20056, assertion failure problem(#126). Thanks to | @@ -5045,13 +5045,13 @@ static int stbi__shiftsigned(int v, int shift, int bits)
static unsigned int shift_table[9] = {
0, 0,0,1,0,2,4,6,0,
};
+ if (bits < 0 || bits > 8) return (0); /* error */
if (shift < 0)
v <<= -shift;
else
v >>= shift;
- STBI_ASSERT(v >= 0 && v < 256);
+ if (v < 0 || v >= 256) return (0);
v >>= (8-bits);
- if (bits < 0 || bits > 8) return (0); /* error */
return (int) ((unsigned) v * mul_table[bits]) >> shift_table[bits];
}
|
Encoding with packingType=grid_complex via codes_grib_util_set_spec (Part 1) | @@ -1413,8 +1413,10 @@ grib_handle* grib_util_set_spec2(grib_handle* h,
SET_STRING_VALUE("packingType", "grid_simple");
break;
case GRIB_UTIL_PACKING_TYPE_GRID_COMPLEX:
- if (strcmp(input_packing_type, "grid_complex") && !strcmp(input_packing_type, "grid_simple"))
+ if (!STR_EQUAL(input_packing_type, "grid_complex")) {
SET_STRING_VALUE("packingType", "grid_complex");
+ convertEditionEarlier=1;
+ }
break;
case GRIB_UTIL_PACKING_TYPE_JPEG:
/* Have to delay JPEG packing:
|
Fix typo in msvc warnings patch | @@ -600,7 +600,8 @@ if(WIN32)
set_target_properties(lovr PROPERTIES COMPILE_FLAGS "/wd4244 /MP")
else()
set_target_properties(lovr PROPERTIES COMPILE_FLAGS "-MP")
- # Excuse anonymous union for type punning set_source_files_properties(src/util.c PROPERTIES COMPILE_FLAGS /wd4146)
+ # Excuse anonymous union for type punning
+ set_source_files_properties(src/util.c PROPERTIES COMPILE_FLAGS /wd4146)
# Excuse unsigned negation for flag-magic bit math
set_source_files_properties(src/modules/audio/audio.c PROPERTIES COMPILE_FLAGS /wd4116)
endif()
|
Update aomp version back to 16.0-2 after rebase. | @@ -19,7 +19,7 @@ ROCM_VERSION=${ROCM_VERSION:-5.3.0}
# Set the AOMP VERSION STRING
AOMP_VERSION=${AOMP_VERSION:-"16.0"}
-AOMP_VERSION_MOD=${AOMP_VERSION_MOD:-"3"}
+AOMP_VERSION_MOD=${AOMP_VERSION_MOD:-"2"}
AOMP_VERSION_STRING=${AOMP_VERSION_STRING:-"$AOMP_VERSION-$AOMP_VERSION_MOD"}
export AOMP_VERSION_STRING AOMP_VERSION AOMP_VERSION_MOD ROCM_VERSION
|
remove debug stuff from example | @@ -10,7 +10,6 @@ require 'iodine'
if ENV["REDIS_URL"]
Iodine::PubSub.default = Iodine::PubSub::Redis.new(ENV["REDIS_URL"], ping: 10)
# Iodine.run_every(10000) { Iodine::Base.db_print_protected_objects }
- Iodine::PubSub.default.cmd("SET", "mycounter", 1) {|result| p result }
else
puts "* No Redis, it's okay, pub/sub will support the process cluster."
end
@@ -54,10 +53,6 @@ class WS_RedisPubSub
end
# perform the echo
def on_message client, data
- if ENV["REDIS_URL"]
- Iodine::PubSub.default.cmd("INCR", "mycounter") {|result| p result }
- Iodine::PubSub.default.cmd("GETSET", "last_message", data) {|result| p result }
- end
client.publish "chat", "#{@name}: #{data}"
end
def on_close client
|
Fix optional params support | @@ -544,7 +544,7 @@ sol::variadic_results RTTIHelper::ExecuteFunction(RED4ext::CBaseFunction* apFunc
std::vector<RED4ext::CStackType> callArgs(apFunc->params.size);
std::vector<uint32_t> callArgToParam(apFunc->params.size);
- auto callArgOffset = 0;
+ uint32_t callArgOffset = 0u;
for (auto i = 0u; i < apFunc->params.size; ++i)
{
@@ -567,25 +567,24 @@ sol::variadic_results RTTIHelper::ExecuteFunction(RED4ext::CBaseFunction* apFunc
}
else if (cpParam->flags.isOptional)
{
+ // Skip undefined optionals in the tail
if (aLuaArgOffset >= aLuaArgs.size())
- {
- callArgs.pop_back();
continue;
- }
- callArgs[callArgOffset] = Scripting::ToRED(aLuaArgs[aLuaArgOffset], cpParam->type, &s_scratchMemory);
+ sol::object argValue = aLuaArgs[aLuaArgOffset];
+ callArgs[callArgOffset] = Scripting::ToRED(argValue, cpParam->type, &s_scratchMemory);
+ // Skip incompatible value, assuming this optional is undefined
+ // and the value is intended for another param
if (!callArgs[callArgOffset].value)
- {
- callArgs.pop_back();
continue;
- }
++aLuaArgOffset;
}
else if (aLuaArgOffset < aLuaArgs.size())
{
- callArgs[callArgOffset] = Scripting::ToRED(aLuaArgs[aLuaArgOffset], cpParam->type, &s_scratchMemory);
+ sol::object argValue = aLuaArgs[aLuaArgOffset];
+ callArgs[callArgOffset] = Scripting::ToRED(argValue, cpParam->type, &s_scratchMemory);
++aLuaArgOffset;
}
@@ -630,7 +629,7 @@ sol::variadic_results RTTIHelper::ExecuteFunction(RED4ext::CBaseFunction* apFunc
// which actually does not need the 'this' object, you can trick it into calling it as long as you pass something for the handle
RED4ext::ScriptInstance pContext = apHandle ? apHandle : m_pPlayerSystem;
- RED4ext::CStack stack(pContext, callArgs.data(), callArgs.size(), hasReturnType ? &result : nullptr, 0);
+ RED4ext::CStack stack(pContext, callArgs.data(), callArgOffset, hasReturnType ? &result : nullptr, 0);
const auto success = apFunc->Execute(&stack);
|
stm32/boards/NUCLEO_F767ZI: Fix up comments about HCLK computation. | #define MICROPY_BOARD_EARLY_INIT NUCLEO_F767ZI_board_early_init
void NUCLEO_F767ZI_board_early_init(void);
-// HSE is 25MHz
-// VCOClock = HSE * PLLN / PLLM = 25 MHz * 432 / 25 = 432 MHz
-// SYSCLK = VCOClock / PLLP = 432 MHz / 2 = 216 MHz
-// USB/SDMMC/RNG Clock = VCOClock / PLLQ = 432 MHz / 9 = 48 MHz
+// HSE is 8MHz
#define MICROPY_HW_CLK_PLLM (4)
#define MICROPY_HW_CLK_PLLN (216)
#define MICROPY_HW_CLK_PLLP (RCC_PLLP_DIV2)
#define MICROPY_HW_CLK_PLLQ (9)
-
-// From the reference manual, for 2.7V to 3.6V
-// 151-180 MHz => 5 wait states
-// 181-210 MHz => 6 wait states
-// 211-216 MHz => 7 wait states
-#define MICROPY_HW_FLASH_LATENCY FLASH_LATENCY_7 // 210-216 MHz needs 7 wait states
+#define MICROPY_HW_FLASH_LATENCY (FLASH_LATENCY_7) // 210-216 MHz needs 7 wait states
// UART config
#define MICROPY_HW_UART2_TX (pin_D5)
|
Replace tabs with spaces in examples | /* Request data are sent to server once we are connected */
-uint8_t req_data[] = ""
+static const uint8_t
+req_data[] = ""
"GET / HTTP/1.1\r\n"
"Host: example.com\r\n"
"Connection: close\r\n"
@@ -31,7 +32,7 @@ conn_evt(esp_evt_t* evt) {
}
/* Connection closed event */
- case ESP_EVT_CONN_CLOSED: {
+ case ESP_EVT_CONN_CLOSE: {
printf("Connection closed!\r\n");
if (evt->evt.conn_active_closed.forced) { /* Was it forced by user? */
printf("Connection closed by user\r\n");
|
Android: update API levels | @@ -56,8 +56,8 @@ JAVA_PACKAGE_NAME = 'com.rhomobile.rhodes'
# For complete list of android API levels and its mapping to
# market names (such as "Android-1.5" etc) see output of
# command "android list targets"
-ANDROID_MIN_SDK_LEVEL = 19
-ANDROID_SDK_LEVEL = 26
+ANDROID_MIN_SDK_LEVEL = 21 #21 is the minimum API that supports arm64
+ANDROID_SDK_LEVEL = 29
ANDROID_PERMISSIONS = {
'audio' => ['RECORD_AUDIO', 'MODIFY_AUDIO_SETTINGS'],
|
vlib: fix cli process stack overflow
Type: fix
Some cli processes, including configuring an test flow
on an i40e interface consume more than the currently
available stack space. | @@ -2864,7 +2864,7 @@ unix_cli_file_add (unix_cli_main_t * cm, char *name, int fd)
static vlib_node_registration_t r = {
.function = unix_cli_process,
.type = VLIB_NODE_TYPE_PROCESS,
- .process_log2_n_stack_bytes = 17,
+ .process_log2_n_stack_bytes = 18,
};
r.name = name;
|
profile: round corners of view
fixes urbit/landscape#510 | @@ -10,7 +10,12 @@ export default function ProfileScreen(props: any) {
return (
<>
<Helmet defer={false}>
- <title>{ props.notificationsCount ? `(${String(props.notificationsCount) }) `: '' }Landscape - Profile</title>
+ <title>
+ {props.notificationsCount
+ ? `(${String(props.notificationsCount)}) `
+ : ''}
+ Landscape - Profile
+ </title>
</Helmet>
<Route
path={'/~profile/:ship/:edit?'}
@@ -21,15 +26,15 @@ export default function ProfileScreen(props: any) {
const contact = props.contacts?.[ship];
return (
- <Box height="100%" px={[0, 3]} pb={[0, 3]} borderRadius={1}>
+ <Box height='100%' px={[0, 3]} pb={[0, 3]} borderRadius={2}>
<Box
- height="100%"
- width="100%"
- borderRadius={1}
- bg="white"
+ height='100%'
+ width='100%'
+ borderRadius={2}
+ bg='white'
border={1}
- borderColor="washedGray"
- overflowY="auto"
+ borderColor='washedGray'
+ overflowY='auto'
flexGrow
>
<Box>
|
Use explicit pointer casting for c++ compatibility | @@ -121,12 +121,12 @@ static void redisLibevCleanup(void *privdata) {
static void redisLibevTimeout(EV_P_ ev_timer *timer, int revents) {
((void)revents);
- redisLibevEvents *e = timer->data;
+ redisLibevEvents *e = (redisLibevEvents*)timer->data;
redisAsyncHandleTimeout(e->context);
}
static void redisLibevSetTimeout(void *privdata, struct timeval tv) {
- redisLibevEvents *e = privdata;
+ redisLibevEvents *e = (redisLibevEvents*)privdata;
struct ev_loop *loop = e->loop;
((void)loop);
|
Release: Add information about Travis update | @@ -124,7 +124,13 @@ These notes are of interest for people developing Elektra:
- <<TODO>>
- <<TODO>>
- <<TODO>>
-- Travis now builds all (applicable) bindings by default again.
+- Our Travis build job now
+ - builds all (applicable) bindings by default again, and
+ - checks the formatting of CMake code via [`cmake-format`][]
+
+ .
+
+[`cmake-format`]: https://github.com/cheshirekow/cmake_format
## Fixes
|
Fix clang++-8 warning | @@ -3300,7 +3300,7 @@ int alpn_select_proto_cb(SSL *ssl, const unsigned char **out,
}
if (!config.quiet) {
- std::cerr << "Client did not present ALPN " << NGTCP2_ALPN_H3 + 1
+ std::cerr << "Client did not present ALPN " << &NGTCP2_ALPN_H3[1]
<< std::endl;
}
|
Use consistent syntax for referencing functions
Since this is used in some places but not all, we should probably use
backticks here. Or better yet, use proper links for doxygen or sphinx. | ///
/// Therefore the host should give a context hint for the operation it executes.
///
-/// Scenarios for save() function:
+/// Scenarios for the state save() function:
///
/// - Context `CLAP_STATE_CONTEXT_PROJECT`: The plugin stores all aound settings including
/// the project specific settings (like the hardware's id)
/// a new instance of the plugin to be presented as 'duplicate' effectively, like
/// using the next index of an enumeration, a channel etc.
///
-/// Scenarios for the load() function:
+/// Scenarios for the state load() function:
///
/// - Context `CLAP_STATE_CONTEXT_PROJECT`: The plugin restores all aound settings including
/// the project specific settings (like the hardware's id). If no project specific settings
@@ -67,12 +67,14 @@ enum clap_plugin_state_context_type {
};
typedef struct clap_plugin_state_context {
- // Hosts that use the set_state_context() function should *always* call it directly before
- // ->save() or load(). Plugins that implement the set() function should
- // keep the last assigned context around, regardless of the frequency of invocations.
+ // Hosts that use the set_state_context() function should *always* call it
+ // directly before clap_plugin_state->save() or clap_plugin_state->load().
+ // Plugins that implement the clap_plugin_state_context->set() function
+ // should keep the last assigned context around, regardless of the frequency
+ // of invocations.
- // Assign the context for subsequent calls to ->save() or load() of the
- // clap_plugin_state extension.
+ // Assign the context for subsequent calls to clap_plugin_state->save() or
+ // clap_plugin_state->load() of the clap_plugin_state extension.
// [main-thread]
void (*set)(const clap_plugin_t *plugin, uint32_t context);
} clap_plugin_state_context_t;
|
Fix ccache documentation: environment variable is IDF_CCACHE_ENABLE
Merges | @@ -113,7 +113,7 @@ Here is a list of some useful options:
- ``-B <dir>`` allows overriding the build directory from the default ``build`` subdirectory of the project directory.
- ``--ccache`` flag can be used to enable CCache_ when compiling source files, if the CCache_ tool is installed. This can dramatically reduce some build times.
-Note that some older versions of CCache may exhibit bugs on some platforms, so if files are not rebuilt as expected then try disabling ccache and build again. CCache can be enabled by default by setting the ``IDF_ENABLE_CCACHE`` environment variable to a non-zero value.
+Note that some older versions of CCache may exhibit bugs on some platforms, so if files are not rebuilt as expected then try disabling ccache and build again. CCache can be enabled by default by setting the ``IDF_CCACHE_ENABLE`` environment variable to a non-zero value.
- ``-v`` flag causes both ``idf.py`` and the build system to produce verbose build output. This can be useful for debugging build problems.
- ``--cmake-warn-uninitialized`` (or ``-w``) will cause CMake to print uninitialized variable warnings inside the project directory (not for directories not found inside the project directory). This only controls CMake variable warnings inside CMake itself, not other types of build warnings. This option can also be set permanently by setting the ``IDF_CMAKE_WARN_UNINITIALIZED`` environment variable to a non-zero value.
|
Catch modules importing at startup | @@ -105,10 +105,12 @@ webbrowser.register("mobile-safari", None, MobileSafari("MobileSafari.app"))
for importer in (NumpyImporter, MatplotlibImporter, PandasImporter):
sys.meta_path.insert(0, importer())
-# Pre-import modules
+# MARK: - Pre-import modules
+try:
import matplotlib, numpy, pandas
-
+except:
+ pass
# MARK: - Create a Selector without class.
|
show information if BEACON or PROBERESPONSE frames are missing | @@ -867,6 +867,24 @@ if(radiotappresent == false)
"from the driver to userspace applications.\n"
"https://www.radiotap.org/\n");
}
+if(beaconcount == 0)
+ {
+ fprintf(stdout, "\nInformation: missing frames!\n"
+ "This dump file does not contain BEACON frames.\n"
+ "A BEACON frame contain the ESSID which is mandatory to calculate a PMK.\n"
+ "It always happens if the capture file was cleaned or\n"
+ "it could happen if filter options are used during capturing.\n"
+ "That makes it impossibleto recover the PSK.\n");
+ }
+if(proberesponsecount == 0)
+ {
+ fprintf(stdout, "\nInformation: missing frames!\n"
+ "This dump file does not contain PROBERESPONSE frames.\n"
+ "A PROBERESPONSE frame contain the ESSID which is mandatory to calculate a PMK.\n"
+ "It always happens if the capture file was cleaned or\n"
+ "it could happen if filter options are used during capturing.\n"
+ "That makes it impossibleto recover the PSK.\n");
+ }
if(proberequestcount == 0)
{
fprintf(stdout, "\nInformation: missing frames!\n"
|
SOVERSION bump to version 2.2.1 | @@ -63,7 +63,7 @@ set(LIBYANG_VERSION ${LIBYANG_MAJOR_VERSION}.${LIBYANG_MINOR_VERSION}.${LIBYANG_
# set version of the library
set(LIBYANG_MAJOR_SOVERSION 2)
set(LIBYANG_MINOR_SOVERSION 2)
-set(LIBYANG_MICRO_SOVERSION 0)
+set(LIBYANG_MICRO_SOVERSION 1)
set(LIBYANG_SOVERSION_FULL ${LIBYANG_MAJOR_SOVERSION}.${LIBYANG_MINOR_SOVERSION}.${LIBYANG_MICRO_SOVERSION})
set(LIBYANG_SOVERSION ${LIBYANG_MAJOR_SOVERSION})
|
Mozprefs: Adapt Markdown Shell Recorder test
We do not assume that a non-root user executes the test any more. | @@ -41,16 +41,16 @@ will all result in `lockPref("a.lock.key", "lock");`
## Example
```sh
-# Backup-and-Restore:/tests/mozprefs
+# Backup-and-Restore:user/tests/mozprefs
-sudo kdb mount prefs.js /tests/mozprefs mozprefs
+sudo kdb mount prefs.js user/tests/mozprefs mozprefs
kdb setmeta user/tests/mozprefs/lock/a/lock/key type boolean
-kdb set /tests/mozprefs/lock/a/lock/key true
+kdb set user/tests/mozprefs/lock/a/lock/key true
kdb setmeta user/tests/mozprefs/pref/a/default/key type string
-kdb set /tests/mozprefs/pref/a/default/key "i'm a default key"
+kdb set user/tests/mozprefs/pref/a/default/key "i'm a default key"
kdb setmeta user/tests/mozprefs/user/a/user/key type integer
-kdb set /tests/mozprefs/user/a/user/key 123
+kdb set user/tests/mozprefs/user/a/user/key 123
kdb export user/tests/mozprefs ini
#> [lock/a/lock]
@@ -69,6 +69,6 @@ cat `kdb file user/tests/mozprefs`
#> user_pref("a.user.key", 123);
# cleanup
-kdb rm -r /tests/mozprefs
-sudo kdb umount /tests/mozprefs
+kdb rm -r user/tests/mozprefs
+sudo kdb umount user/tests/mozprefs
```
|
Fix Wasm3 Cosmopolitan build config | @@ -26,8 +26,9 @@ fi
echo "Building Wasm3..."
gcc -g -O -static -fno-pie -no-pie -mno-red-zone -nostdlib -nostdinc \
- -Wl,--oformat=binary -Wl,--gc-sections -Wl,-z,max-page-size=0x1000 -fuse-ld=bfd \
+ -Wl,--gc-sections -Wl,-z,max-page-size=0x1000 -fuse-ld=bfd \
-Wl,-T,cosmopolitan/ape.lds -include cosmopolitan/cosmopolitan.h \
-Wno-format-security -Wfatal-errors $EXTRA_FLAGS \
- -o wasm3.com -DAPE -I$STD -I$SOURCE_DIR $SOURCE_DIR/*.c ../app/main.c \
+ -o wasm3.com.dbg -DAPE -I$STD -I$SOURCE_DIR $SOURCE_DIR/*.c ../app/main.c \
cosmopolitan/crt.o cosmopolitan/ape.o cosmopolitan/cosmopolitan.a
+objcopy -SO binary wasm3.com.dbg wasm3.com
|
Bugfix: For Linux/OSX, remove GBC header when not needed
If a Linux/OSX user has deselected the custom color replacement,
then we need to remove the GBC code from the header. | @@ -104,6 +104,17 @@ const makeBuild = ({
fs.writeFile(`${buildRoot}/include/game.h`, result, 'utf8');
});
+ // Modify Linux / OSX makefile as needed
+ if (process.platform != "win32" && data.CustomColorsEnabled == false)
+ {
+ fs.readFile(`${buildRoot}/makefile`, 'utf8', function (err, filedata) {
+
+ const result = filedata.replace("-Wl-yp0x143=0x80", "");
+
+ fs.writeFile(`${buildRoot}/makefile`, result, 'utf8');
+ });
+ }
+
const makeBat = await buildMakeBat(buildRoot, data.CustomColorsEnabled, { CART_TYPE: env.CART_TYPE });
await fs.writeFile(`${buildRoot}/make.bat`, makeBat);
|
os/net/lwip/src/core/tcp.c : Update determine
determin -> determine | @@ -1815,7 +1815,7 @@ u32_t tcp_next_iss(struct tcp_pcb *pcb)
#if TCP_CALCULATE_EFF_SEND_MSS
/**
* Calculates the effective send mss that can be used for a specific IP address
- * by using ip_route to determin the netif used to send to the address and
+ * by using ip_route to determine the netif used to send to the address and
* calculating the minimum of TCP_MSS and that netif's mtu (if set).
*/
u16_t tcp_eff_send_mss_impl(u16_t sendmss, const ip_addr_t *dest
|
publish: add flex-auto to skeleton
m viewports had overflow out of parent containers;
this uses flex-auto to ensure the skeleton stays within its flex
container. | @@ -31,7 +31,7 @@ export class Skeleton extends Component {
path={props.path}
invites={props.invites}
/>
- <div className={"h-100 w-100 relative white-d " + rightPanelHide} style={{
+ <div className={"h-100 w-100 relative white-d flex-auto " + rightPanelHide} style={{
flexGrow: 1,
}}>
{props.children}
|
vlib: fix an issue with show pci
The fix has been received over e-mail from Lijian Zhang.
Type: fix
Ticket: | @@ -110,7 +110,7 @@ show_pci_fn (vlib_main_t * vm,
format_vlib_pci_link_speed, d,
d->driver_name ? (char *) d->driver_name : "",
d->product_name,
- format_vlib_pci_vpd, d->vpd_r, 0);
+ format_vlib_pci_vpd, d->vpd_r, (u8 *) 0);
vlib_pci_free_device_info (d);
}
/* *INDENT-ON* */
|
tests: remove failing test case, will be introduced in a later commit that fixes the underlying bug | @@ -342,22 +342,6 @@ static void test_copy (void)
keyDel (key1);
keyDel (key2);
-
- succeed_if (key1 = keyNew ("/", KEY_END), "could not create key");
- succeed_if (key2 = keyNew ("/", KEY_END), "could not create key");
-
- succeed_if (keySetMeta (key2, "mymeta", "a longer metavalue") == sizeof ("a longer metavalue"), "could not set metavalue");
- succeed_if_same_string (keyValue (keyGetMeta (key2, "mymeta")), "a longer metavalue");
-
- succeed_if (keyCopyMeta (key2, key1, "mymeta") == 0, "could not copy metavalue");
-
- succeed_if (keyGetMeta (key1, "mymeta") == 0, "value of mymeta is not NULL");
- succeed_if (keyGetMeta (key2, "mymeta") == 0, "value of mymeta has not been cleared");
-
- keyDel (key1);
- keyDel (key2);
-
-
Key * k;
Key * c;
|
[Rust] View sets up a parent link when adding sub elements | @@ -52,6 +52,10 @@ impl View {
printf!("Adding component to view: {:?}\n", elem.frame());
// Ensure the component has a frame by running its sizer
elem.handle_superview_resize(self.current_inner_content_frame.borrow().size);
+
+ // Set up a link to the parent
+ elem.set_parent(Rc::downgrade(&(Rc::clone(&self) as _)));
+
self.sub_elements.borrow_mut().push(elem);
}
}
|
Fix preprocessor indentation.
Rework main() to be in the style of the other conditional tests. | /*
- * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -499,9 +499,11 @@ static int test_ctlog_from_base64(void)
return 0;
return 1;
}
+#endif
int test_main(int argc, char *argv[])
{
+#ifndef OPENSSL_NO_CT
if ((ct_dir = getenv("CT_DIR")) == NULL)
ct_dir = "ct";
if ((certs_dir = getenv("CERTS_DIR")) == NULL)
@@ -519,11 +521,8 @@ int test_main(int argc, char *argv[])
ADD_TEST(test_ctlog_from_base64);
return run_tests(argv[0]);
-}
#else
-int test_main(int argc, char *argv[])
-{
printf("No CT support\n");
- return 0;
-}
+ return EXIT_SUCCESS;
#endif
+}
|
btc-provider: removed some extraneous printfs | ::
++ on-init
^- (quip card _this)
- ~& > '%btc-provider initialized successfully'
=| wl=^whitelist
:- ~
%_ this
++ on-load
|= old-state=vase
^- (quip card _this)
- ~& > '%btc-provider recompiled successfully '
`this(state !<(versioned-state old-state))
::
++ on-poke
^- (quip card _state)
:_ state
?. ?|(connected.host-info ?=(%ping -.act))
- ~& >>> "Not connected to RPC"
~[(send-update:hc [%| %not-connected 500])]
:_ ~
%+ req-card act
~% %btc-provider-helper ..card ~
|_ =bowl:gall
++ send-status
- |= =status ^- card
+ |= =status
+ ^- card
%- ?: ?=(%new-block -.status)
~&(>> "%new-block: {<block.status>}" same)
same
|
Remap hidden windows when exiting (issue | @@ -1238,8 +1238,9 @@ void RemoveClient(ClientNode *np)
np->x, np->y, np->width, np->height);
}
GravitateClient(np, 1);
- if(!(np->state.status & STAT_MAPPED)
- && (np->state.status & (STAT_MINIMIZED | STAT_SHADED))) {
+ if((np->state.status & STAT_HIDDEN)
+ || (!(np->state.status & STAT_MAPPED)
+ && (np->state.status & (STAT_MINIMIZED | STAT_SHADED)))) {
JXMapWindow(display, np->window);
}
JXUngrabButton(display, AnyButton, AnyModifier, np->window);
|
Simplify parser error messages. | @@ -73,11 +73,11 @@ func (p *parser) parseTopLevelDecl() (*a.Node, error) {
flags |= a.FlagsSuspendible
p.src = p.src[1:]
}
- inParams, err := p.parseList("parameter", (*parser).parseParam)
+ inParams, err := p.parseList((*parser).parseParam)
if err != nil {
return nil, err
}
- outParams, err := p.parseList("parameter", (*parser).parseParam)
+ outParams, err := p.parseList((*parser).parseParam)
if err != nil {
return nil, err
}
@@ -135,11 +135,10 @@ func (p *parser) parseIdent() (t.ID, error) {
return x.ID, nil
}
-func (p *parser) parseList(element string, parseFunc func(*parser) (*a.Node, error)) ([]*a.Node, error) {
+func (p *parser) parseList(parseFunc func(*parser) (*a.Node, error)) ([]*a.Node, error) {
if x := p.peekID(); x != t.IDOpenParen {
got := p.m.ByKey(x.Key())
- return nil, fmt.Errorf("parse: expected \"(\", got %q for %s list at %s:%d",
- got, element, p.filename, p.line())
+ return nil, fmt.Errorf("parse: expected \"(\", got %q at %s:%d", got, p.filename, p.line())
}
p.src = p.src[1:]
@@ -164,11 +163,10 @@ func (p *parser) parseList(element string, parseFunc func(*parser) (*a.Node, err
p.src = p.src[1:]
default:
got := p.m.ByKey(x.Key())
- return nil, fmt.Errorf("parse: expected \")\", got %q for %s list at %s:%d",
- got, element, p.filename, p.line())
+ return nil, fmt.Errorf("parse: expected \")\", got %q at %s:%d", got, p.filename, p.line())
}
}
- return nil, fmt.Errorf("parse: expected \")\" for %s list at %s:%d", element, p.filename, p.line())
+ return nil, fmt.Errorf("parse: expected \")\" at %s:%d", p.filename, p.line())
}
func (p *parser) parseParam() (*a.Node, error) {
@@ -277,7 +275,7 @@ func (p *parser) parseRangeOrIndex(allowIndex bool) (op t.ID, mhs *a.Node, rhs *
func (p *parser) parseBlock() ([]*a.Node, error) {
if x := p.peekID(); x != t.IDOpenCurly {
got := p.m.ByKey(x.Key())
- return nil, fmt.Errorf("parse: expected \"{\", got %q for block at %s:%d", got, p.filename, p.line())
+ return nil, fmt.Errorf("parse: expected \"{\", got %q at %s:%d", got, p.filename, p.line())
}
p.src = p.src[1:]
@@ -300,7 +298,7 @@ func (p *parser) parseBlock() ([]*a.Node, error) {
}
p.src = p.src[1:]
}
- return nil, fmt.Errorf("parse: expected \"}\" for block at %s:%d", p.filename, p.line())
+ return nil, fmt.Errorf("parse: expected \"}\" at %s:%d", p.filename, p.line())
}
func (p *parser) parseStatement() (*a.Node, error) {
@@ -503,7 +501,7 @@ func (p *parser) parseOperand() (*a.Node, error) {
fallthrough
case t.IDOpenParen:
- list0, err := p.parseList("argument", (*parser).parseExpr)
+ list0, err := p.parseList((*parser).parseExpr)
if err != nil {
return nil, err
}
|
ocvalidate: Return number of errors detected | @@ -135,7 +135,7 @@ int ENTRY_POINT(int argc, const char *argv[]) {
OcConfigurationFree (&Config);
FreePool (ConfigFileBuffer);
- return 0;
+ return ErrorCount;
}
INT32 LLVMFuzzerTestOneInput(CONST UINT8 *Data, UINTN Size) {
|
amd_r19me4070: Set GPU temp to 0 when read failed
This avoids returning bogus temperature that caused
thermal shutdown.
BRANCH=none
TEST=no more thermal shutdown when suspend | @@ -53,17 +53,21 @@ int get_temp_R19ME4070(int idx, int *temp_ptr)
* We shouldn't read the GPU temperature when the state
* is not in S0, because GPU is enabled in S0.
*/
- if ((power_get_state()) != POWER_S0)
+ if ((power_get_state()) != POWER_S0) {
+ *temp_ptr = C_TO_K(0);
return EC_ERROR_BUSY;
+ }
/* if no INIT GPU, must init it first and wait 1 sec. */
if (!initialized) {
gpu_init_temp_sensor();
+ *temp_ptr = C_TO_K(0);
return EC_ERROR_BUSY;
}
rv = i2c_read_block(I2C_PORT_GPU, GPU_ADDR_FLAGS,
GPU_TEMPERATURE_OFFSET, reg, ARRAY_SIZE(reg));
if (rv) {
CPRINTS("read GPU Temperature fail");
+ *temp_ptr = C_TO_K(0);
return rv;
}
/*
@@ -81,5 +85,6 @@ int get_temp_R19ME4070(int idx, int *temp_ptr)
* reg[0] = 0x04
*/
*temp_ptr = C_TO_K(reg[3] >> 1);
+
return EC_SUCCESS;
}
|
LogChannel color changes | @@ -251,7 +251,7 @@ void LuaVM::HookLogChannel(RED4ext::IScriptable*, RED4ext::CStackFrame* apStack,
if (channel == s_debugChannel)
spdlog::get("gamelog")->debug("[{}] {}", channelSV, ref.ref->c_str());
else if (channel == s_assertionChannel)
- spdlog::get("gamelog")->warn("[{}] {}", channelSV, ref.ref->c_str());
+ spdlog::get("gamelog")->error("[{}] {}", channelSV, ref.ref->c_str());
else
spdlog::get("gamelog")->info("[{}] {}", channelSV, ref.ref->c_str());
}
|
Enable scan-build | @@ -82,6 +82,26 @@ jobs:
name: ethereum_nanox
path: ./ethereum_nanox.elf
+ scan-build:
+ name: Clang Static Analyzer
+ runs-on: ubuntu-latest
+
+ container:
+ image: ghcr.io/ledgerhq/ledger-app-builder/ledger-app-builder:latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Build with Clang Static Analyzer
+ run: |
+ make clean
+ scan-build --use-cc=clang -analyze-headers -enable-checker security -enable-checker unix -enable-checker valist -o scan-build --status-bugs make default
+ - uses: actions/upload-artifact@v2
+ if: failure()
+ with:
+ name: scan-build
+ path: scan-build
+
jobs-e2e-tests:
needs: [job_build_debug_nano_s, job_build_debug_nano_x]
runs-on: ubuntu-latest
|
[lib][unittest] tweak the command line to let you list and selectively run individual tests | @@ -73,14 +73,43 @@ bool run_all_tests(void) {
}
static int do_unittests(int argc, const console_cmd_args *argv) {
+
+ if (argc < 2) {
+usage:
+ printf("usage:\n");
+ printf("%s all : run all unit tests\n", argv[0].str);
+ printf("%s list : list all test cases\n", argv[0].str);
+ printf("%s <test name> : run specific test\n", argv[0].str);
+ return -1;
+ }
+
+ if (!strcmp(argv[1].str, "all")) {
bool result = run_all_tests();
+ printf("UNIT TEST: run_all_tests return %u\n", result);
+ } else if (!strcmp(argv[1].str, "list")) {
+ for (struct test_case_element *current = test_case_list; current; current = current->next) {
+ puts(current->name);
+ }
+ } else {
+ // look for unit test that matches the string name
+ bool found_test = false;
+ for (struct test_case_element *current = test_case_list; current; current = current->next) {
+ if (strcmp(argv[1].str, current->name) == 0) {
+ found_test = true;
+ current->test_case();
+ break;
+ }
+ }
+
+ if (!found_test) {
+ goto usage;
+ }
+ }
- printf("run_all_tests returned %d\n", result);
return NO_ERROR;
}
STATIC_COMMAND_START
-STATIC_COMMAND("unittests", "run all unit tests", do_unittests)
-STATIC_COMMAND("ut", "run all unit tests", do_unittests)
-STATIC_COMMAND_END(name);
+STATIC_COMMAND("ut", "run some or all of the unit tests", do_unittests)
+STATIC_COMMAND_END(unit_tests);
|
added if defs around version dependent calls | @@ -366,7 +366,7 @@ avtUintahFileFormat::avtUintahFileFormat(const char *filename,
EXCEPTION1(InvalidDBTypeException, "The function getGridData could not be located in the library!!!");
}
-#if (1 <= UINTAH_MAJOR_VERSION && 7 <= UINTAH_MINOR_VERSION )
+#if (2 <= UINTAH_MAJOR_VERSION && 0 <= UINTAH_MINOR_VERSION )
variableExists = (bool (*)(DataArchive*, std::string)) dlsym(libHandle, "variableExists");
if((error = dlerror()) != NULL) {
EXCEPTION1(InvalidDBTypeException, "The function variableExists could not be located in the library!!!");
@@ -777,6 +777,7 @@ avtUintahFileFormat::ReadMetaData(avtDatabaseMetaData *md, int timeState)
scalar->treatAsASCII = false;
md->Add(scalar);
+#if (2 <= UINTAH_MAJOR_VERSION && 1 <= UINTAH_MINOR_VERSION )
scalar = new avtScalarMetaData();
scalar->name = "patch_id";
scalar->meshName = mesh_for_procid;
@@ -784,6 +785,7 @@ avtUintahFileFormat::ReadMetaData(avtDatabaseMetaData *md, int timeState)
scalar->hasDataExtents = false;
scalar->treatAsASCII = false;
md->Add(scalar);
+#endif
}
@@ -1397,7 +1399,7 @@ avtUintahFileFormat::GetMesh(int timestate, int domain, const char *meshname)
//debug5<<"\t(*getParticleData)...\n";
//todo: this returns an array of doubles. Need to return expected datatype to avoid unnecessary conversion.
-#if (1 <= UINTAH_MAJOR_VERSION && 7 <= UINTAH_MINOR_VERSION )
+#if (2 <= UINTAH_MAJOR_VERSION && 0 <= UINTAH_MINOR_VERSION )
if( variableExists(archive, "p.particleID") )
#endif
{
@@ -1536,9 +1538,10 @@ avtUintahFileFormat::GetVar(int timestate, int domain, const char *varname)
if (strcmp(varname, "proc_id") == 0 )
value = patchInfo.getProcId();
+#if (2 <= UINTAH_MAJOR_VERSION && 1 <= UINTAH_MINOR_VERSION )
else if( strcmp(varname, "patch_id") == 0)
value = patchInfo.getPatchId();
-
+#endif
for (int i=0; i<ncells; i++)
gd->data[i] = value;
}
|
Modify strncmp to starts_with | @@ -20,15 +20,15 @@ static int get_long_integer_from_char_array (const char *const str, uint64_t *re
char *tail;
// hexadecimal
- if ((strncmp ("0x", str, 2) == 0) || (strncmp ("0X", str, 2) == 0)) {
+ if (starts_with (str, "0x") || starts_with (str, "0X")) {
value = strtoul (str + 2, &tail, 16);
}
// binary
- else if ((strncmp ("0b", str, 2) == 0) || (strncmp ("0B", str, 2) == 0)) {
+ else if (starts_with (str, "0b") || starts_with (str, "0B")) {
value = strtoul (str + 2, &tail, 2);
}
// octal
- else if ((strncmp ("0", str, 1) == 0) || (strncmp ("0", str, 1) == 0)) {
+ else if (starts_with (str, "0")) {
value = strtoul (str + 1, &tail, 8);
}
// decimal
|
dev/release.sh: Adjust release branch names to votes
The OTC voted today that the release branch for OpenSSL 3.0 should be
openssl-3.0 rather than openssl-3.0.x. The release script is changed
accordingly. | @@ -20,7 +20,7 @@ Usage: release.sh [ options ... ]
--final Get out of "alpha" or "beta" and make a final release.
Implies --branch.
---branch Create a release branch 'openssl-{major}.{minor}.x',
+--branch Create a release branch 'openssl-{major}.{minor}',
where '{major}' and '{minor}' are the major and minor
version numbers.
@@ -218,7 +218,7 @@ if (echo "$orig_branch" \
| grep -E -q \
-e '^master$' \
-e '^OpenSSL_[0-9]+_[0-9]+_[0-9]+[a-z]*-stable$' \
- -e '^openssl-[0-9]+\.[0-9]+\.x$'); then
+ -e '^openssl-[0-9]+\.[0-9]+$'); then
:
elif $force; then
:
@@ -253,7 +253,7 @@ get_version
# changes for the release, the update branch is where we make the post-
# release changes
update_branch="$orig_branch"
-release_branch="openssl-$SERIES.x"
+release_branch="openssl-$SERIES"
# among others, we only create a release branch if the patch number is zero
if [ "$update_branch" = "$release_branch" ] || [ $PATCH -ne 0 ]; then
@@ -694,9 +694,9 @@ This implies B<--branch>.
=item B<--branch>
-Create a branch specific for the I<SERIES>.x release series, if it doesn't
+Create a branch specific for the I<SERIES> release series, if it doesn't
already exist, and switch to it. The exact branch name will be
-C<< openssl-I<SERIES>.x >>.
+C<< openssl-I<SERIES> >>.
=item B<--no-upload>
@@ -751,7 +751,7 @@ C<< OpenSSL_I<VERSION> >> for regular releases, or
C<< OpenSSL_I<VERSION>-preI<n> >> for pre-releases.
From OpenSSL 3.0 ongoing, the release branches are named
-C<< openssl-I<SERIES>.x >>, and the release tags are named
+C<< openssl-I<SERIES> >>, and the release tags are named
C<< openssl-I<VERSION> >> for regular releases, or
C<< openssl-I<VERSION>-alphaI<n> >> for alpha releases
and C<< openssl-I<VERSION>-betaI<n> >> for beta releases.
|
changed time pointer from control->Evolve.dTime to body[iBody].dAge | @@ -558,7 +558,11 @@ double fdDSurfTemp(BODY *body,CONTROL *control, SYSTEM *system, int *iaBody) {
}
double fdDWaterMassMOAtm(BODY *body,CONTROL *control, SYSTEM *system, int *iaBody) {
- return TOMASS; /* * sin(1e-8 * control->Evolve.dTime); */
+ int iBody = iaBody[0];
+ printf("dAge %lf \n", body[iBody].dAge/YEARSEC);
+ double dTime = body[iBody].dAge/YEARSEC;
+ printf("dTime %lf \n", dTime);
+ return TOMASS * sin(1e-8 * dTime);
}
double fdDWaterMassSol(BODY *body,CONTROL *control, SYSTEM *system, int *iaBody) {
|
zeromqsend plugin: fix timeout bug | @@ -67,6 +67,22 @@ static int getMonitorEvent (void * monitor)
return event;
}
+static struct timespec ts_diff (struct timespec now, struct timespec start)
+{
+ struct timespec diff;
+ if ((now.tv_nsec - start.tv_nsec) < 0)
+ {
+ diff.tv_sec = now.tv_sec - start.tv_sec - 1;
+ diff.tv_nsec = 1000000000 + now.tv_nsec - start.tv_nsec;
+ }
+ else
+ {
+ diff.tv_sec = now.tv_sec - start.tv_sec;
+ diff.tv_nsec = now.tv_nsec - start.tv_nsec;
+ }
+ return diff;
+}
+
/**
* Wait for connection message from ZeroMQ monitor socket.
*
@@ -134,9 +150,10 @@ static int waitForSubscription (void * socket, long subscribeTimeout)
struct timespec start;
struct timespec now;
struct timespec wait;
+ struct timespec diff;
time_t startFallback = -1;
long timeoutSec = (subscribeTimeout / (1000));
- long timeoutNsec = (subscribeTimeout % (1000)) * (1000 * 1000 * 1000);
+ long timeoutNsec = (subscribeTimeout % (1000)) * (1000 * 1000);
if (clock_gettime (CLOCK_MONOTONIC, &start) == -1)
{
ELEKTRA_LOG_WARNING ("Using slower fallback for timeout detection");
@@ -171,7 +188,8 @@ static int waitForSubscription (void * socket, long subscribeTimeout)
if (startFallback == -1)
{
clock_gettime (CLOCK_MONOTONIC, &now);
- timeout = now.tv_sec - start.tv_sec >= timeoutSec && now.tv_nsec - start.tv_nsec >= timeoutNsec;
+ diff = ts_diff (now, start);
+ timeout = diff.tv_sec >= timeoutSec && diff.tv_nsec >= timeoutNsec;
}
else
{
|
Update hcxdumptool.c
Fix Typo CLEINTs -> CLIENTs | @@ -8385,7 +8385,7 @@ fprintf(stdout, "%s %s (C) %s ZeroBeat\n"
" $ hcxdumptool -m <interface>\n"
" create BPF to protect a MAC\n"
" $ tcpdump -i <interface> not wlan addr3 11:22:33:44:55:66 and not wlan addr2 11:22:33:44:55:66 -ddd > protect.bpf\n"
- " where addr3 protect ACCESS POINTs and addr2 protect CLEINTs\n"
+ " where addr3 protect ACCESS POINTs and addr2 protect CLIENTs\n"
" recommended to protect own devices\n"
" or create BPF to attack a MAC\n"
" $ tcpdump -i <interface> wlan addr1 11:22:33:44:55:66 or wlan addr2 11:22:33:44:55:66 or wlan addr3 -ddd > attack.bpf\n"
|
harness: fix confusion about whether no kernel/boot driver args is None or an empty list | @@ -33,9 +33,12 @@ class BootModules(object):
self.kernel = None
else:
self.kernel = os.path.join(self.prefix, kernel)
+ if args is None:
+ args = []
self.kernelArgs = args
def add_kernel_args(self, args):
+ if args:
self.kernelArgs.extend(args)
def set_cpu_driver(self, cpu_driver, args=[]):
@@ -44,6 +47,8 @@ class BootModules(object):
self.kernelArgs = []
else :
self.cpu_driver = os.path.join(self.prefix, cpu_driver)
+ if args is None:
+ args = []
self.kernelArgs = args
def set_boot_driver(self, boot_driver, args=[]):
@@ -52,6 +57,8 @@ class BootModules(object):
self.boot_driver_args = []
else :
self.boot_driver = os.path.join(self.prefix, boot_driver);
+ if args is None:
+ args = []
self.boot_driver_args = args
def set_boot_driver_args(self, args):
|
bonding: drop traffic on backup interface for active-backup mode
For active-backup mode, we transmit on one and only one interface. However,
we might still receive traffic on the backup interface. We should drop them
and strictly process incoming traffic on only the active interface.
Type: fix | @@ -28,6 +28,7 @@ bond_main_t bond_main;
#define foreach_bond_input_error \
_(NONE, "no error") \
_(IF_DOWN, "interface down") \
+ _(PASSIVE_IF, "traffic received on passive interface") \
_(PASS_THRU, "pass through (CDP, LLDP, slow protocols)")
typedef enum
@@ -158,10 +159,20 @@ bond_update_next (vlib_main_t * vm, vlib_node_runtime_t * node,
ASSERT (bif);
ASSERT (vec_len (bif->slaves));
- if (PREDICT_TRUE (bif->admin_up == 0))
+ if (PREDICT_FALSE (bif->admin_up == 0))
{
*bond_sw_if_index = slave_sw_if_index;
*error = node->errors[BOND_INPUT_ERROR_IF_DOWN];
+ return;
+ }
+
+ if (PREDICT_FALSE ((bif->mode == BOND_MODE_ACTIVE_BACKUP) &&
+ vec_len (bif->active_slaves) &&
+ (slave_sw_if_index != bif->active_slaves[0])))
+ {
+ *bond_sw_if_index = slave_sw_if_index;
+ *error = node->errors[BOND_INPUT_ERROR_PASSIVE_IF];
+ return;
}
*bond_sw_if_index = bif->sw_if_index;
|
Documentation change only: add iPerf instructions to NETWORK.md. | @@ -16,3 +16,4 @@ This document describes the network arrangements of the automated test system.
- When moving a KMTronic Ethernet-based relay box onto the network, reset it and first connect it to a PC/laptop where you have disabled Wifi and \[temporarily\] hard-coded the laptop's Ethernet interface to 192.168.1.1; open a browser to 192.168.1.199 and configure the box to do DHCP, then on the router add a static address for it (take a photo of the Ethernet MAC address and then type it in) before connecting the KMTronic to the network.
- When moving a MiniCircuits Ethernet-based RF switch onto the network, you _may_ need to first connect it to a laptop via USB and talk to it using [their application](https://www.minicircuits.com/softwaredownload/rfswitchcontroller.html) to configure it before connecting it to the network.
- When moving a Nutaq network simulator onto the network, these things have a plethora of Ethernet connections in them: plug the network into the first of the two Ethernet ports on the front panel, then on the router move the assigned IP address to the correct static address and reboot the Nutaq box (the separate LTE application running on the Nutaq will be confused otherwise; you could possibly restart the application but if you have it starting on boot it is simpler to just reboot). Repeat for the second Ethernet port on the front panel (e.g. assigned to the next-up IP address) so that they are both moved in case you ever plug into the wrong one.
+- It is, of course, important that the connection between this network and the publicly-visible test server that is used out on the internet is rock solid; tests will fail randomly otherwise. Hence you may wish to set up something like [iPerf](https://github.com/esnet/iperf) to monitor the connection between, say the Jenkins machine and that machine. If your publicly-visible test server is Ubuntu then you can install iPerf with `sudo apt install iperf3`, or on Centos 8 with `sudo yum install iperf3`; make sure you have the port you are going to use (default 5201) is open on the server machine and its network (for both TCP and UDP) then start an iperf server on the publicly-visible test server as a [systemd service](https://gist.github.com/auipga/64be019018ef311deba2211ced316f5e) that runs at boot in the usual way. On the client side, do the same but this time with the parameters to iPerf being `-t 0 -b 100k -u -c ubxlib-test-system.redirectme.net`: this will do a UDP test every second, at a nice low bandwidth of 100 kbits/s, forever. You can now check the network status for uplink packet loss from the server-side by examining the log with something like `sudo systemctl status iperf` or, for a liveish view, `sudo journalctl -u iperf.service -f`. The important numbers are on the end: the jitter in milliseconds and the lost/total packets each second.
\ No newline at end of file
|
Ensure no 'cleaning up resources' message is displayed if --no-progress is passed.
Closes | @@ -210,7 +210,9 @@ cleanup (int ret) {
if (!conf.output_stdout)
endwin ();
+ if (!conf.no_progress)
fprintf (stdout, "Cleaning up resources...\n");
+
/* unable to process valid data */
if (ret)
output_logerrors ();
|
resource graph | @@ -10,5 +10,6 @@ namespace FFXIVClientStructs.FFXIV.Client.System.Resource.Handle
[StructLayout(LayoutKind.Explicit, Size = 0x1728)]
public unsafe struct ResourceManager
{
+ [FieldOffset(0x8)] public ResourceGraph* ResourceGraph;
}
}
|
group-on-leave: poke %graph-pull-hook to allow resubscription | :- %graph-update
!> ^- update:gra
[%0 now.bowl [%archive-graph (de-path:res app-path.m.i.entries)]]
+;< ~ bind:m
+ %+ raw-poke
+ [our.bowl %graph-pull-hook]
+ :- %pull-hook-action
+ !>([%remove (de-path:res app-path.m.i.entries)])
loop(entries t.entries)
|
Fix x86 compile issue | @@ -1368,7 +1368,7 @@ size_t picoquic_log_qoe_frame(FILE* F, const uint8_t* bytes, size_t bytes_max)
}
fprintf(F, "\n");
- byte_index = (bytes - bytes0) + length;
+ byte_index = (bytes - bytes0) + (size_t)length;
}
return byte_index;
|
ipsec: bug fix ipsec-init sequence
ipsec_tunnel_if_init might be called before ipsec_init
this memset in ipsec-init therefore zero the memory
allocated by ipsec_tunnel_if_init | @@ -224,8 +224,6 @@ ipsec_init (vlib_main_t * vm)
ipsec_main_t *im = &ipsec_main;
ipsec_main_crypto_alg_t *a;
- clib_memset (im, 0, sizeof (im[0]));
-
im->vnet_main = vnet_get_main ();
im->vlib_main = vm;
|
rtdl: change value of RTDL_LAZY to be non-zero | #ifndef _DLFCN_H
#define _DLFCN_H
-// RTLD_LAZY and RTLD_LOCAL have the same value. See issue #450.
-#define RTLD_LAZY 0
+#define RTLD_LOCAL 0
#define RTLD_NOW 1
#define RTLD_GLOBAL 2
#define RTLD_NOLOAD 4
#define RTLD_NODELETE 8
#define RTLD_DEEPBIND 16
-#define RTLD_LOCAL 0
+#define RTLD_LAZY 32
#define RTLD_NEXT ((void *)-1)
#define RTLD_DEFAULT ((void *)0)
|
virtio: Support legacy and transitional virtio devices | @@ -586,7 +586,7 @@ virtio_pci_read_caps (vlib_main_t * vm, virtio_if_t * vif)
clib_error_t *error = 0;
virtio_main_t *vim = &virtio_main;
struct virtio_pci_cap cap;
- u8 pos, common_cfg = 0, notify_base = 0, dev_cfg = 0, isr = 0;
+ u8 pos, common_cfg = 0, notify_base = 0, dev_cfg = 0, isr = 0, pci_cfg = 0;
vlib_pci_dev_handle_t h = vif->pci_dev_handle;
if ((error = vlib_pci_read_config_u8 (vm, h, PCI_CAPABILITY_LIST, &pos)))
@@ -637,18 +637,25 @@ virtio_pci_read_caps (vlib_main_t * vm, virtio_if_t * vif)
case VIRTIO_PCI_CAP_ISR_CFG:
isr = 1;
break;
+ case VIRTIO_PCI_CAP_PCI_CFG:
+ if (cap.bar == 0)
+ pci_cfg = 1;
+ break;
}
next:
pos = cap.cap_next;
}
+ if (!pci_cfg)
+ clib_error_return (error, "modern virtio pci device found");
+
if (common_cfg == 0 || notify_base == 0 || dev_cfg == 0 || isr == 0)
{
virtio_log_debug (vim, vif, "legacy virtio pci device found");
return error;
}
- virtio_log_debug (vim, vif, "modern virtio pci device found");
+ virtio_log_debug (vim, vif, "transitional virtio pci device found");
return error;
}
@@ -659,7 +666,8 @@ virtio_pci_device_init (vlib_main_t * vm, virtio_if_t * vif,
clib_error_t *error = 0;
u8 status = 0;
- virtio_pci_read_caps (vm, vif);
+ if ((error = virtio_pci_read_caps (vm, vif)))
+ clib_error_return (error, "Device not supported");
if (virtio_pci_reset_device (vm, vif) < 0)
clib_error_return (error, "Failed to reset the device");
|
Add missing migration_guide API mappings. | @@ -581,6 +581,14 @@ L<ASN1_item_d2i_bio(3)>, L<ASN1_item_sign(3)> and L<ASN1_item_verify(3)>
=item -
+L<BIO_new(3)>
+
+=item -
+
+b2i_RSA_PVK_bio() and i2b_PVK_bio()
+
+=item -
+
L<BN_CTX_new(3)> and L<BN_CTX_secure_new(3)>
=item -
@@ -627,6 +635,10 @@ L<EVP_PBE_CipherInit(3)>, L<EVP_PBE_find(3)> and L<EVP_PBE_scrypt(3)>
=item -
+L<PKCS5_PBE_keyivgen(3)>
+
+=item -
+
L<EVP_PKCS82PKEY(3)>
=item -
@@ -705,6 +717,14 @@ L<SMIME_write_ASN1(3)>
=item -
+L<SSL_load_client_CA_file(3)>
+
+=item -
+
+L<SSL_CTX_new(3)>
+
+=item -
+
L<TS_RESP_CTX_new(3)>
=item -
@@ -747,6 +767,10 @@ Passing NULL will use the default library context.
=item -
+L<BIO_new_from_core_bio(3)>
+
+=item -
+
L<EVP_ASYM_CIPHER_fetch(3)> and L<EVP_ASYM_CIPHER_do_all_provided(3)>
=item -
|
Provide 32 bit architecture fallback | @@ -159,7 +159,15 @@ void websocket_xmask(void *msg, uint64_t len, uint32_t mask) {
msg = (void *)((uintptr_t)msg + offset);
len -= offset;
}
- /* handle 4 byte XOR alignment */
+#if !defined(__SIZEOF_SIZE_T__) || __SIZEOF_SIZE_T__ == 4
+ /* handle 4 byte XOR alignment in 32 bit mnachine*/
+ while (len >= 4) {
+ *((uint64_t *)msg) ^= mask;
+ len -= 4;
+ msg = (void *)((uintptr_t)msg + 4);
+ }
+#else
+ /* handle first 4 byte XOR alignment and move on to 64 bits */
if ((uintptr_t)msg & 7) {
*((uint32_t *)msg) ^= mask;
len -= 4;
@@ -172,6 +180,7 @@ void websocket_xmask(void *msg, uint64_t len, uint32_t mask) {
len -= 8;
msg = (void *)((uintptr_t)msg + 8);
}
+#endif
}
/* XOR any leftover bytes (might be non aligned) */
switch (len) {
|
vppinfra: silence coverity warnings related to clib_memcpy_u32()
Type: fix | #ifndef included_memcpy_h
#define included_memcpy_h
+#ifndef __COVERITY__
+
static_always_inline void
clib_memcpy_u32_x4 (u32 *dst, u32 *src)
{
@@ -152,4 +154,12 @@ clib_memcpy_u32 (u32 *dst, u32 *src, u32 n_left)
}
}
+#else /* __COVERITY__ */
+static_always_inline void
+clib_memcpy_u32 (u32 *dst, u32 *src, u32 n_left)
+{
+ memcpy (dst, src, n_left * sizeof (u32));
+}
+#endif
+
#endif
|
Use void in prototypes | @@ -19,7 +19,7 @@ extern SdbKv* sdb_kv_new(const char *k, const char *v);
extern ut32 sdb_hash(const char *key);
extern void sdb_kv_free(SdbKv *kv);
-SdbHash* sdb_ht_new();
+SdbHash* sdb_ht_new(void);
// Destroy a hashtable and all of its entries.
void sdb_ht_free(SdbHash* ht);
void sdb_ht_free_deleted(SdbHash* ht);
|
Fix `-h` typo (ses->secs) | @@ -39,7 +39,7 @@ option "max-targets" n "Cap number of targets to probe (as a number o
typestr="n"
optional string
option "max-runtime" t "Cap length of time for sending packets"
- typestr="ses"
+ typestr="secs"
optional int
option "max-results" N "Cap number of results to return"
typestr="n"
|
Modified 'install' rule in Makefile to use the standard 'install' command | @@ -29,6 +29,8 @@ else
CFLAGS += -fPIC -D_XOPEN_SOURCE=700
endif
+PREFIX ?= /usr/local
+
.PHONY : all mkdir install clean purge
all : mkdir $(OBJS) $(LIBDISCORD_SLIB)
@@ -70,7 +72,10 @@ $(LIBDISCORD_SLIB) : $(OBJS)
# @todo better install solution
install : all
- cp $(INCLUDE) /usr/local/include
+ install -d $(PREFIX)/lib/
+ install -m 644 $(LIBDISCORD_SLIB) $(PREFIX)/lib/
+ install -d $(PREFIX)/include/
+ install -m 644 libdiscord.h $(PREFIX)/include/
clean :
rm -rf $(OBJDIR) $(LIBDIR) *.exe
|
Prepare debian changelog for v0.6.0 tag | +bcc (0.6.0-1) unstable; urgency=low
+
+ * Support for kernel up to 4.17
+ * Many bugfixes
+ * Many new tools
+ * Improved python3 support
+
+ -- Brenden Blanco <[email protected]> Wed, 13 Jun 2018 17:00:00 +0000
+
bcc (0.5.0-1) unstable; urgency=low
* Support for USDT in ARM64
|
scripts: remove mistaken update | @@ -16,7 +16,11 @@ mknod /dev/ksched c 280 0
chmod uga+rwx /dev/ksched
# reserve huge pages
-echo 5192 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
+echo 5192 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages
+echo 0 > /sys/devices/system/node/node1/hugepages/hugepages-2048kB/nr_hugepages
+for n in /sys/devices/system/node/node[2-9]; do
+ echo 0 > $n/hugepages/hugepages-2048kB/nr_hugepages
+done
# load msr module
modprobe msr
|
iokernel: MIS get good results with this tuning:'
1) Use high/low watermark to decide when to delete/add kthreads.
2) Tune some parameters to make congestion control more reactive. | @@ -29,13 +29,18 @@ static DEFINE_BITMAP(mis_sampled_cores, NCPU);
PMC_ESEL_ANY | PMC_ESEL_ENABLE)
/* poll the global (system-wide) memory bandwidth over this time interval */
-#define MIS_BW_MEASURE_INTERVAL 50
+#define MIS_BW_MEASURE_INTERVAL 25
/* wait for performance counter results over this time interval */
#define MIS_BW_PUNISH_INTERVAL 10
/* punish processes consuming high bandwidth over this threshold */
-#define MIS_BW_HIGH_WATERMARK 0.10 /* FIXME: should not be hard coded */
-#define MIS_BW_LOW_WATERMARK 0.095 /* FIXME: should not be hard coded */
-#define MIS_BW_THRESHOLD 0.11 /* FIXME: should not be hard coded */
+/* FIXME: should not be hard coded */
+#define MIS_BW_HIGH_WATERMARK 0.105
+/* FIXME: should not be hard coded */
+#define MIS_BW_LOW_WATERMARK (0.8 * MIS_BW_HIGH_WATERMARK)
+/* FIXME: should not be hard coded */
+#define MIS_UNDER_LOW_WATERMARK_CNT_THRESHOLD 3
+
+unsigned int under_low_watermark_cnt = 0;
struct mis_data {
struct proc *p;
@@ -458,6 +463,7 @@ static void mis_bandwidth_state_machine(uint64_t now)
sd->threads_limit = MIN(sd->threads_limit - 1,
sd->threads_active - 1);
mis_unmark_congested(sd);
+ list_add(&bwlimited_procs, &sd->bwlimited_link);
/* first prefer lone hyperthreads */
sched_for_each_allowed_core(core, tmp) {
@@ -495,11 +501,26 @@ done:
last_tsc = tsc;
/* check if the bandwidth limit has been exceeded */
- if (bw_estimate > MIS_BW_THRESHOLD && !bw_punish_triggered) {
+ if (bw_estimate > MIS_BW_HIGH_WATERMARK && !bw_punish_triggered) {
mis_sample_pmc(PMC_LLC_MISSES);
bw_punish_triggered = true;
last_bw_punish_ts = microtime();
}
+ if (bw_estimate < MIS_BW_LOW_WATERMARK) {
+ under_low_watermark_cnt++;
+ } else {
+ under_low_watermark_cnt = 0;
+ }
+ if (under_low_watermark_cnt == MIS_UNDER_LOW_WATERMARK_CNT_THRESHOLD) {
+ under_low_watermark_cnt = 0;
+ struct mis_data *sd = NULL;
+ sd = list_pop(&bwlimited_procs, struct mis_data, bwlimited_link);
+ if (sd) {
+ sd->threads_limit++;
+ assert(sd->threads_limit == 1);
+ log_info_ratelimited("add back pid = %d\n", sd->p->pid);
+ }
+ }
log_info_ratelimited("bw estimate %f", bw_estimate);
}
|
fix freebsd compilation | @@ -404,14 +404,18 @@ TCurrentThreadLimits::TCurrentThreadLimits() noexcept
: StackBegin(nullptr)
, StackLength(0)
{
-#if defined(_linux_) || defined(_cygwin_)
+#if defined(_linux_) || defined(_cygwin_) || defined(_freebsd_)
pthread_attr_t attr;
pthread_attr_init(&attr);
+#if defined(_linux_) || defined(_cygwin_)
Y_VERIFY(pthread_getattr_np(pthread_self(), &attr) == 0, "pthread_getattr failed");
-
+#else
+ Y_VERIFY(pthread_attr_get_np(pthread_self(), &attr) == 0, "pthread_attr_get_np failed");
+#endif
pthread_attr_getstack(&attr, (void**)&StackBegin, &StackLength);
pthread_attr_destroy(&attr);
+
#elif defined(_darwin_)
StackBegin = pthread_get_stackaddr_np(pthread_self());
StackLength = pthread_get_stacksize_np(pthread_self());
|
validate gen thraed safe | #define AES_KEY_BYTES 16
static int inited = 0;
-static uint32_t aes_input[AES_BLOCK_WORDS];
static uint32_t aes_sched[(AES_ROUNDS + 1) * 4];
void validate_init()
{
- for (int i = 0; i < AES_BLOCK_WORDS; i++) {
- aes_input[i] = 0;
- }
uint8_t key[AES_KEY_BYTES];
if (!random_bytes(key, AES_KEY_BYTES)) {
log_fatal("validate", "couldn't get random bytes");
}
- if (rijndaelKeySetupEnc(aes_sched, key, AES_KEY_BYTES * 8) !=
- AES_ROUNDS) {
+ if (rijndaelKeySetupEnc(aes_sched, key, AES_KEY_BYTES * 8) != AES_ROUNDS) {
log_fatal("validate", "couldn't initialize AES key");
}
inited = 1;
@@ -41,7 +36,11 @@ void validate_gen(const uint32_t src, const uint32_t dst,
uint8_t output[VALIDATE_BYTES])
{
assert(inited);
+
+ uint32_t aes_input[AES_BLOCK_WORDS];
aes_input[0] = src;
aes_input[1] = dst;
+ aes_input[2] = 0;
+ aes_input[3] = 0;
rijndaelEncrypt(aes_sched, AES_ROUNDS, (uint8_t *)aes_input, output);
}
|
Update hardware README with notes about simulation configuration
[ci skip] | @@ -5,7 +5,7 @@ three directories:
associativity, number of cores) are in core/config.sv
- fpga/
Components of a quick and dirty system-on-chip test environment. These
- are not part of the Nyuzi core, but are put here to allow testing on FPGA.
+ are not part of the Nyuzi core, but are here to allow testing on FPGA.
Includes an SDRAM controller, VGA controller, AXI interconnect, and other
peripherals like a serial port. (Documentation is
[here](https://github.com/jbush001/NyuziProcessor/wiki/FPGA-Test-Environment)).
@@ -17,13 +17,18 @@ This project uses Emacs [Verilog Mode](http://www.veripool.org/wiki/verilog-mode
to automatically generate wire definitions and resets. If you have Emacs installed,
type 'make autos' from the command line to update the definitions in batch mode.
+When building for simulation, the preprocessor macro `SIMULATION is defined.
+This is used in the code to disable portions of code during synthesis. If you
+are creating a simulation project for another toolchain, make sure this is
+defined.
+
This design uses parameterized memories (FIFOs and SRAM blocks) in the modules
core/sram_1r1w.sv, core/sram_2r1w.sv, and core/sync_fifo.sv. By default, these
instantite simulator versions, which are not synthesizable (at least not
efficiently).
-- For Altera parts, you must set the define `VENDOR_ALTERA, which will use the
- megafunctions ALTSYNCRAM and SCFIFO.
+- For Altera parts, the build files define the preprocessor macro
+ `VENDOR_ALTERA, which will use the megafunctions ALTSYNCRAM and SCFIFO.
- If you want to use this with a different vendor, create a `VENDOR_xxx define and
add a new section that uses the appropriate module.
- For tools that generate memories using a separate memory compiler, running
@@ -31,8 +36,6 @@ efficiently).
sizes in the design. You can tweak the script tools/misc/extract_mems.py to
change the module names or parameter formats.
-## Command Line Arguments
-
Typing make in this directory compiles an executable 'verilator_model' in the
bin/ directory. It accepts the following command line arguments (Verilog prefixes
arguments with a plus sign):
|
Added somme crawlers | @@ -281,6 +281,10 @@ static const char *browsers[][2] = {
{"Jorgee", "Crawlers"},
{"PxBroker", "Crawlers"},
{"Seekport", "Crawlers"},
+ {"adscanner", "Crawlers"},
+ {"linkdexbot", "Crawlers"},
+ {"Cliqzbot", "Crawlers"},
+ {"AfD-Verbotsverfahren_JETZT!","Crawlers"},
/* Podcast fetchers */
{"Downcast", "Podcasts"},
|
Only send available cipher suites in ClientHello
Previously, we were unconditionally sending all of the suites in our
preference list. This will not work if some of the suites are
unavailable. For example, when an older libcrypto version is used to
build s2n. | @@ -138,11 +138,26 @@ int s2n_client_hello_send(struct s2n_connection *conn)
GUARD(s2n_stuffer_write_bytes(out, client_protocol_version, S2N_TLS_PROTOCOL_VERSION_LEN));
GUARD(s2n_stuffer_copy(&client_random, out, S2N_TLS_RANDOM_DATA_LEN));
GUARD(s2n_stuffer_write_uint8(out, session_id_len));
- GUARD(s2n_stuffer_write_uint16(out, conn->config->cipher_preferences->count * S2N_TLS_CIPHER_SUITE_LEN));
+ /* Find the number of available suites in the preference list. Some ciphers may be unavailable if s2n is built
+ * with an older libcrypto
+ */
+ uint16_t num_available_suites = 0;
for (int i = 0; i < conn->config->cipher_preferences->count; i++) {
+ if (conn->config->cipher_preferences->suites[i]->available) {
+ num_available_suites++;
+ }
+ }
+
+ /* Write size of the list of available ciphers */
+ GUARD(s2n_stuffer_write_uint16(out, num_available_suites * S2N_TLS_CIPHER_SUITE_LEN));
+
+ /* Now, write the IANA values every available cipher suite in our list */
+ for (int i = 0; i < conn->config->cipher_preferences->count; i++ ) {
+ if (conn->config->cipher_preferences->suites[i]->available) {
GUARD(s2n_stuffer_write_bytes(out, conn->config->cipher_preferences->suites[i]->iana_value, S2N_TLS_CIPHER_SUITE_LEN));
}
+ }
/* Zero compression methods */
GUARD(s2n_stuffer_write_uint8(out, 1));
|
Avoid bgwriter sending statistics to stat collector when mirror is not in hot standby mode
Stat collector is not started when mirror is not in hot standby mode.
Sending statistics would cause the kernel Recv-Q buffer to be filled up. | #include "access/transam.h"
#include "access/twophase_rmgr.h"
#include "access/xact.h"
+#include "access/xlog.h"
#include "catalog/pg_database.h"
#include "catalog/pg_proc.h"
#include "executor/instrument.h"
@@ -4519,6 +4520,15 @@ pgstat_send_bgwriter(void)
/* We assume this initializes to zeroes */
static const PgStat_MsgBgWriter all_zeroes;
+ /*
+ * Non hot standby mirror should not send bgwriter statistics to the
+ * stat collector, since stat collector is not started when mirror
+ * is not in hot standby mode. Sending statistics would cause the
+ * Recv-Q buffer to be filled up.
+ */
+ if (!EnableHotStandby && IsRoleMirror())
+ return;
+
/*
* This function can be called even if nothing at all has happened. In
* this case, avoid sending a completely empty message to the stats
|
Remove FIXME in reindexdb.c
We are testing PG server version, so we should remain consistent with
upstream and report the PostgreSQL version to the user, otherwise we
would be carrying significant diffs across the codebase with upstream forward.
Authored-by: Brent Doil | @@ -292,10 +292,6 @@ reindex_one_database(const char *name, const char *dbname, const char *type,
conn = connectDatabase(dbname, host, port, username, prompt_password,
progname, echo, false, false);
- /*
- * GPDB_12_MERGE_FIXME: do we still report this as PostgreSQL 12 or should
- * it say Greenplum 7?
- */
if (concurrently && PQserverVersion(conn) < 120000)
{
PQfinish(conn);
|
Corrected CoinbaseMinConfimations | @@ -69,7 +69,7 @@ namespace MiningCore.Blockchain.Bitcoin
public static readonly BigInteger Diff1 = BigInteger.Parse("00ffff0000000000000000000000000000000000000000000000000000", NumberStyles.HexNumber);
- public const int CoinbaseMinConfimations = 101;
+ public const int CoinbaseMinConfimations = 102;
}
public class KnownAddresses
|
examples/spiffs: increase test timeout
This is to address frequent CI test failure where test most likely
timeouts during SPIFFS formatting operation. | @@ -16,7 +16,7 @@ def test_examples_spiffs(env, extra_data):
'example: Reading file',
'example: Read from file: \'Hello World!\'',
'example: SPIFFS unmounted',
- timeout=20)
+ timeout=60)
if __name__ == '__main__':
|
interface: fix tsc error | @@ -14,7 +14,7 @@ interface ResourceRouteProps {
name: string;
}
-export function PermalinkRoutes(props: {}) {
+export function PermalinkRoutes(props: unknown) {
const groups = useGroupState(s => s.groups);
const { query, toQuery } = useQuery();
@@ -70,7 +70,7 @@ function GroupRoutes(props: { group: string; url: string }) {
<Route
path={makePath('/graph/:ship/:name')}
render={({ match, location }) => {
- const { ship, name } = match.params as ResourceRouteProps;
+ const { ship, name } = match.params as unknown as ResourceRouteProps;
const path = `/ship/${ship}/${name}`;
const association = associations.graph[path];
const { url: routeUrl } = match;
|
grunt: Disable ec_feature kbbacklit by SKUID for barla
Disable kbbacklit support for barla.
BRANCH=grunt
TEST=make buildall -j. | @@ -516,7 +516,8 @@ uint32_t board_override_feature_flags0(uint32_t flags0)
* check if the current device is one of them and return
* the default value - with backlight here.
*/
- if (sku == 16 || sku == 17 || sku == 20 || sku == 21)
+ if (sku == 16 || sku == 17 || sku == 20 || sku == 21 || sku == 32
+ || sku == 33)
return (flags0 & ~EC_FEATURE_MASK_0(EC_FEATURE_PWM_KEYB));
else
return flags0;
|
Fix incorrect release folder name in docs | @@ -27,13 +27,13 @@ $ make
You could install to a user folder e.g `$HOME`:
```
-$ cd release; make install DESTDIR=$HOME
+$ cd build/Release; make install DESTDIR=$HOME
```
Or system wide:
```
-$ cd release; sudo make install
+$ cd build/Release; sudo make install
```
## Linux
|
README: general legibility changes
Describes what's literally in this repository. | # Urbit
-A personal server operating function.
+[Urbit](https://urbit.org) is a personal server stack built from scratch. It
+has an identity layer (Azimuth), virtual machine (Vere), and operating system
+(Arvo).
-> The Urbit address space, Azimuth, is now live on the Ethereum blockchain. You
-> can find it at [`0x223c067f8cf28ae173ee5cafea60ca44c335fecb`][azim] or
-> [`azimuth.eth`][aens]. Owners of Azimuth points (galaxies, stars, or planets)
-> can view or manage them using [Bridge][brid], and can also use them to boot
-> [Arvo][arvo], the Urbit OS.
+A running Urbit "ship" is designed to operate with other ships peer-to-peer.
+Urbit is a general-purpose, peer-to-peer computer and network.
+
+This repository contains:
+
+- The [Arvo OS][arvo]
+- [herb][herb], a tool for Unix control of an Urbit ship
+- Source code for [Landscape's web interface][land]
+- Source code for the [vere][vere] virtual machine.
+
+For more on the identity layer, see [Azimuth][azim]. To manage your Urbit
+identity, use [Bridge][brid].
-[azim]: https://etherscan.io/address/0x223c067f8cf28ae173ee5cafea60ca44c335fecb
-[aens]: https://etherscan.io/address/azimuth.eth
-[brid]: https://github.com/urbit/bridge
[arvo]: https://github.com/urbit/urbit/tree/master/pkg/arvo
+[azim]: https://github.com/urbit/azimuth
+[brid]: https://github.com/urbit/bridge
+[herb]: https://github.com/urbit/urbit/tree/master/pkg/herb
+[land]: https://github.com/urbit/urbit/tree/master/pkg/interface
+[vere]: https://github.com/urbit/urbit/tree/master/pkg/urbit
## Install
To install and run Urbit, please follow the instructions at
-[urbit.org/docs/getting-started/][start]. You'll be on the live network in a
+[urbit.org/using/install][start]. You'll be on the live network in a
few minutes.
If you're interested in Urbit development, keep reading.
-[start]: https://urbit.org/docs/getting-started/
+[start]: https://urbit.org/using/install/
## Development
@@ -38,7 +49,7 @@ The Makefile in the project's root directory contains useful phony targets for
building, installing, testing, and so on. You can use it to avoid dealing with
Nix explicitly.
-To build Urbit, for example, use:
+To build the Urbit virtual machine binary, for example, use:
```
make build
@@ -68,12 +79,10 @@ Contributions of any form are more than welcome! Please take a look at our
[contributing guidelines][cont] for details on our git practices, coding
styles, how we manage issues, and so on.
-You might also be interested in:
+For instructions on contributing to Landscape, see [its][lcont] guidelines.
-- joining the [urbit-dev][list] mailing list.
-- [applying to Hoon School][mail], a course we run to teach the Hoon
- programming language and Urbit application development.
+You might also be interested in joining the [urbit-dev][list] mailing list.
[list]: https://groups.google.com/a/urbit.org/forum/#!forum/dev
-[mail]: mailto:[email protected]
[cont]: https://github.com/urbit/urbit/blob/master/CONTRIBUTING.md
+[lcont]: https://github.com/urbit/urbit/blob/master/pkg/interface/CONTRIBUTING.md
\ No newline at end of file
|
windows: Support word-based move/delete key sequences for REPL.
Translate common Ctrl-Left/Right/Delete/Backspace to the EMACS-style
sequences (i.e. Alt key based) for forward-word, backward-word, forwad-kill
and backward-kill. Requires MICROPY_REPL_EMACS_WORDS_MOVE to be defined so
the readline implementation interprets these. | @@ -141,7 +141,7 @@ typedef struct item_t {
const char *seq;
} item_t;
-// map virtual key codes to VT100 escape sequences
+// map virtual key codes to key sequences known by MicroPython's readline implementation
STATIC item_t keyCodeMap[] = {
{VK_UP, "[A"},
{VK_DOWN, "[B"},
@@ -153,10 +153,19 @@ STATIC item_t keyCodeMap[] = {
{0, ""} //sentinel
};
+// likewise, but with Ctrl key down
+STATIC item_t ctrlKeyCodeMap[] = {
+ {VK_LEFT, "b"},
+ {VK_RIGHT, "f"},
+ {VK_DELETE, "d"},
+ {VK_BACK, "\x7F"},
+ {0, ""} //sentinel
+};
+
STATIC const char *cur_esc_seq = NULL;
-STATIC int esc_seq_process_vk(int vk) {
- for (item_t *p = keyCodeMap; p->vkey != 0; ++p) {
+STATIC int esc_seq_process_vk(WORD vk, bool ctrl_key_down) {
+ for (item_t *p = (ctrl_key_down ? ctrlKeyCodeMap : keyCodeMap); p->vkey != 0; ++p) {
if (p->vkey == vk) {
cur_esc_seq = p->seq;
return 27; // ESC, start of escape sequence
@@ -194,14 +203,16 @@ int mp_hal_stdin_rx_chr(void) {
if (rec.EventType != KEY_EVENT || !rec.Event.KeyEvent.bKeyDown) { // only want key down events
continue;
}
+ const bool ctrl_key_down = (rec.Event.KeyEvent.dwControlKeyState & LEFT_CTRL_PRESSED) ||
+ (rec.Event.KeyEvent.dwControlKeyState & RIGHT_CTRL_PRESSED);
+ const int ret = esc_seq_process_vk(rec.Event.KeyEvent.wVirtualKeyCode, ctrl_key_down);
+ if (ret) {
+ return ret;
+ }
const char c = rec.Event.KeyEvent.uChar.AsciiChar;
if (c) { // plain ascii char, return it
return c;
}
- const int ret = esc_seq_process_vk(rec.Event.KeyEvent.wVirtualKeyCode);
- if (ret) {
- return ret;
- }
}
}
|
remove duplicate release | Summary: A general purpose library and file format for storing scientific data
Name: p%{pname}-%{compiler_family}-%{mpi_family}%{PROJ_DELIM}
Version: 1.10.0
-Release: 1
Release: 1%{?dist}
License: Hierarchical Data Format (HDF) Software Library and Utilities License
Group: %{PROJ_NAME}/io-libs
|
Change log message level for FPGA_NO_DAEMON
It should not be a critical error if fpgad is not started. This change
prevents spurious error messages when running fpgadiag or similar apps
without the fpgad daemon. | @@ -133,7 +133,7 @@ static fpga_result daemon_register_event(fpga_handle handle,
}
if (connect(_handle->fdfpgad, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
- FPGA_ERR("connect: %s", strerror(errno));
+ FPGA_DBG("connect: %s", strerror(errno));
result = FPGA_NO_DAEMON;
goto out_close_conn;
}
|
travis: update macOS, Xcode and ruby versions | language: cpp
dist: bionic
-osx_image: xcode11.3
+osx_image: xcode11.4
#
# Define the build matrix
@@ -211,8 +211,8 @@ matrix:
before_install:
- |
if [ "$TRAVIS_OS_NAME" = 'osx' ]; then
- rvm install 2.6.4
- rvm use 2.6.4
+ rvm install 2.6.5
+ rvm use 2.6.5
gem install test-unit --no-document
if [ "$CC" = 'gcc' ]; then
brew upgrade gcc@9
|
[core] do not send Connection: close if h2 | @@ -75,6 +75,7 @@ int http_response_write_header(request_st * const r) {
if ((r->resp_htags & HTTP_HEADER_UPGRADE) && r->http_version == HTTP_VERSION_1_1) {
http_header_response_set(r, HTTP_HEADER_CONNECTION, CONST_STR_LEN("Connection"), CONST_STR_LEN("upgrade"));
} else if (0 == r->keep_alive) {
+ if (r->http_version <= HTTP_VERSION_1_1) /*(e.g. not HTTP_VERSION_2)*/
http_header_response_set(r, HTTP_HEADER_CONNECTION, CONST_STR_LEN("Connection"), CONST_STR_LEN("close"));
} else if (r->http_version == HTTP_VERSION_1_0) {/*(&& r->keep_alive != 0)*/
http_header_response_set(r, HTTP_HEADER_CONNECTION, CONST_STR_LEN("Connection"), CONST_STR_LEN("keep-alive"));
|
http_server: metrics: add Content-Type | #include <fluent-bit/flb_http_server.h>
#include <msgpack.h>
-#define PROMETHEUS_HEADER "text/plain; version=0.0.4"
-
#define null_check(x) do { if (!x) { goto error; } else {sds = x;} } while (0)
pthread_key_t hs_metrics_key;
@@ -515,9 +513,7 @@ void cb_metrics_prometheus(mk_request_t *request, void *data)
buf->users--;
mk_http_status(request, 200);
- mk_http_header(request,
- "Content-Type", 12,
- PROMETHEUS_HEADER, sizeof(PROMETHEUS_HEADER) - 1);
+ flb_hs_add_content_type_to_req(request, FLB_HS_CONTENT_TYPE_PROMETHEUS);
mk_http_send(request, sds, flb_sds_len(sds), NULL);
for (i = 0; i < num_metrics; i++) {
flb_sds_destroy(metrics_arr[i]);
@@ -558,6 +554,7 @@ static void cb_metrics(mk_request_t *request, void *data)
buf->users++;
mk_http_status(request, 200);
+ flb_hs_add_content_type_to_req(request, FLB_HS_CONTENT_TYPE_JSON);
mk_http_send(request, buf->data, flb_sds_len(buf->data), NULL);
mk_http_done(request);
|
performance improvements for normals only work in 2018 alas. | @@ -1600,9 +1600,10 @@ OutputGeometryPart::computeMesh(
{
vertexLockedNormal = &lockedNormal;
}
-
+#if MAYA_API_VERSION >= 201800
MIntArray edgeIds;
MIntArray edgeSmoothing;
+#endif
size_t polygonVertexOffset = 0;
for(MItMeshPolygon itMeshPolygon(meshDataObj);
!itMeshPolygon.isDone(); itMeshPolygon.next())
@@ -1631,15 +1632,24 @@ OutputGeometryPart::computeMesh(
|| (*vertexLockedNormal)[polygonVertexIndex2]))
)
{
+#if MAYA_API_VERSION >= 201800
edgeIds.append(edges[i]);
edgeSmoothing.append( !intArray[polygonVertexIndex1]);
+#else
+ CHECK_MSTATUS(meshFn.setEdgeSmoothing(
+ edges[i],
+ !intArray[polygonVertexIndex1]
+ ));
+#endif
}
}
polygonVertexOffset += numVertices;
}
+#if MAYA_API_VERSION >= 201800
if(edgeIds.length() > 0) {
CHECK_MSTATUS(meshFn.setEdgeSmoothings( edgeIds, edgeSmoothing));
}
+#endif
assert(polygonVertexOffset == intArray.size());
}
}
|
filter_rewrite_tag: use proper logging API | @@ -40,7 +40,8 @@ static int emitter_create(struct flb_rewrite_tag *ctx)
ret = flb_input_name_exists(ctx->emitter_name, ctx->config);
if (ret == FLB_TRUE) {
- flb_plg_error(ctx->ins, "emitter_name '%s' already exists");
+ flb_plg_error(ctx->ins, "emitter_name '%s' already exists",
+ ctx->emitter_name);
return -1;
}
@@ -140,7 +141,7 @@ static int process_config(struct flb_rewrite_tag *ctx)
entry = flb_slist_entry_get(val->val.list, 0);
rule->ra_key = flb_ra_create(entry->str, FLB_FALSE);
if (!rule->ra_key) {
- flb_error("[filter_rewrite_tag] invalid record accessor key? '%s'",
+ flb_plg_error(ctx->ins, "invalid record accessor key ? '%s'",
entry->str);
flb_free(rule);
return -1;
@@ -150,7 +151,7 @@ static int process_config(struct flb_rewrite_tag *ctx)
entry = flb_slist_entry_get(val->val.list, 1);
rule->regex = flb_regex_create(entry->str);
if (!rule->regex) {
- flb_error("[filter_rewrite_tag] could not compile regex pattern '%s'",
+ flb_plg_error(ctx->ins, "could not compile regex pattern '%s'",
entry->str);
flb_ra_destroy(rule->ra_key);
flb_free(rule);
@@ -162,7 +163,7 @@ static int process_config(struct flb_rewrite_tag *ctx)
rule->ra_tag = flb_ra_create(entry->str, FLB_FALSE);
if (!rule->ra_tag) {
- flb_error("[filter_rewrite_tag] could not compose tag", entry->str);
+ flb_plg_error(ctx->ins, "could not compose tag", entry->str);
flb_ra_destroy(rule->ra_key);
flb_regex_destroy(rule->regex);
flb_free(rule);
@@ -178,7 +179,7 @@ static int process_config(struct flb_rewrite_tag *ctx)
}
if (mk_list_size(&ctx->rules) == 0) {
- flb_warn("[filter_rewrite_tag] no rules have defined");
+ flb_plg_warn(ctx->ins, "no rules have defined");
return 0;
}
|
Access data after obtaining the lock not before.
It isn't completely clear that this constitutes a race condition, but it will
always be conservative to access the locked data after getting the lock. | @@ -49,8 +49,8 @@ static EX_CALLBACKS *get_and_lock(OPENSSL_CTX *ctx, int class_index)
return NULL;
}
- ip = &global->ex_data[class_index];
CRYPTO_THREAD_write_lock(global->ex_data_lock);
+ ip = &global->ex_data[class_index];
return ip;
}
|
add one unit test case for warmstart | @@ -293,3 +293,46 @@ static bool test_iter_irgnm_l1(void)
UT_REGISTER_TEST(test_iter_irgnm_l1);
+
+static bool test_iter_lsqr_warmstart(void)
+{
+ enum { N = 3 };
+ long dims[N] = { 4, 2, 3 };
+
+ complex float* src1 = md_alloc(N, dims, CFL_SIZE);
+ complex float* dst1 = md_alloc(N, dims, CFL_SIZE);
+ complex float* dst2 = md_alloc(N, dims, CFL_SIZE);
+
+ md_zfill(N, dims, src1, 1.);
+ md_zfill(N, dims, dst1, 0.);
+
+ md_copy(N, dims, dst2, src1, CFL_SIZE);
+
+ const struct linop_s* id = linop_identity_create(3, dims);
+
+ linop_forward_unchecked(id, dst1, src1);
+
+ const struct operator_p_s* lsqr = NULL;
+
+ struct iter_conjgrad_conf conf = iter_conjgrad_defaults;
+ conf.maxiter = 0;
+
+ lsqr = lsqr2_create(&lsqr_defaults,
+ iter2_conjgrad, CAST_UP(&conf),
+ NULL, true, id, NULL,
+ 0, NULL, NULL, NULL);
+
+ operator_p_apply(lsqr, 1., N, dims, dst2, N, dims, src1);
+
+ double err = md_znrmse(N, dims, dst1, dst2);
+
+ linop_free(id);
+
+ md_free(src1);
+ md_free(dst1);
+ md_free(dst2);
+
+ UT_ASSERT(err < UT_TOL);
+}
+
+UT_REGISTER_TEST(test_iter_lsqr_warmstart);
|
lpc: Migrate BAR assignment to phys_map_get()
Keeps existing address. No functional change. | #include <ccan/str/str.h>
#include <interrupts.h>
#include <inttypes.h>
+#include <phys-map.h>
+#include <chip.h>
#include "hdata.h"
@@ -316,12 +318,9 @@ static void bmc_create_node(const struct HDIF_common_hdr *sp)
return;
#define GB (1024ul * 1024ul * 1024ul)
-#define MMIO_LPC_BASE_P9 0x6030000000000ul
-#define MMIO_STRIDE_P9 0x40000000000ul
-
chip_id = be32_to_cpu(iopath->lpc.chip_id);
- lpcm_base = MMIO_LPC_BASE_P9 + MMIO_STRIDE_P9 * chip_id;
+ phys_map_get(get_chip(chip_id), LPC_BUS, 0, &lpcm_base, NULL);
lpcm = dt_new_addr(dt_root, "lpcm-opb", lpcm_base);
assert(lpcm);
|
Prevent to turn screen off if no control
If --no-control is set, then the controller is not initialized (both in
the client and the server), so it is not possible to control the device
to turn its screen off.
See <https://github.com/Genymobile/scrcpy/issues/608>. | @@ -414,6 +414,11 @@ parse_args(struct args *args, int argc, char *argv[]) {
}
}
+ if (args->no_control && args->turn_screen_off) {
+ LOGE("Cannot request to turn screen off if control is disabled");
+ return false;
+ }
+
return true;
}
|
Correct IP mask code for class A, B and C networks | @@ -313,11 +313,11 @@ void DeRestPluginPrivate::configToMap(const ApiRequest &req, QVariantMap &map)
continue;
}
- if ((ipv4 & 0xa0000000UL) != 0xa0000000UL &&
- (ipv4 & 0xb0000000UL) != 0xb0000000UL &&
- (ipv4 & 0xc0000000UL) != 0xc0000000UL)
+ if ((ipv4 & 0x80000000UL) != 0x00000000UL && // class A 0xxx xxxx
+ (ipv4 & 0xc0000000UL) != 0x80000000UL && // class B 10xx xxxx
+ (ipv4 & 0xe0000000UL) != 0xc0000000UL) // class C 110x xxxx
{
- // class A, B or C network
+ // unsupported network
continue;
}
|
Write payload if given | @@ -271,7 +271,15 @@ class SBP(object):
self.parser.build_stream(payload, self.stream_payload)
return self.stream_payload.length
+ def _write_payload(self, buf, offset, payload):
+ self.stream_payload.reset(buf, offset)
+ self.stream_payload.write(payload)
+ return self.stream_payload.length
+
def into_buffer(self, buf, offset):
+ if self.payload:
+ return self.pack_into(buf, offset, self._write_payload)
+ else:
def _empty_payload(_buf, _offset, _payload):
return 0
return self.pack_into(buf, offset, _empty_payload)
|
do not encode heaps management tuple | @@ -103,6 +103,7 @@ static void init_kernel_heaps_management(tuple root)
set(heaps, sym(physical), heap_management((heap)heap_physical(kh)));
set(heaps, sym(general), heap_management((heap)heap_general(kh)));
set(heaps, sym(locked), heap_management((heap)heap_locked(kh)));
+ set(heaps, sym(no_encode), null_value);
set(root, sym(heaps), heaps);
}
|
Fix abstract comment in quic_platform_posix.h that just claims it's for linux | Abstract:
- This file contains linux platform implementation.
+ This file contains POSIX platform implementations of the
+ QUIC Platform Interfaces.
Environment:
- Linux user mode
+ POSIX user mode
--*/
|
fix version flags for hilighting new menu items so they work for
versions other than 2018 | @@ -567,7 +567,7 @@ houdiniEngineCreateUI()
global string $gMainWindow;
setParent $gMainWindow;
-
+ string $mayaVersion = `about -version`;
menu -label "Houdini Engine"
-tearOff true
houdiniEngineMenu;
@@ -598,13 +598,13 @@ houdiniEngineCreateUI()
menuItem -label "Sync Asset"
-command "houdiniEngine_syncSelectedAsset";
menuItem -label "Bake Asset"
- -version 2019
+ -version $mayaVersion
-command "houdiniEngine_bakeSelectedAssets";
menuItem -label "Remove Asset From History"
- -version 2019
+ -version $mayaVersion
-command "houdiniEngine_removeSelectedHistory";
menuItem -label "Add Asset To Mesh History"
- -version 2019
+ -version $mayaVersion
-command "houdiniEngine_addSelectedHistory";
menuItem -label "Reload Asset"
-command "houdiniEngine_reloadSelectedAssets";
@@ -631,16 +631,20 @@ houdiniEngineCreateUI()
menuItem
-label "Show/Hide"
+ -version $mayaVersion
-subMenu true
-tearOff true;
menuItem -label "Hide Assets in Outliner"
+ -version $mayaVersion
-command "houdiniEngine_showOutliner 0 0";
menuItem -label "Hide History Assets in Outliner"
+ -version $mayaVersion
-command "houdiniEngine_showOutliner 0 1";
menuItem -label "Show Assets in Outliner"
+ -version $mayaVersion
-command "houdiniEngine_showOutliner 1 0";
setParent -menu ..;
|
Really fix zlib build with GCC 4.
Note: mandatory check (NEED_CHECK) was skipped | @@ -433,15 +433,19 @@ typedef uLong FAR uLongf;
#ifdef __GNUC__
# define Z_HAVE_UNISTD_H
-#elif __has_include(<unistd.h>)
+#else
+# if __has_include(<unistd.h>)
# define Z_HAVE_UNISTD_H
# endif
+#endif
#ifdef __GNUC__
# define Z_HAVE_UNISTD_H
-#elif __has_include(<stdarg.h>)
+#else
+# if __has_include(<stdarg.h>)
# define Z_HAVE_STDARG_H
# endif
+#endif
#ifdef STDC
# ifndef Z_SOLO
|
Use i3's dimensions for initial scratchpad views
See | @@ -16,8 +16,8 @@ static swayc_t *fetch_view_from_scratchpad() {
wlc_view_set_output(view->handle, swayc_active_output()->handle);
}
if (!view->is_floating) {
- view->width = swayc_active_workspace()->width/2;
- view->height = swayc_active_workspace()->height/2;
+ view->width = swayc_active_workspace()->width * 0.5;
+ view->height = swayc_active_workspace()->height * 0.75;
view->x = (swayc_active_workspace()->width - view->width)/2;
view->y = (swayc_active_workspace()->height - view->height)/2;
}
|
Changelog note for
Fix Undefine-shift in sldns_str2wire_hip_buf. | +25 January 2022: Wouter
+ - Fix #610: Undefine-shift in sldns_str2wire_hip_buf.
+
19 January 2022: George
- For dnstap, do not wakeupnow right there. Instead zero the timer to
force the wakeup callback asap.
|
[bsp][stm32] add more stm32 bsp to ci | @@ -81,11 +81,17 @@ env:
- RTT_BSP='stm32l475-iot-disco' RTT_TOOL_CHAIN='sourcery-arm'
- RTT_BSP='stm32l476-nucleo' RTT_TOOL_CHAIN='sourcery-arm'
- RTT_BSP='stm32h743-nucleo' RTT_TOOL_CHAIN='sourcery-arm'
+ - RTT_BSP='stm32/stm32f091-nucleo' RTT_TOOL_CHAIN='sourcery-arm'
- RTT_BSP='stm32/stm32f103-atk-nano' RTT_TOOL_CHAIN='sourcery-arm'
- RTT_BSP='stm32/stm32f103-fire-arbitrary' RTT_TOOL_CHAIN='sourcery-arm'
- RTT_BSP='stm32/stm32f407-atk-explorer' RTT_TOOL_CHAIN='sourcery-arm'
+ - RTT_BSP='stm32/stm32f407-st-discovery' RTT_TOOL_CHAIN='sourcery-arm'
+ - RTT_BSP='stm32/stm32f429-armfly-v6' RTT_TOOL_CHAIN='sourcery-arm'
- RTT_BSP='stm32/stm32f429-atk-apollo' RTT_TOOL_CHAIN='sourcery-arm'
- RTT_BSP='stm32/stm32f429-fire-challenger' RTT_TOOL_CHAIN='sourcery-arm'
+ - RTT_BSP='stm32/stm32f767-atk-apollo' RTT_TOOL_CHAIN='sourcery-arm'
+ - RTT_BSP='stm32/stm32f767-fire-challenger' RTT_TOOL_CHAIN='sourcery-arm'
+ - RTT_BSP='stm32/stm32l475-atk-pandora' RTT_TOOL_CHAIN='sourcery-arm'
# - RTT_BSP='taihu' RTT_TOOL_CHAIN='sourcery-ppc'
# - RTT_BSP='upd70f3454' # iar
# - RTT_BSP='x86' # x86
|
pbdrv/nxtcolor: Support all ports | @@ -30,12 +30,30 @@ typedef struct {
} pbdrv_nxtcolor_pininfo_t;
static const pbdrv_nxtcolor_pininfo_t pininfo[4] = {
+ [PBIO_PORT_1 - PBIO_PORT_1] = {
+ .digi0 = 2,
+ .digi1 = 15,
+ .adc_val = 5,
+ .adc_con = 6,
+ },
[PBIO_PORT_2 - PBIO_PORT_1] = {
.digi0 = 14,
.digi1 = 13,
.adc_val = 7,
.adc_con = 8,
},
+ [PBIO_PORT_3 - PBIO_PORT_1] = {
+ .digi0 = 12,
+ .digi1 = 30,
+ .adc_val = 9,
+ .adc_con = 10,
+ },
+ [PBIO_PORT_4 - PBIO_PORT_1] = {
+ .digi0 = 1,
+ .digi1 = 31,
+ .adc_val = 11,
+ .adc_con = 12,
+ },
};
static const pbio_light_color_t lamp_colors[] = {
@@ -262,11 +280,6 @@ static pbio_error_t nxtcolor_init_fs(pbdrv_nxtcolor_t *nxtcolor, pbio_port_t por
pbio_error_t err;
- // Support only port 2 for now
- if (port != PBIO_PORT_2) {
- return PBIO_ERROR_NOT_IMPLEMENTED;
- }
-
// Get the pin info for this port
nxtcolor->pins = &pininfo[port-PBIO_PORT_1];
|
[chainmaker][#436]add longsize test case | @@ -207,6 +207,25 @@ START_TEST(test_001CreateWallet_0006_CreateOneTimeWalletFailureShortSize)
}
END_TEST
+START_TEST(test_001CreateWallet_0007_CreateOneTimeWalletSucessLongSize)
+{
+ BSINT32 rtnVal;
+ BoatHlchainmakerWallet *g_chaninmaker_wallet_ptr;
+ BoatHlchainmakerWalletConfig wallet_config = get_chainmaker_wallet_settings();
+ extern BoatIotSdkContext g_boat_iot_sdk_context;
+
+ /* 1. execute unit test */
+ rtnVal = BoatWalletCreate(BOAT_PROTOCOL_CHAINMAKER, NULL, &wallet_config, sizeof(BoatHlchainmakerWalletConfig) + 10);
+
+ /* 2. verify test result */
+ /* 2-1. verify the return value */
+ ck_assert_int_eq(rtnVal, BOAT_SUCCESS);
+
+ /* 2-2. verify the global variables that be affected */
+ ck_assert(g_boat_iot_sdk_context.wallet_list[0].is_used == true);
+}
+END_TEST
+
START_TEST(test_002DeleteWallet_0001DeleteWalletFailureNullFleName)
{
BoatWalletDelete(NULL);
@@ -245,6 +264,7 @@ Suite *make_wallet_suite(void)
tcase_add_test(tc_wallet_api, test_001CreateWallet_0004CreateLoadWalletSuccess);
tcase_add_test(tc_wallet_api, test_001CreateWallet_0005CreateLoadWalletFailureNoExist);
tcase_add_test(tc_wallet_api, test_001CreateWallet_0006_CreateOneTimeWalletFailureShortSize);
+ tcase_add_test(tc_wallet_api, test_001CreateWallet_0007_CreateOneTimeWalletSucessLongSize);
tcase_add_test(tc_wallet_api, test_002DeleteWallet_0001DeleteWalletFailureNullFleName);
tcase_add_test(tc_wallet_api, test_002DeleteWallet_0002DeleteWalletFailureNoExistingFile);
tcase_add_test(tc_wallet_api, test_002DeleteWallet_0003DeleteWalletSucessExistingFile);
|
DDF: Remove old read/write/parse array function code | @@ -318,43 +318,19 @@ static DeviceDescription::Item DDF_ParseItem(const QJsonObject &obj)
}
const auto parse = obj.value(QLatin1String("parse"));
- if (parse.isArray())
- {
- const auto arr = parse.toArray();
- for (const auto &i : arr)
- {
- result.parseParameters.push_back(i.toVariant());
- }
- }
- else if (parse.isObject())
+ if (parse.isObject())
{
result.parseParameters.push_back(parse.toVariant());
}
const auto read = obj.value(QLatin1String("read"));
- if (read.isArray())
- {
- const auto arr = read.toArray();
- for (const auto &i : arr)
- {
- result.readParameters.push_back(i.toVariant());
- }
- }
- else if (read.isObject())
+ if (read.isObject())
{
result.readParameters.push_back(read.toVariant());
}
const auto write = obj.value(QLatin1String("write"));
- if (write.isArray())
- {
- const auto arr = write.toArray();
- for (const auto &i : arr)
- {
- result.writeParameters.push_back(i.toVariant());
- }
- }
- else if (write.isObject())
+ if (write.isObject())
{
result.writeParameters.push_back(write.toVariant());
}
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.