message
stringlengths
6
474
diff
stringlengths
8
5.22k
Improve reachable checks for FLS-NB sensors
@@ -9295,6 +9295,11 @@ void DeRestPluginPrivate::handleOnOffClusterIndication(TaskItem &task, const deC } } + if (!s.isAvailable()) + { + checkSensorNodeReachable(&s); + } + s.incrementRxCounter(); item = s.item(RStatePresence); if (item) @@ -9568,6 +9573,29 @@ void DeRestPluginPrivate::handleZdpIndication(const deCONZ::ApsDataIndication &i lightNode.clearRead(READ_MODEL_ID); } } + + if (lightNode.modelId().startsWith(QLatin1String("FLS-NB"))) + { + for (Sensor &s: sensors) + { + if (s.address().ext() != lightNode.address().ext()) + { + continue; + } + + if (!s.node() && lightNode.node()) + { + s.setNode(lightNode.node()); + } + + if (s.isAvailable()) + { + continue; + } + + checkSensorNodeReachable(&s); + } + } } }
Fix Error: chip/rp2040_cyw43439.c:844:46: error: format specifies type 'unsigned long' but the argument has type 'uint32_t' (aka 'unsigned int') [-Werror,-Wformat]
@@ -841,9 +841,9 @@ gspi_dev_t *rp2040_cyw_setup(uint8_t gpio_on, return NULL; } - wlinfo("setup complete. gspi = 0x%08lX\n", (uint32_t) gspi); + wlinfo("setup complete. gspi = 0x%p\n", gspi); - return (void *)gspi; + return gspi; } /****************************************************************************
Remove random seek on VCF as not all platform support it.
@@ -61,10 +61,15 @@ namespace ebi if (!(fasta.get())) { // No local/remote fasta file provided std::string reference_accession; std::vector<std::string> contigs; - std::streampos vcfInputStreamPosCache = vcf_input.tellg(); for (size_t line_num = 1; util::readline(vcf_input, vector_line).size() != 0; ++line_num) { std::string line{vector_line.begin(), vector_line.end()}; + if (boost::starts_with(line, "#")) { + for (auto & output : outputs ) { + output->write_meta_info(line); + } + } + if (!boost::starts_with(line, "##")) { break; } @@ -87,9 +92,6 @@ namespace ebi for ( auto contig : contigs ) { fasta->sequence(contig, 0, 1); } - - // Rewind to where it was - vcf_input.seekg(vcfInputStreamPosCache, std::ios_base::beg); } return process_vcf_records(vcf_input, fasta, assembly_report, outputs);
access: Don't try to add back file to the corpus dir
@@ -314,11 +314,17 @@ static void fuzz_addFileToFileQLocked(honggfuzz_t * hfuzz, uint8_t * data, size_ } char fname[PATH_MAX]; - uint64_t crc64 = util_CRC64(data, size); snprintf(fname, sizeof(fname), "%s/%016" PRIx64 ".%08" PRIx32 ".honggfuzz.cov", hfuzz->covDir ? hfuzz->covDir : hfuzz->inputDir, crc64, (uint32_t) size); + if (access(fname, R_OK) == 0) { + LOG_D("File '%s' already exists in the corpus directory", fname); + return; + } + + LOG_D("Adding file '%s' to the corpus directory", fname); + if (files_writeBufToFile(fname, data, size, O_WRONLY | O_CREAT | O_EXCL | O_TRUNC | O_CLOEXEC) == false) { LOG_W("Couldn't write buffer to file '%s'", fname);
Pickers: Fix regression bug
@@ -1522,6 +1522,10 @@ CreateFileSystemForCustom ( return FileSystem; } +// +// @retval EFI_SUCCESS One or more entries added. +// @retval EFI_NOT_FOUND No entries added. +// STATIC EFI_STATUS AddFileSystemEntryForCustom ( @@ -1530,21 +1534,13 @@ AddFileSystemEntryForCustom ( IN UINT32 PrecreatedCustomIndex ) { + EFI_STATUS ReturnStatus; EFI_STATUS Status; UINTN Index; UINT32 CsrActiveConfig; - // - // When there are no custom entries and NVRAM reset is hidden - // we have no work to do. - // - if (BootContext->PickerContext->AllCustomEntryCount == 0 - && (!BootContext->PickerContext->ShowNvramReset - || BootContext->PickerContext->HideAuxiliary)) { - return EFI_NOT_FOUND; - } + ReturnStatus = EFI_NOT_FOUND; - Status = EFI_NOT_FOUND; for (Index = 0; Index < BootContext->PickerContext->AllCustomEntryCount; ++Index) { // // Skip the custom boot entry that has already been created. @@ -1553,11 +1549,15 @@ AddFileSystemEntryForCustom ( continue; } - AddBootEntryFromCustomEntry ( + Status = AddBootEntryFromCustomEntry ( BootContext, FileSystem, &BootContext->PickerContext->CustomEntries[Index] ); + + if (!EFI_ERROR (Status)) { + ReturnStatus = EFI_SUCCESS; + } } if (BootContext->PickerContext->ShowToggleSip) { @@ -1571,10 +1571,14 @@ AddFileSystemEntryForCustom ( OC_FLAVOUR_TOGGLE_SIP, InternalSystemActionToggleSip ); + + if (!EFI_ERROR (Status)) { + ReturnStatus = EFI_SUCCESS; + } } } - if (!EFI_ERROR (Status) && BootContext->PickerContext->ShowNvramReset) { + if (BootContext->PickerContext->ShowNvramReset) { Status = AddBootEntryFromSystemEntry ( BootContext, FileSystem, @@ -1583,9 +1587,13 @@ AddFileSystemEntryForCustom ( OC_FLAVOUR_RESET_NVRAM, InternalSystemActionResetNvram ); + + if (!EFI_ERROR (Status)) { + ReturnStatus = EFI_SUCCESS; + } } - return Status; + return ReturnStatus; } STATIC
Agent now properly counts unicode characters as a single character.
"." (t s.t.dat) == %+ weld - (reap (sub +(wyd) (min wyd (lent i.txs))) ' ') + (reap (sub +(wyd) (min wyd (lent (tuba i.txs)))) ' ') time %- flop %+ roll `(list tape)`txs (~(del in aud) [%& who (main who)]) == =. wyd (sub wyd (lent pef)) - =+ txt=(trip msg.sep) + =/ txt (tuba (trip msg.sep)) |- ^- (list tape) ?~ txt ~ =/ end ?: (lte (lent txt) wyd) (lent txt) - =+ ace=(find " " (flop (scag +(wyd) `tape`txt))) + =+ ace=(find " " (flop (scag +(wyd) `(list @c)`txt))) ?~ ace wyd (sub wyd u.ace) - :- (weld pef (scag end `tape`txt)) - $(txt (slag +(end) `tape`txt), pef (reap (lent pef) ' ')) ::TODO? why do we need to cast? + :- (weld pef (tufa (scag end `(list @c)`txt))) + $(txt (slag +(end) `(list @c)`txt), pef (reap (lent pef) ' ')) :: $inv :_ ~
lock: Increase con_suspend before __try_lock Otherwise, we might have the lock and hit prlog's inside __try_lock() in the list check (among others) in debug builds.
@@ -193,13 +193,15 @@ bool try_lock_caller(struct lock *l, const char *owner) if (bust_locks) return true; - if (__try_lock(cpu, l)) { - l->owner = owner; if (l->in_con_path) cpu->con_suspend++; + if (__try_lock(cpu, l)) { + l->owner = owner; list_add(&cpu->locks_held, &l->list); return true; } + if (l->in_con_path) + cpu->con_suspend--; return false; }
EC_GROUP_new_by_curve_name_with_libctx(): Add name of unknown group to error output
#include "ec_local.h" #include <openssl/err.h> #include <openssl/obj_mac.h> +#include <openssl/objects.h> #include <openssl/opensslconf.h> #include "internal/nelem.h" #include "e_os.h" /* strcasecmp required by windows */ @@ -3298,6 +3299,9 @@ EC_GROUP *EC_GROUP_new_by_curve_name_with_libctx(OPENSSL_CTX *libctx, if ((curve = ec_curve_nid2curve(nid)) == NULL || (ret = ec_group_new_from_data(libctx, propq, *curve)) == NULL) { ECerr(0, EC_R_UNKNOWN_GROUP); +#ifndef FIPS_MODULE + ERR_add_error_data(2, "name=", OBJ_nid2sn(nid)); +#endif return NULL; }
(388) Fix integration test for kafka test failure (website change)
@@ -20,8 +20,8 @@ RUN mkdir /kafka /data /logs # Download Kafka binary distribution #COPY ./kafka/kafka_2.13-2.5.0.tgz /tmp/kafka_2.13-2.5.0.tgz -ADD http://www.us.apache.org/dist/kafka/${KAFKA_VERSION}/${KAFKA_RELEASE_ARCHIVE} /tmp/ -ADD https://dist.apache.org/repos/dist/release/kafka/${KAFKA_VERSION}/${KAFKA_RELEASE_ARCHIVE}.md5 /tmp/ +ADD https://downloads.apache.org/kafka/${KAFKA_VERSION}/${KAFKA_RELEASE_ARCHIVE} /tmp/ +ADD https://downloads.apache.org/kafka/${KAFKA_VERSION}/${KAFKA_RELEASE_ARCHIVE}.md5 /tmp/ WORKDIR /tmp
storage: enhance version and init message
@@ -324,17 +324,16 @@ static int sort_chunk_cmp(const void *a_arg, const void *b_arg) static void print_storage_info(struct flb_config *ctx, struct cio_ctx *cio) { + char *type; char *sync; char *checksum; struct flb_input_instance *in; - flb_info("[storage] version=%s, initializing...", cio_version()); - if (cio->root_path) { - flb_info("[storage] root path '%s'", cio->root_path); + type = "memory+filesystem"; } else { - flb_info("[storage] in-memory"); + type = "memory-only"; } if (cio->flags & CIO_FULL_SYNC) { @@ -351,8 +350,8 @@ static void print_storage_info(struct flb_config *ctx, struct cio_ctx *cio) checksum = "disabled"; } - flb_info("[storage] %s synchronization mode, checksum %s, max_chunks_up=%i", - sync, checksum, ctx->storage_max_chunks_up); + flb_info("[storage] version=%s, type=%s, sync=%s, checksum=%s, max_chunks_up=%i", + cio_version(), type, sync, checksum, ctx->storage_max_chunks_up); /* Storage input plugin */ if (ctx->storage_input_plugin) {
osx: trying to fix
@@ -34,7 +34,12 @@ macx { ../../curl/lib\ ../../curl/lib/vauth\ ../../curl/lib/vtls -SOURCES += ../../curl/lib/http_ntlm.c +SOURCES += ../../curl/lib/http_ntlm.c\ +../../curl/lib/vauth/ntlm.c\ +../../curl/lib/smb.c\ +../../curl/lib/vtls/openssl.c + + #../../curl/lib/qssl.c\ #../../curl/lib/ssluse.c }
update gx option code: use helpers.
@@ -2958,26 +2958,17 @@ static int stlink_write_option_bytes_gx(stlink_t *sl, uint8_t* base, stm32_addr_ (void) addr; (void) len; + wait_flash_busy(sl); + if (unlock_flash_if(sl)) { ELOG("Flash unlock failed! System reset required to be able to unlock it again!\n"); return -1; } - /* Unlock option bytes if necessary (ref manuel page 61) */ - stlink_read_debug32(sl, STM32Gx_FLASH_CR, &val); - if ((val & (1 << STM32Gx_FLASH_CR_OPTLOCK))) { - - /* disable option byte write protection. */ - stlink_write_debug32(sl, STM32Gx_FLASH_OPTKEYR, FLASH_OPTKEY1); - stlink_write_debug32(sl, STM32Gx_FLASH_OPTKEYR, FLASH_OPTKEY2); - - /* check that the lock is no longer set. */ - stlink_read_debug32(sl, STM32Gx_FLASH_CR, &val); - if ((val & (1 << STM32Gx_FLASH_CR_OPTLOCK))) { - ELOG("Options bytes unlock failed! System reset required to be able to unlock it again!\n"); + if (unlock_flash_option_if(sl)) { + ELOG("Flash option unlock failed!\n"); return -1; } - } /* Write options bytes */ uint32_t data; @@ -3003,12 +2994,8 @@ static int stlink_write_option_bytes_gx(stlink_t *sl, uint8_t* base, stm32_addr_ val |= (1 << STM32Gx_FLASH_CR_OBL_LAUNCH); stlink_write_debug32(sl, STM32Gx_FLASH_CR, val); - /* Re-lock option bytes */ - stlink_read_debug32(sl, STM32Gx_FLASH_CR, &val); - val |= (1u << STM32Gx_FLASH_CR_OPTLOCK); - stlink_write_debug32(sl, STM32Gx_FLASH_CR, val); - /* Re-lock flash. */ + lock_flash_option(sl); lock_flash(sl); return 0;
process-spawn.c: switch uv_socketpair to uv_pipe to remove the socket dependence
@@ -738,7 +738,7 @@ index 0f4bf938..dd36028b 100644 time_base = loop->time; diff --git a/src/unix/process-spawn.c b/src/unix/process-spawn.c new file mode 100644 -index 00000000..78401ca5 +index 00000000..755efc84 --- /dev/null +++ b/src/unix/process-spawn.c @@ -865,7 +865,7 @@ index 00000000..78401ca5 + if (container->data.stream->type != UV_NAMED_PIPE) + return UV_EINVAL; + else -+ return uv_socketpair(SOCK_STREAM, 0, fds, 0, 0); ++ return uv_pipe(fds, 0, 0); + + case UV_INHERIT_FD: + case UV_INHERIT_STREAM:
get rid of unused but:epic
$: qix/(map @t @t) :: query ced/cred :: client credentials bem/beam :: original path - but/path :: ending == :: += gram :: inter-ship message $? [[%lon ~] p=hole] :: login request |= {bem/beam ced/noun:cred quy/quer} ^- epic =+ qix=|-(`quay`?~(quy quy [[p q]:quy $(quy t.quy)])) - [(malt qix) ((hard cred) ced) bem /] + [(malt qix) ((hard cred) ced) bem] -- ::eyre :: :: :::: ++wired :: wire formatting
doc: add dini entry in plugins
@@ -74,6 +74,7 @@ files. Read and write everything a KeySet might contain: +- [dini](dini/) uses by default the ini plugin but has legacy support for dump - [dump](dump/) makes a dump of a KeySet in an Elektra-specific format Read (and write) standard config files:
Add doc/std/README.md "Modules and Dependencies"
@@ -32,3 +32,36 @@ See also the [glossary](/doc/glossary.md), as well as the notes on: - [Coroutines](/doc/note/coroutines.md). - [Initialization](/doc/note/initialization.md). - [Statuses](/doc/note/statuses.md). + + +## Modules and Dependencies + +By default, building Wuffs' standard library builds the entire thing (provided +that you've defined the `WUFFS_IMPLEMENTATION` C macro), implementing a variety +of codecs and file formats. + +Packages can be individually allow-listed, for smaller binaries and faster +compiles. Opt in by also defining `WUFFS_CONFIG__MODULES` and then also +`WUFFS_CONFIG__MODULE__ETC` for each `ETC` (and its dependencies, listed below) +to enable. + +- `ADLER32: BASE` +- `BMP: BASE` +- `CBOR: BASE` +- `CRC32: BASE` +- `DEFLATE: BASE` +- `GIF: BASE, LZW` +- `GZIP: BASE, CRC32, DEFLATE` +- `JSON: BASE` +- `LZW: BASE` +- `NIE: BASE` +- `PNG: BASE, ADLER32, CRC32, DEFLATE, ZLIB` +- `WBMP: BASE` +- `ZLIB: BASE, ADLER32, DEFLATE` + +For the [auxiliary modules](/doc/note/auxiliary-code.md): + +- `AUX_CBOR: AUX_BASE, BASE, CBOR` +- `AUX_IMAGE: AUX_BASE, BASE` and whichever image-related modules (and their + dependencies) you want, e.g. `GIF`, `PNG`, etc. +- `AUX_JSON: AUX_BASE, BASE, JSON`
remove a loop from hmac_init
@@ -100,22 +100,19 @@ static int s2n_sslv3_mac_init(struct s2n_hmac_state *state, s2n_hmac_algorithm a static int s2n_tls_hmac_init(struct s2n_hmac_state *state, s2n_hmac_algorithm alg, const void *key, uint32_t klen) { - uint32_t copied = klen; + memset(&state->xor_pad, 0, sizeof(state->xor_pad)); + if (klen > state->xor_pad_size) { GUARD(s2n_hash_update(&state->outer, key, klen)); GUARD(s2n_hash_digest(&state->outer, state->digest_pad, state->digest_size)); memcpy_check(state->xor_pad, state->digest_pad, state->digest_size); - copied = state->digest_size; } else { memcpy_check(state->xor_pad, key, klen); } - for (int i = 0; i < copied; i++) { + for (int i = 0; i < state->xor_pad_size; i++) { state->xor_pad[i] ^= 0x36; } - for (int i = copied; i < state->xor_pad_size; i++) { - state->xor_pad[i] = 0x36; - } GUARD(s2n_hash_update(&state->inner_just_key, state->xor_pad, state->xor_pad_size)); @@ -206,7 +203,7 @@ int s2n_hmac_init(struct s2n_hmac_state *state, s2n_hmac_algorithm alg, const vo GUARD(s2n_tls_hmac_init(state, alg, key, klen)); } - /* Once we have updated the outer_just_key, don't need the key material in xor_pad, so wipe it. + /* Once we have produced inner_just_key and outer_just_key, don't need the key material in xor_pad, so wipe it. * Since xor_pad is used as a source of bytes in s2n_hmac_digest_two_compression_rounds, * this also prevents uninitilized bytes being used. */
capops: add some more DEBUG_CAPOPS in delete code
@@ -428,11 +428,13 @@ delete_trylock_cont(void *st) err = monitor_lock_cap(del_st->capref.croot, del_st->capref.cptr, del_st->capref.level); if (err_no(err) == SYS_ERR_CAP_LOCKED) { + DEBUG_CAPOPS("%s: from lock(): cap already locked, queuing retry\n", __FUNCTION__); caplock_wait(del_st->capref, &del_st->lock_qn, MKCLOSURE(delete_trylock_cont, del_st)); return; } else if (err_no(err) == SYS_ERR_CAP_NOT_FOUND) { + DEBUG_CAPOPS("%s: from lock(): cap not found, got deleted from elsewhere\n", __FUNCTION__); // Some other operation (another delete or a revoke) has deleted the // target cap. This is OK. err = err_push(SYS_ERR_OK, err); @@ -475,6 +477,7 @@ delete_trylock_cont(void *st) return; report_error: + DEBUG_CAPOPS("%s: reporting error: %s\n", __FUNCTION__, err_getcode(err)); delete_result__rx(err, del_st, locked); }
Introducing STD Map and applying to resource stuff.
@@ -14,5 +14,6 @@ namespace FFXIVClientStructs.FFXIV.Client.System.Resource.Handle [FieldOffset(0x0C)] public uint FileType; // "txt" "uld" etc from the header [FieldOffset(0x10)] public uint Id; [FieldOffset(0x48)] public FFXIVClientStructs.STD.String FileName; // std::string + [FieldOffset(0xAC)] public uint RefCount; } } \ No newline at end of file
Fix the issue of device name len limited
#define UC_BT_SMP_SLAVE_CON_PARAMS_UPD_ENABLE FALSE #endif -#if CONFIG_IDF_TARGET_ESP32 - //Device Nane Maximum Length #ifdef CONFIG_BT_MAX_DEVICE_NAME_LEN #define UC_MAX_LOC_BD_NAME_LEN CONFIG_BT_MAX_DEVICE_NAME_LEN #define UC_MAX_LOC_BD_NAME_LEN 64 #endif +#if CONFIG_IDF_TARGET_ESP32 + //BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP #ifdef CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP #define UC_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP
userland: Bump revision to the current HEAD
@@ -13,7 +13,7 @@ COMPATIBLE_MACHINE = "^rpi$" SRCBRANCH = "master" SRCFORK = "raspberrypi" -SRCREV = "c4fd1b8986c6d6d4ae5cd51e65a8bbeb495dfa4e" +SRCREV = "54fd97ae4066a10b6b02089bc769ceed328737e0" # Use the date of the above commit as the package version. Update this when # SRCREV is changed.
interpreters/duktape: Remove v from tar command to avoid the verbose unzip message
@@ -54,7 +54,7 @@ $(DUKTAPE_TARBALL): $(DUKTAPE_UNPACK): $(DUKTAPE_TARBALL) $(Q) echo "Unpacking $(DUKTAPE_TARBALL) to $(DUKTAPE_UNPACK)" - $(Q) tar xvfJ $(DUKTAPE_TARBALL) + $(Q) tar xfJ $(DUKTAPE_TARBALL) $(Q) mv duktape-$(DUKTAPE_VERSION) $(DUKTAPE_UNPACK) $(Q) echo "Patching $(DUKTAPE_UNPACK)" $(Q) patch -p0 < duk_cmdline.patch
Don't take down server with fatal socket error Instead just delete the corresponding handler.
@@ -1190,8 +1190,6 @@ void swritecb(struct ev_loop *loop, ev_io *w, int revents) { if (rv != 0) { if (rv == NETWORK_ERR_SEND_NON_FATAL) { s->start_wev(); - } else { - s->disconnect(); } } } @@ -1264,8 +1262,6 @@ int Server::on_write() { continue; case NETWORK_ERR_SEND_NON_FATAL: return NETWORK_ERR_SEND_NON_FATAL; - case NETWORK_ERR_SEND_FATAL: - return NETWORK_ERR_SEND_FATAL; } it = handlers_.erase(it); }
Fixed invaild examples path for travis.
@@ -43,7 +43,7 @@ if [ $? -ne 0 ]; then echo -e "\xe2\x9c\x96"; else echo -e "\xe2\x9c\x93"; fi # Update OpenCR package manually git clone --recursive https://github.com/ROBOTIS-GIT/OpenCR.git --branch develop --single-branch rm -rf $HOME/.arduino15/packages/OpenCR/hardware -mv -rf $PWD/OpenCR/arduino/opencr_arduino/opencr $HOME/Arduino/hardware/OpenCR/OpenCR +mv $PWD/OpenCR/arduino/opencr_arduino/opencr $HOME/Arduino/hardware/OpenCR/OpenCR # install random lib so the arduino IDE grabs a new library index # see: https://github.com/arduino/Arduino/issues/3535 @@ -90,7 +90,7 @@ function build_platform() declare -a examples # loop through results and add them to the array - examples=($(find $HOME/.arduino15/sketchbook/hardware/OpenCR/OpenCR/libraries/turtlebot3/examples -name "*.pde" -o -name "*.ino")) + examples=($(find $HOME/Arduino/hardware/OpenCR/OpenCR/libraries/turtlebot3/examples -name "*.pde" -o -name "*.ino")) # get the last example in the array local last="${examples[@]:(-1)}"
HTTP cellular improvement: reset profile at outset. At the start of the setup of an HTTP instance uCellHttp now issue AT+HTTP=x, where x is the profile ID, to reset the profile before starting to use it.
@@ -506,6 +506,13 @@ int32_t uCellHttpOpen(uDeviceHandle_t cellHandle, const char *pServerName, pHttpInstance->pCallback = pCallback; pHttpInstance->pCallbackParam = pCallbackParam; atHandle = pCellInstance->atHandle; + // Reset the HTTP profile + uAtClientLock(atHandle); + uAtClientCommandStart(atHandle, "AT+UHTTP="); + uAtClientWriteInt(atHandle, profileId); + uAtClientCommandStopReadResponse(atHandle); + errorCodeOrHandle = uAtClientUnlock(atHandle); + if (errorCodeOrHandle == 0) { // Determine if the server name given // is an IP address or a domain name // by processing it as an IP address @@ -583,6 +590,7 @@ int32_t uCellHttpOpen(uDeviceHandle_t cellHandle, const char *pServerName, uPortFree(pHttpInstance); } } + } // Free temporary memory uPortFree(pServerNameTmp); }
Rearrange Travis CI jobs based on current runtimes. In general it is better to have slower jobs run earlier.
@@ -27,6 +27,12 @@ jobs: # Debian/Ubuntu documentation - env: PGB_CI=" doc --vm=u18" + # All integration tests + - env: PGB_CI="test --vm=u18 --param=build-package --param=module=mock --param=module=real" + + # All integration tests + - env: PGB_CI="test --vm=co6 --param=build-package --param=module=mock --param=module=real" + # Valgrind is disabled due to some platform-specific issues in getpwuid() and getgrgid() that do not seem to be pgBackRest bugs. # Run in a different timezone to check time tests. - arch: ppc64le @@ -35,21 +41,12 @@ jobs: - PGB_CI="test --vm=none --param=no-valgrind --param=tz=America/New_York" services: - # All integration tests - - env: PGB_CI="test --vm=co6 --param=build-package --param=module=mock --param=module=real" - - # All integration tests - - env: PGB_CI="test --vm=u18 --param=build-package --param=module=mock --param=module=real" - # All unit tests (with coverage) on the newest gcc available - env: PGB_CI="test --vm=f32 --param=c-only --param=no-performance" # RHEL/CentOS 6 documentation - env: PGB_CI=" doc --vm=co6" - # All integration tests - - env: PGB_CI="test --vm=co7 --param=module=mock --param=module=real" - # RHEL/CentOS 7 documentation - env: PGB_CI=" doc --vm=co7" @@ -60,6 +57,9 @@ jobs: - PGB_CI="test --vm=none --param=no-coverage --param=module=command --param=module=storage" services: + # All integration tests + - env: PGB_CI="test --vm=co7 --param=module=mock --param=module=real" + # Basic unit tests only. Coverage testing is also disabled to save time. - arch: s390x dist: bionic
odyssey: log tls certificate name mismatch details
@@ -275,7 +275,8 @@ od_auth_frontend_cert(od_client_t *client) rc = machine_io_verify(client->io, route->config->user_name); if (rc == -1) { od_error(&instance->logger, "auth", client, NULL, - "TLS certificate common name mismatch"); + "TLS certificate common name mismatch: %s", + machine_error(client->io)); od_frontend_error(client, SHAPITO_INVALID_PASSWORD, "TLS certificate common name mismatch"); return -1;
Make espcoredump more resilient when decoding specific thread stack Merges
@@ -1668,15 +1668,17 @@ def info_corefile(args): p = gdbmi_getinfo(p, handlers, "info threads") # THREADS STACKS p,threads,cur_thread = gdbmi_get_thread_ids(p) + print() for thr_id in threads: task_index = int(thr_id) - 1 - if thr_id == cur_thread: - continue p = gdbmi_switch_thread(p, thr_id) p,thr_info_res = gdbmi_get_thread_info(p, thr_id) + if not thr_info_res.target_id: + print("WARNING: Unable to switch to thread %s\n" % thr_id) + continue tcb_addr = gdb2freertos_thread_id(thr_info_res.target_id) p,task_name = gdbmi_freertos_get_task_name(p, tcb_addr) - print("\n==================== THREAD %s (TCB: 0x%x, name: '%s') =====================" % (thr_id, tcb_addr, task_name)) + print("==================== THREAD %s (TCB: 0x%x, name: '%s') =====================" % (thr_id, tcb_addr, task_name)) p = gdbmi_getinfo(p, handlers, "bt") if task_info and task_info[task_index].task_flags != EspCoreDumpTaskStatus.TASK_STATUS_CORRECT: print("The task '%s' is corrupted." % thr_id) @@ -1684,6 +1686,7 @@ def info_corefile(args): task_info[task_index].task_flags, task_info[task_index].task_tcb_addr, task_info[task_index].task_stack_start)) + print() print("\n======================= ALL MEMORY REGIONS ========================") print("Name Address Size Attrs") for ms in merged_segs:
Fix engine prop C code generation
@@ -667,8 +667,8 @@ export const compileEngineFields = (engineFields, engineProps, header) => { for(const engineField of engineFields) { const prop = engineProps.find((p) => p.id === engineField.key); const customValue = prop && prop.value; - const value = customValue !== undefined ? customValue : engineField.defaultValue; - fieldDef += `${header ? "extern " : ""}${engineField.type} ${engineField.key}${!header && value ? ` = ${value}` : ""};\n` + const value = customValue !== undefined ? Number(customValue) : Number(engineField.defaultValue); + fieldDef += `${header ? "extern " : ""}${engineField.cType} ${engineField.key}${!header && value ? ` = ${value}` : ""};\n` } return fieldDef; }
Fix VMS installation - Override the openssl logical name in descrip.mms.tmpl This was part of but was incomplete in that commit.
@@ -429,7 +429,9 @@ NODEBUG=@ $(NODEBUG) ! them, so we create it instead. This is an unfortunate $(NODEBUG) ! necessity. $(NODEBUG) ! - $(NODEBUG) DEFINE openssl "{- sourcedir('include/openssl') -} + $(NODEBUG) openssl_inc1 = F$PARSE("[.include.openssl]","A.;",,,"syntax_only") - "A.;" + $(NODEBUG) openssl_inc2 = F$PARSE("sourcetop:[include.openssl]","A.;",,,"SYNTAX_ONLY") - "A.;" + $(NODEBUG) DEFINE openssl 'openssl_inc1','openssl_inc2' $(NODEBUG) ! $(NODEBUG) ! Figure out the architecture $(NODEBUG) ! @@ -442,9 +444,10 @@ NODEBUG=@ .LAST : $(NODEBUG) {- join("\n\t\$(NODEBUG) ", map { "DEASSIGN ".uc($_) } @shlibs) || "!" -} + $(NODEBUG) DEASSIGN openssl $(NODEBUG) DEASSIGN ossl_dataroot $(NODEBUG) DEASSIGN ossl_installroot - $(NODEBUG) DEASSIGN openssl + $(NODEBUG) DEASSIGN ossl_sourceroot .DEFAULT : @ ! MMS cannot handle no actions... @@ -610,7 +613,9 @@ install_dev : check_INSTALLTOP install_runtime_libs @ WRITE SYS$OUTPUT "*** Installing development files" @ ! Install header files - CREATE/DIR ossl_installroot:[include.openssl] - COPY/PROT=W:R openssl:*.h ossl_installroot:[include.openssl] + COPY/PROT=W:R ossl_sourceroot:[include.openssl]*.h - + ossl_installroot:[include.openssl] + COPY/PROT=W:R [.include.openssl]*.h ossl_installroot:[include.openssl] @ ! Install static (development) libraries - CREATE/DIR ossl_installroot:[LIB.'arch'] {- join("\n ",
change timeout on flash write
@@ -360,11 +360,11 @@ int stlink_flash_loader_run(stlink_t *sl, flash_loader_t* fl, stm32_addr_t targe * the OS uses, the wait until the error message is reduced to the same order of magnitude * as what was intended. -- REW. */ -#define WAIT_ROUNDS 100 +#define WAIT_ROUNDS 30 // wait until done (reaches breakpoint) for (i = 0; i < WAIT_ROUNDS; i++) { - usleep(1000); + usleep(10000); if (stlink_is_core_halted(sl)) { break; } }
runtime: move static arp entry creation to late init phase after per-thread smalloc initializer runs
@@ -342,13 +342,27 @@ int arp_lookup(uint32_t daddr, struct eth_addr *dhost_out, struct mbuf *m) */ int arp_init(void) { - int i, idx; - struct arp_entry *e; + int i; spin_lock_init(&arp_lock); for (i = 0; i < ARP_TABLE_CAPACITY; i++) rcu_hlist_init_head(&arp_tbl[i]); + return 0; +} + +/** + * arp_init_late - starts the ARP worker thread + * + * Returns 0 if successful. + */ +int arp_init_late(void) +{ + int i, idx; + struct arp_entry *e; + + spin_lock_np(&arp_lock); + for (i = 0; i < arp_static_count; i++) { e = create_entry(static_entries[i].ip); if (!e) @@ -359,15 +373,7 @@ int arp_init(void) rcu_hlist_add_head(&arp_tbl[idx], &e->link); } - return 0; -} + spin_unlock_np(&arp_lock); -/** - * arp_init_late - starts the ARP worker thread - * - * Returns 0 if successful. - */ -int arp_init_late(void) -{ return thread_spawn(arp_worker, NULL); }
psa_key_derivation_check_input_type(): handle PSA_KEY_DERIVATION_INPUT_OTHER_SECRET
@@ -5391,6 +5391,12 @@ static int psa_key_derivation_check_input_type( if( key_type == PSA_KEY_TYPE_NONE ) return( PSA_SUCCESS ); break; + case PSA_KEY_DERIVATION_INPUT_OTHER_SECRET: + if( key_type == PSA_KEY_TYPE_DERIVE ) + return( PSA_SUCCESS ); + if( key_type == PSA_KEY_TYPE_NONE ) + return( PSA_SUCCESS ); + break; case PSA_KEY_DERIVATION_INPUT_LABEL: case PSA_KEY_DERIVATION_INPUT_SALT: case PSA_KEY_DERIVATION_INPUT_INFO:
Support armcc builtin byteswap routine
@@ -158,6 +158,11 @@ inline void mbedtls_put_unaligned_uint64( void *p, uint64_t x ) #define MBEDTLS_BSWAP64 _byteswap_uint64 #endif /* defined(_MSC_VER) */ +/* Detect armcc built-in byteswap routine */ +#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 410000) +#define MBEDTLS_BSWAP32 __rev +#endif + /* * Where compiler built-ins are not present, fall back to C code that the * compiler may be able to detect and transform into the relevant bswap or
fixed crash in I2S when reconnect to a2dp sink
@@ -275,8 +275,8 @@ static void bt_av_hdl_a2d_evt(uint16_t event, void *p_param) s_a2d_conn_state_str[a2d->conn_stat.state], bda[0], bda[1], bda[2], bda[3], bda[4], bda[5]); if (a2d->conn_stat.state == ESP_A2D_CONNECTION_STATE_DISCONNECTED) { esp_bt_gap_set_scan_mode(ESP_BT_CONNECTABLE, ESP_BT_GENERAL_DISCOVERABLE); - bt_i2s_task_shut_down(); bt_i2s_driver_uninstall(); + bt_i2s_task_shut_down(); } else if (a2d->conn_stat.state == ESP_A2D_CONNECTION_STATE_CONNECTED){ esp_bt_gap_set_scan_mode(ESP_BT_NON_CONNECTABLE, ESP_BT_NON_DISCOVERABLE); bt_i2s_task_start_up();
Ignore move constructor
%ignore tsFrame; %ignore tsStatus; %ignore tinyspline::BSpline::BSpline(BSpline &&); +%ignore tinyspline::ChordLengths::ChordLengths(ChordLengths &&); %ignore tinyspline::DeBoorNet::DeBoorNet(DeBoorNet &&); %ignore tinyspline::FrameSeq::FrameSeq(FrameSeq &&);
os/net: Delete unnecessary defines NET_DEVNAME is used nowhere.
#define SOCKETADD_ERR_RECORD(reason_code) #endif -#if defined(CONFIG_ARCH_CHIP_S5JT200) || defined(CONFIG_ARCH_CHIP_LM3S6965) || defined(CONFIG_ARCH_CHIP_BCM4390X) -#if LWIP_HAVE_LOOPIF -#define NET_DEVNAME "wl1" -#else -#define NET_DEVNAME "wl0" -#endif -#else -#error "undefined CONFIG_NET_<type>, check your .config" -#endif - #if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */ #ifdef CONFIG_NET_NETMON
remove forgotten private declaration in parallel for
@@ -832,7 +832,7 @@ static scs_int proj_cone(scs_float *x, const ScsCone *k, ScsConeWork *c, * \Pi_C^*(y) = y + \Pi_C(-y) */ #ifdef _OPENMP -#pragma omp parallel for private(r, s, t, idx) +#pragma omp parallel for #endif for (i = 0; i < k->ep; ++i) { proj_exp_cone(&(x[count + 3 * i]));
Renamed and fixed overflow in M
@@ -232,7 +232,7 @@ static void oper_poke_and_stun(Glyph* restrict gbuffer, Mark* restrict mbuffer, _('J', jump) \ _('K', konkat) \ _('L', loop) \ - _('M', modulo) \ + _('M', multiply) \ _('N', movement) \ _('O', offset) \ _('P', push) \ @@ -575,14 +575,14 @@ BEGIN_OPERATOR(loop) } END_OPERATOR -BEGIN_OPERATOR(modulo) +BEGIN_OPERATOR(multiply) LOWERCASE_REQUIRES_BANG; PORT(0, -1, IN); PORT(0, 1, IN); PORT(1, 0, OUT); Usz ia = index_of(PEEK(0, -1)); Usz ib = index_of(PEEK(0, 1)); - POKE(1, 0, indexed_glyphs[ia * ib]); + POKE(1, 0, indexed_glyphs[(ia * ib) % Glyphs_index_count]); END_OPERATOR BEGIN_OPERATOR(offset)
py/modmicropython: Add writable_ns(nsobj, bool) to make namespaces writable. Calling writable_ns() on a type/module can make its attribute dictionary writable/non-writable (depending on 2nd arg).
@@ -173,6 +173,27 @@ STATIC mp_obj_t mp_micropython_function(size_t n_args, const mp_obj_t *args) { STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_micropython_function_obj, 3, 4, mp_micropython_function); #endif +#if MICROPY_CAN_OVERRIDE_BUILTIN_NAMESPACES +STATIC mp_obj_t mp_micropython_writable_ns(mp_obj_t obj_in, mp_obj_t is_writable) { + mp_obj_dict_t *dict; + + if (mp_obj_is_type(obj_in, &mp_type_type)) { + mp_obj_type_t *type = MP_OBJ_TO_PTR(obj_in); + dict = type->locals_dict; + } else if (mp_obj_is_type(obj_in, &mp_type_module)) { + dict = mp_obj_module_get_globals(obj_in); + } else { + mp_raise_TypeError(NULL); + } + + bool old = dict->map.is_fixed; + dict->map.is_fixed = !mp_obj_is_true(is_writable); + + return mp_obj_new_bool(!old); +} +STATIC MP_DEFINE_CONST_FUN_OBJ_2(mp_micropython_writable_ns_obj, mp_micropython_writable_ns); +#endif + STATIC const mp_rom_map_elem_t mp_module_micropython_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_micropython) }, { MP_ROM_QSTR(MP_QSTR_const), MP_ROM_PTR(&mp_identity_obj) }, @@ -211,6 +232,9 @@ STATIC const mp_rom_map_elem_t mp_module_micropython_globals_table[] = { #if MICROPY_PY_MICROPYTHON_FUNCTION { MP_ROM_QSTR(MP_QSTR_function), MP_ROM_PTR(&mp_micropython_function_obj) }, #endif + #if MICROPY_CAN_OVERRIDE_BUILTIN_NAMESPACES + { MP_ROM_QSTR(MP_QSTR_writable_ns), MP_ROM_PTR(&mp_micropython_writable_ns_obj) }, + #endif }; STATIC MP_DEFINE_CONST_DICT(mp_module_micropython_globals, mp_module_micropython_globals_table);
Add sse options for use of intrinics with older compilers
@@ -124,10 +124,19 @@ if (NOT DYNAMIC_ARCH) if (HAVE_AVX) set (CCOMMON_OPT "${CCOMMON_OPT} -mavx") endif () + if (HAVE_SSE) + set (CCOMMON_OPT "${CCOMMON_OPT} -msse") + endif () + if (HAVE_SSE2) + set (CCOMMON_OPT "${CCOMMON_OPT} -msse2") + endif () if (HAVE_SSE3) set (CCOMMON_OPT "${CCOMMON_OPT} -msse3") endif () if (HAVE_SSSE3) set (CCOMMON_OPT "${CCOMMON_OPT} -mssse3") endif () + if (HAVE_SSE4_1) + set (CCOMMON_OPT "${CCOMMON_OPT} -msse4.1") + endif () endif()
sandbox/fskcorr: cleaning up options/plots, adding noise floor/SNR
int main(int argc, char*argv[]) { - unsigned int M = 1000; // samples per symbol + unsigned int M = 1024; // samples per symbol unsigned int n = 256; // sequence length (number of symbols) unsigned int p = 4; // over-sampling rate for output - //float SNRdB = 20; // - unsigned int timer = 0; - float fc = 0.2f; // tone frequency + float SNRdB = -10.0f; // SNR (so to speak) + float noise_floor = -60.0f; // noise floor [dB-Hz] + unsigned int timer = 0; // correlator/FFT alignment + float fc = 0.2f; // nominal tone frequency unsigned int i; unsigned int j; // derived values - float nstd = 1.0f; - float gain = 1.0f; + float nstd = powf(10.0f, noise_floor/20.0f); + float gain = powf(10.0f, (SNRdB + noise_floor)/20.0f); unsigned int i1 = (unsigned int)round(fc*M); - unsigned int i0 = M - (i1 - 1); + unsigned int i0 = M - i1; printf("M = %u, fc = %.3f {%u,%u}\n", M, fc, i0, i1); // generate sequence @@ -142,20 +143,24 @@ int main(int argc, char*argv[]) fprintf(fid,"psd(%4u) = %12.4e;\n", i+1, psd[i]); } fprintf(fid,"num_samples = length(llr);\n"); - fprintf(fid,"txy = [0:(num_samples-1)] - p*n + 1;\n"); + fprintf(fid,"txy = ([0:(num_samples-1)] - p*n + 1)/p;\n"); fprintf(fid,"S = fft(s, num_samples);\n"); fprintf(fid,"L = fft(llr,num_samples);\n"); fprintf(fid,"figure('position',[1 1 800 800]);\n"); fprintf(fid,"subplot(2,1,1);\n"); fprintf(fid," plot(txy,rxy,'-x');\n"); - fprintf(fid," axis([-200 200 -0.2 1.2]);\n"); + fprintf(fid," axis([-20 20 -0.2 1.2]);\n"); fprintf(fid," grid on;\n"); + fprintf(fid," xlabel('lag [symbols]');\n"); + fprintf(fid," ylabel('cross-correlation output');\n"); fprintf(fid,"subplot(2,1,2);\n"); fprintf(fid," nfft=length(psd);\n"); fprintf(fid," f = [0:(nfft-1)]/nfft - 0.5;\n"); fprintf(fid," plot(f,psd);\n"); - fprintf(fid," axis([-0.5 0.5 -10 40]);\n"); + fprintf(fid," axis([-0.5 0.5 %f %f]);\n", noise_floor-10, noise_floor+30); fprintf(fid," grid on;\n"); + fprintf(fid," xlabel('normalized frequency [f/F_s]');\n"); + fprintf(fid," ylabel('power spectral density [dB]');\n"); fclose(fid); printf("results written to fskcorr_test.m\n");
gta3 wanted stars shadows
@@ -564,7 +564,7 @@ void ApplyIniOptions() //Changing black color for necessary strings for (size_t i = 0; i < MenuPattern3.size(); i++) { - if (i == 9 || i == 15 || i == 20 || i == 33 /*|| i == 36*/ ) // 9 - MAIN MENU strings, 15,21 - controls page key on hover, 33 - ammo, 36 - wanted stars; + if (i == 9 || i == 15 || i == 20 || i == 33 || i == 36 ) // 9 - MAIN MENU strings, 15,21 - controls page key on hover, 33 - ammo, 36 - wanted stars; { auto pClr = MenuPattern3.get(i); injector::WriteMemory<uint8_t>(pClr.get<uint32_t>(1), 0x01, true);
PHP: Terminating names with zero. Fixing issue introduced in changeset 462:17a2c9b27b57 .
@@ -215,7 +215,7 @@ nxt_php_init(nxt_task_t *task, nxt_common_app_conf_t *conf) nxt_php_str_trim_lead(&c->script, '/'); path->length = root->length + 1 + c->script.length; - path->start = nxt_malloc(path->length); + path->start = nxt_malloc(path->length + 1); if (nxt_slow_path(path->start == NULL)) { return NXT_ERROR; } @@ -223,7 +223,8 @@ nxt_php_init(nxt_task_t *task, nxt_common_app_conf_t *conf) p = nxt_cpymem(path->start, root->start, root->length); *p++ = '/'; - nxt_memcpy(p, c->script.start, c->script.length); + p = nxt_cpymem(p, c->script.start, c->script.length); + *p = '\0'; rpath.start = nxt_realpath(path->start); if (nxt_slow_path(rpath.start == NULL)) { @@ -332,7 +333,7 @@ nxt_php_read_request(nxt_task_t *task, nxt_app_rmsg_t *rmsg, ctx->script.length = nxt_php_root.length + h->path.length + script_name.length; - p = ctx->script.start = nxt_malloc(ctx->script.length); + p = ctx->script.start = nxt_malloc(ctx->script.length + 1); if (nxt_slow_path(p == NULL)) { return NXT_ERROR; } @@ -341,9 +342,11 @@ nxt_php_read_request(nxt_task_t *task, nxt_app_rmsg_t *rmsg, p = nxt_cpymem(p, h->path.start, h->path.length); if (script_name.length > 0) { - nxt_memcpy(p, script_name.start, script_name.length); + p = nxt_cpymem(p, script_name.start, script_name.length); } + *p = '\0'; + } else { ctx->script = nxt_php_path; }
MSR: Reenable tests on Linux/ASAN
@@ -10,17 +10,11 @@ add_s_test (tutorial_cascading "${CMAKE_SOURCE_DIR}/doc/tutorials/cascading.md") add_s_test (kdb-complete "${CMAKE_SOURCE_DIR}/doc/help/kdb-complete.md") add_s_test (kdb-ls "${CMAKE_SOURCE_DIR}/doc/help/kdb-ls.md") -# The tests below might fail on Linux if ASAN is enabled -# The problem might be related to a call of a function via a pointer of incorrect type -# See also: https://github.com/ElektraInitiative/libelektra/pull/1728 -set (ASAN_LINUX ENABLE_ASAN AND ${CMAKE_SYSTEM_NAME} MATCHES "Linux") -if (NOT (${ASAN_LINUX} AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)) add_s_test (tutorial_validation "${CMAKE_SOURCE_DIR}/doc/tutorials/validation.md" REQUIRED_PLUGINS validation) add_plugin_shell_test (base64) add_plugin_shell_test (ini) add_plugin_shell_test (mini) add_plugin_shell_test (tcl) -endif (NOT (${ASAN_LINUX} AND CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4)) # Only works with super user privileges, since it writes to `/etc/hosts`: # add_s_test (tutorial_mount "${CMAKE_SOURCE_DIR}/doc/tutorials/mount.md")
Remove uppercase MANGOHUD_LOG_LEVEL strings
@@ -82,7 +82,7 @@ void init_spdlog() if (getenv("MANGOHUD_LOG_LEVEL")) { std::string log_level = getenv("MANGOHUD_LOG_LEVEL"); vector<string> levels; - levels = {"off","OFF","info","INFO","err","ERR","debug","DEBUG"}; + levels = {"off","info","err","debug"}; for (auto & element : levels) { transform(log_level.begin(), log_level.end(), log_level.begin(), ::tolower); if(log_level == element ) {
libopae: clarify fpgaEnumerate() doxygen Update the doxygen for parameters 'filters' and 'num_filters' to reflect the two ways of achieving a "match-all" query.
@@ -71,9 +71,12 @@ extern "C" { * @param[in] filters Array of `fpga_properties` objects describing the * properties of the objects that should be returned. A * resource is considered matching if its properties - * match any one of the supplied filters. Passing NULL - * will match all FPGA resources present in the system. - * @param[in] num_filters Number of entries in the `filters` array. + * match any one of the supplied filters. To match all + * FPGA resources, pass an empty filters object (one + * without any filter criteria set) or pass a NULL + * filters parameter with num_filters set to 0. + * @param[in] num_filters Number of entries in the `filters` array, or 0 to + * match all FPGA resources when `filters` is NULL. * @param[out] tokens Pointer to an array of fpga_token variables to be * populated. If NULL is supplied, fpgaEnumerate() will * not create any tokens, but it will return the
sysdeps/managarm: Ignore NULL in DRM_IOCTL_VERSION
@@ -1533,10 +1533,13 @@ int sys_ioctl(int fd, unsigned long request, void *arg, int *result) { param->version_minor = resp.drm_version_minor(); param->version_patchlevel = resp.drm_version_patchlevel(); + if(param->name) memcpy(param->name, resp.drm_driver_name().data(), frg::min(param->name_len, resp.drm_driver_name().size())); + if(param->date) memcpy(param->date, resp.drm_driver_date().data(), frg::min(param->date_len, resp.drm_driver_date().size())); + if(param->desc) memcpy(param->desc, resp.drm_driver_desc().data(), frg::min(param->desc_len, resp.drm_driver_desc().size()));
extmod/modmotor: Fix MoveHub port A direction Make sure that clockwise is indeed clockwise. Fix is added at the module level now, but it should instead be fixed in the PWM and Counter drivers.
@@ -214,6 +214,13 @@ STATIC mp_obj_t motor_Motor_make_new(const mp_obj_type_t *type, size_t n_args, s } } + #if PYBRICKS_HUB_MOVEHUB + // FIXME: Update direction in pwm and counter driver instead + if (port_arg == PBIO_PORT_A) { + direction_arg = !direction_arg; + } + #endif + // Get servo device, set it up, and tell the poller if we succeeded. pb_assert(pbio_motorpoll_get_servo(port_arg, &srv)); while ((err = pbio_servo_setup(srv, direction_arg, gear_ratio)) == PBIO_ERROR_AGAIN) {
200c --> 500c typo
@@ -260,7 +260,7 @@ class MassDef200c(MassDef): class MassDef500c(MassDef): """`MassDef` class for the mass definition - with Delta=200 times the critical density. + with Delta=500 times the critical density. Args: c_m (string): concentration-mass relation.
Fixed engine compile error on mac
@@ -392,7 +392,7 @@ void SceneUpdateActors_b() { update_dir = directions[r & 3]; r++; - SceneUpdateActorMovement_b(i, update_dir); + SceneUpdateActorMovement_b(i); } } }
Fix modulo issue of MSB to be 1 with signed type
@@ -118,9 +118,18 @@ T GetRandom(T UpperBound, uint16_t ThreadID = UINT16_MAX) { if (!FuzzData || ThreadID == UINT16_MAX) { return (T)(rand() % (int)UpperBound); } - T out = std::numeric_limits<T>::max(); - (void)FuzzData->TryGetRandom(UpperBound, &out, ThreadID); - return out; + uint64_t out = 0; + + if ((uint64_t)UpperBound <= 0xff) { + (void)FuzzData->TryGetRandom((uint8_t)UpperBound, (uint8_t*)&out, ThreadID); + } else if ((uint64_t)UpperBound <= 0xffff) { + (void)FuzzData->TryGetRandom((uint16_t)UpperBound, (uint16_t*)&out, ThreadID); + } else if ((uint64_t)UpperBound <= 0xffffffff) { + (void)FuzzData->TryGetRandom((uint32_t)UpperBound, (uint32_t*)&out, ThreadID); + } else { + (void)FuzzData->TryGetRandom((uint64_t)UpperBound, &out, ThreadID); + } + return (T)out; } #define GetRandom(UpperBound) GetRandom(UpperBound, ThreadID)
documents new cli arguments
@@ -334,15 +334,17 @@ u3_ve_usage(c3_i argc, c3_c** argv) "-c pier Create a new urbit in pier/\n", "-d Daemon mode\n", "-D Recompute from events\n", + "-e url Ethereum gateway\n", "-F ship Fake keys; also disables networking\n", "-f Fuzz testing\n", "-g Set GC flag\n", + "-K keys Private key file\n", "-k stage Start at Hoon kernel version stage\n", "-l port Initial peer port\n", "-M Memory madness\n", "-n host Set unix hostname\n", "-N Enable networking in fake mode (-F)\n", - "-p ames_port Set the HTTP port to bind to\n", + "-p ames_port Set the ames port to bind to\n", "-P Profiling\n", "-q Quiet\n", "-r host Initial peer address\n", @@ -350,7 +352,7 @@ u3_ve_usage(c3_i argc, c3_c** argv) "-s Pill URL from arvo git hash\n", "-u url URL from which to download pill\n", "-v Verbose\n", - "-w name Immediately upgrade to ~name\n", + "-w name Boot as ~name\n", "-x Exit immediately\n", "-Xwtf Skip last event\n", "\n",
Test: Do not test plugins which leak memory
@@ -51,29 +51,15 @@ do ;; esac - # The following checks fail on an ASAN enabled build - # See also: https://github.com/ElektraInitiative/libelektra/pull/1963 ASAN='@ENABLE_ASAN@' if [ "$ASAN" = 'ON' ]; then + # Do not check plugins with known memory leaks in ASAN enabled build + "$KDB" info "$PLUGIN" status 2>/dev/null | egrep -q 'memleak' && continue + case "$PLUGIN" in 'augeas') # Reference: https://travis-ci.org/sanssecours/elektra/jobs/418524229 continue ;; - 'crypto_gcrypt') - continue - ;; - 'crypto_botan') - continue - ;; - 'gpgme') - continue - ;; - 'xerces') - continue - ;; - 'ruby') - continue - ;; esac fi
Solved errata in TOC and link.
@@ -61,7 +61,7 @@ metacall('sum', 3, 4); // 7 - [5.3.2.2 RapidJSON](#5322-rapidjson) - [5.3.3 Detours](#533-detours) - [5.3.3.1 FuncHook](#5331-funchook) - - [5.4 Ports](#54-ports) + - [5.4 Ports (Frontends)](#54-ports-frontends) - [5.5 Serialization](#55-serialization) - [5.6 Memory Layout](#56-memory-layout) - [5.7 Fork Model](#57-fork-model) @@ -84,7 +84,7 @@ The **METACALL** project started time ago when I was coding a [Game Engine for a ## 2. Language Support (Backends) -This section describes all programming languages that **METACALL** supports, if you are interested in from what languages can be used **METACALL** you must go to [ports section](#54-ports). +This section describes all programming languages that **METACALL** supports, if you are interested in from what languages can be used **METACALL** you must go to [ports section](#54-ports-frontends). - Currently supported languages and run-times:
Fixed array for absolute paths in loader_load_from_files
#define LOADER_SCRIPT_PATH "LOADER_SCRIPT_PATH" +#define LOADER_MAX_FILES 50 + /* -- Forward Declarations -- */ struct loader_type; @@ -205,7 +207,7 @@ int loader_load_from_files(loader_naming_path path[], size_t size) { if (l->script_path != NULL) { - loader_naming_path absolute_path[size]; + loader_naming_path absolute_path[LOADER_MAX_FILES]; for (size_t i = 0; i < size; i++) {
docs/ide-support.md: Add Makefile.ide to odd file types TEST=none BRANCH=none
@@ -14,6 +14,7 @@ Patterns | Vague Type ----------------------------------------------------- | ---------- `README.*` | Text `Makefile.rules`, `Makefile.toolchain` | Makefile +`Makefile.ide` | Makefile `gpio.wrap` | C Header `gpio.inc` | C Header `*.tasklist`, `*.irqlist`, `*.mocklist`, `*.testlist` | C Header
Avoid potential NULL deref
@@ -429,6 +429,8 @@ static void process_packets(h2o_http3_ctx_t *ctx, quicly_address_t *destaddr, qu if (QUICLY_PACKET_IS_LONG_HEADER(packets[0].octets.base[0]) && packets[0].version != QUICLY_PROTOCOL_VERSION) { quicly_datagram_t *dgram = quicly_send_version_negotiation(ctx->quic, &srcaddr->sa, packets[0].cid.src, &destaddr->sa, packets[0].cid.dest.encrypted); + if (dgram == NULL) + return; h2o_http3_send_datagram(ctx, dgram); ctx->quic->packet_allocator->free_packet(ctx->quic->packet_allocator, dgram); return;
added reference to Danibus tutorials
@@ -33,6 +33,8 @@ I plan to complete tutorials in future but in the meantime i strongly suggest yo You can also follow up-to-date and more complete online tutorials as this one (thanks to Ohsat for making them): https://www.ohsat.com/tutorial/ +You also have the great ones from Danibus (spanish only): +https://danibus.wordpress.com/ SGDK comes with a doxygen documentation that you can find in the 'doc' directory: doc/html/files.html This documentation is generated from header files (.h) which provides basic information about SGDK structures and functions.
Remove unnecessary print of test_info The remove the print of a test_info object, as this information is not useful.
@@ -142,9 +142,8 @@ class MassStorageTester(object): """Add a list of directoies""" self._mock_dir_list_after.extend(dir_list) - def _check_data_correct(self, expected_data, test_info): + def _check_data_correct(self, expected_data, _): """Return True if the actual data written matches the expected""" - print (test_info) data_len = len(expected_data) data_loaded = self.board.read_target_memory(self._start, data_len) return _same(expected_data, data_loaded)
doc: clarify what rest-backend does see
@@ -11,6 +11,14 @@ These external commands can be listed via `kdb list-tools` The graphical user interface (GUI) is called `kdb qt-gui`. +## Web-UI + +For information about the Web-UI, please read [here](web). + +Note that the Web-UI also provides a REST service +[elektrad](web/elektrad) that allows you to get +and set configuration settings. + ## Programmatic Finally, programming languages supported via bindings can
sysdeps/managarm: Stub sys_tcdrain
@@ -992,6 +992,11 @@ int sys_tcsetattr(int fd, int when, const struct termios *attr) { return 0; } +int sys_tcdrain(int) { + mlibc::infoLogger() << "\e[35mmlibc: tcdrain() is a stub\e[39m" << frg::endlog; + return 0; +} + int sys_socket(int domain, int type_and_flags, int proto, int *fd) { constexpr int type_mask = int(0xFFFF); constexpr int flags_mask = ~int(0xFFFF);
Separate version entries more clearly
@@ -18,24 +18,34 @@ This includes the following changes (as well as other minor changes), as detaile **Compatibility**: (`gcc-6`) Fix some compatibility concerns with `gcc` version 6, as well as some warnings that were exposed when testing with `gcc`. +*** + #### Change log v.0.4.14 **Fix**: (`facil.io`) fixes an issue where timer monitoring would report failure when the timer exists and is being monitored. +*** + #### Change log v.0.4.12 **Fix**: (`facil.io`) fixes some lingering issues with the new Websocket parser, namely an issue where certain network packet lengths would cause the parser to fail. Credit to Tom Lahti (@uidzip) for exposing the issue. +*** + #### Change log v.0.4.11 **Fix**: (`iodine`) use Ruby `fork` instead of system `fork`, allowing Ruby hooks to run before and after forking. This also fixes an issue where the Ruby timer thread isn't (re)initialized. +*** + #### Change log v.0.4.10 **Portability**: (`mac OS High Sierra`) iodine will load the Objective C library on macOS machines before starting up the server - this will prevent `fork` from crashing the server on macOS High Sierra, see [discussion here](https://github.com/puma/puma/issues/1421). **Fix**: (`facil.io`) fixes an error with the new Websocket parser (introduced in v. 0.4.9) that caused medium sized messages (127 Bytes - 64Kib) to be parsed incorrectly. Apologies. The test program I used seems to have validated messages using length comparison (instead of data comparison). Credit to Tom Lahti (@uidzip) for exposing the issue. +*** + #### Change log v.0.4.9 **Change**: (`facil.io`) the internal Websocket parser was replaced with something easier to read, for maintainability reasons. Performance seems to be mostly unaffected (sometimes it's faster and sometimes it's slower, common case is slightly optimized).
fix unforgiving
@@ -39,6 +39,10 @@ def setupReplay(osrfile, beatmap): replay_data[index][Replays.TIMES] = total_time replay_data = replay_data[start_index:-1] + + if replay_data[0] is None: + replay_data = replay_data[1:] + replay_data.sort(key=lambda x: x[Replays.TIMES]) # sort replay data based on time for x in range(10):
travis: try to unbreak the build
@@ -13,6 +13,11 @@ matrix: - os: osx compiler: gcc +script: + # workaround git not retaining mtimes and bison/flex not being uptodate + - touch conffile.yy.c conffile.tab.c conffile.tab.h + - make + env: global: # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created
Add IntRange And and Or comments Thanks again to Daniel Wright
@@ -646,10 +646,49 @@ func (x IntRange) Or(y IntRange) (z IntRange, ok bool) { return IntRange{zMin, zMax}, true } +// The andMax and orMax algorithms are tricky. +// +// First, some notation. Let x and y be intervals, and in math notation, denote +// those intervals' bounds as [xMin, xMax] and [yMin, yMax]. In Go terms, x is +// an IntRange, xMin is x[0], xMax is x[1], and likewise for y. In the +// algorithm discussion below, we'll use square brackets only for denoting +// intervals, not array indices, and so we'll say xMin instead of x[0]. +// +// xMin, xMax, yMin and yMax are all assumed to be finite (i.e. a non-nil +// *big.Int) and non-negative. The caller is responsible for enforcing this. +// +// For a given range r, define maximal(r) to be the integers in r for which you +// cannot flip any bits from 0 to 1 and have the result still be in r. Clearly +// rMax is in maximal(r), but there are other elements as well -- for each bit +// that is set in rMax, if you unset that bit, and set all bits to its right, +// the result is also in maximal(r) as long as it is >= rMin (which is true iff +// the bit is in bitFillRight(rMax & ~rMin). +// +// Clearly x.andMax(y) == maximal(x).andMax(maximal(y)) and x.orMax(y) == +// maximal(x).orMax(maximal(y)) -- that is, we only need to consider the +// maximal elements in each range. +// +// For orMax, the max is achieved by starting with xMax | yMax, and then +// realizing that we can get a larger result by choosing the leftmost bit in +// xMax & yMax (which we effectively have twice), flipping it to zero in either +// of the inputs, and replacing all bits to its right with 1s. However, that +// might end up with the input being below the minimum in its range, so instead +// of considering all bits in xMax & yMax, we have to restrict to those that +// are also set in either bitFillRight(xMax & ~xMin) or bitFillRight(yMax & +// ~yMin). +// +// For andMax, we can again only consider the maximal elements. Here, we have +// either yMax and the best maximal element from x, or xMax and the best +// maximal element from y. For symmetry assume it's the former (though we must +// actually check both). +// +// We take yMax, and then the maximal element from x that is chosen by flipping +// the leftmost bit in xMax that will result in a number that is >= xMin and is +// not also set in yMax. That is, the leftmost bit in bitFillRight(xMax & +// ~xMin) & xMax & ~yMax. + // andMax returns an exact solution for the maximum possible (xx & yy), for all -// possible xx in x and yy in y. Denoting those intervals' bounds as [xMin, -// xMax] and [yMin, yMax], all four bounds are assumed non-negative and -// non-nil. +// possible xx in x and yy in y. // // Algorithm: // // If the two intervals overlap, the result is the minimum of the two @@ -781,9 +820,7 @@ func (x IntRange) andMax(y IntRange) *big.Int { } // orMax returns an exact solution for the maximum possible (xx | yy), for all -// possible xx in x and yy in y. Denoting those intervals' bounds as [xMin, -// xMax] and [yMin, yMax], all four bounds are assumed non-negative and -// non-nil. +// possible xx in x and yy in y. // // Algorithm: // droppable = bitFillRight((xMax & ~xMin) | (yMax & ~yMin))
Add comment about write buffer.
@@ -296,6 +296,10 @@ int main(void) int sensor_init_ret = 0; bool first_soft_reset = true; + // Uncomment to disable write buffer to get precise faults. + // NOTE: Cache should be disabled on M7. + //SCnSCB->ACTLR |= SCnSCB_ACTLR_DISDEFWBUF_Msk; + // STM32F4xx HAL library initialization: // - Set NVIC Group Priority to 4 // - Configure the Flash prefetch, instruction and Data caches
yolint_next with swig ignore Note: mandatory check (NEED_CHECK) was skipped
@@ -4,13 +4,13 @@ RESOURCES_LIBRARY() IF (HOST_OS_LINUX) DECLARE_EXTERNAL_RESOURCE(YOLINT sbr:1172025912) - DECLARE_EXTERNAL_RESOURCE(YOLINT_NEXT sbr:1190293315) + DECLARE_EXTERNAL_RESOURCE(YOLINT_NEXT sbr:1193530474) ELSEIF (HOST_OS_DARWIN) DECLARE_EXTERNAL_RESOURCE(YOLINT sbr:1172029928) - DECLARE_EXTERNAL_RESOURCE(YOLINT_NEXT sbr:1190294887) + DECLARE_EXTERNAL_RESOURCE(YOLINT_NEXT sbr:1193534724) ELSEIF (HOST_OS_WINDOWS) DECLARE_EXTERNAL_RESOURCE(YOLINT sbr:1172028989) - DECLARE_EXTERNAL_RESOURCE(YOLINT_NEXT sbr:1190295699) + DECLARE_EXTERNAL_RESOURCE(YOLINT_NEXT sbr:1193533151) ELSE() MESSAGE(FATAL_ERROR Unsupported host platform) ENDIF()
CMSIS-Driver: Minor I2C slave event description change (documentation)
@@ -100,10 +100,10 @@ typedef volatile struct _ARM_I2C_STATUS { /****** I2C Event *****/ #define ARM_I2C_EVENT_TRANSFER_DONE (1UL << 0) ///< Master/Slave Transmit/Receive finished #define ARM_I2C_EVENT_TRANSFER_INCOMPLETE (1UL << 1) ///< Master/Slave Transmit/Receive incomplete transfer -#define ARM_I2C_EVENT_SLAVE_TRANSMIT (1UL << 2) ///< Slave Transmit operation requested -#define ARM_I2C_EVENT_SLAVE_RECEIVE (1UL << 3) ///< Slave Receive operation requested +#define ARM_I2C_EVENT_SLAVE_TRANSMIT (1UL << 2) ///< Addressed as Slave Transmitter but transmit operation is not set. +#define ARM_I2C_EVENT_SLAVE_RECEIVE (1UL << 3) ///< Addressed as Slave Receiver but receive operation is not set. #define ARM_I2C_EVENT_ADDRESS_NACK (1UL << 4) ///< Address not acknowledged from Slave -#define ARM_I2C_EVENT_GENERAL_CALL (1UL << 5) ///< General Call indication +#define ARM_I2C_EVENT_GENERAL_CALL (1UL << 5) ///< Slave addressed with general call address #define ARM_I2C_EVENT_ARBITRATION_LOST (1UL << 6) ///< Master lost arbitration #define ARM_I2C_EVENT_BUS_ERROR (1UL << 7) ///< Bus error detected (START/STOP at illegal position) #define ARM_I2C_EVENT_BUS_CLEAR (1UL << 8) ///< Bus clear finished
rename CELIX_FACILITY_NULL to CELIX_FACILITY_FRAMEWORK
@@ -89,7 +89,7 @@ const char* celix_strerror(celix_status_t status); * The facility of celix default error code * */ -#define CELIX_FACILITY_NULL 1 +#define CELIX_FACILITY_FRAMEWORK 1 /*! * The facility of the http suppoter error code @@ -141,26 +141,26 @@ const char* celix_strerror(celix_status_t status); /*! * Exception indicating a problem with a bundle */ -#define CELIX_BUNDLE_EXCEPTION CELIX_ERROR_MAKE(CELIX_FACILITY_NULL, 4465) +#define CELIX_BUNDLE_EXCEPTION CELIX_ERROR_MAKE(CELIX_FACILITY_FRAMEWORK, 4465) /*! * Invalid bundle context is used */ -#define CELIX_INVALID_BUNDLE_CONTEXT CELIX_ERROR_MAKE(CELIX_FACILITY_NULL, 4466) +#define CELIX_INVALID_BUNDLE_CONTEXT CELIX_ERROR_MAKE(CELIX_FACILITY_FRAMEWORK, 4466) /*! * Argument is not correct */ -#define CELIX_ILLEGAL_ARGUMENT CELIX_ERROR_MAKE(CELIX_FACILITY_NULL, 4467) -#define CELIX_INVALID_SYNTAX CELIX_ERROR_MAKE(CELIX_FACILITY_NULL, 4468) -#define CELIX_FRAMEWORK_SHUTDOWN CELIX_ERROR_MAKE(CELIX_FACILITY_NULL, 4469) -#define CELIX_ILLEGAL_STATE CELIX_ERROR_MAKE(CELIX_FACILITY_NULL, 4470) -#define CELIX_FRAMEWORK_EXCEPTION CELIX_ERROR_MAKE(CELIX_FACILITY_NULL, 4471) -#define CELIX_FILE_IO_EXCEPTION CELIX_ERROR_MAKE(CELIX_FACILITY_NULL, 4472) -#define CELIX_SERVICE_EXCEPTION CELIX_ERROR_MAKE(CELIX_FACILITY_NULL, 4473) +#define CELIX_ILLEGAL_ARGUMENT CELIX_ERROR_MAKE(CELIX_FACILITY_FRAMEWORK, 4467) +#define CELIX_INVALID_SYNTAX CELIX_ERROR_MAKE(CELIX_FACILITY_FRAMEWORK, 4468) +#define CELIX_FRAMEWORK_SHUTDOWN CELIX_ERROR_MAKE(CELIX_FACILITY_FRAMEWORK, 4469) +#define CELIX_ILLEGAL_STATE CELIX_ERROR_MAKE(CELIX_FACILITY_FRAMEWORK, 4470) +#define CELIX_FRAMEWORK_EXCEPTION CELIX_ERROR_MAKE(CELIX_FACILITY_FRAMEWORK, 4471) +#define CELIX_FILE_IO_EXCEPTION CELIX_ERROR_MAKE(CELIX_FACILITY_FRAMEWORK, 4472) +#define CELIX_SERVICE_EXCEPTION CELIX_ERROR_MAKE(CELIX_FACILITY_FRAMEWORK, 4473) /*! * Exception indicating a problem with a interceptor */ -#define CELIX_INTERCEPTOR_EXCEPTION CELIX_ERROR_MAKE(CELIX_FACILITY_NULL, 4474) +#define CELIX_INTERCEPTOR_EXCEPTION CELIX_ERROR_MAKE(CELIX_FACILITY_FRAMEWORK, 4474) /*! @} *///celix default error codes
zephyr test: hostevent console with invalid arguments Test the "hostevent" command with invalid arguments. BRANCH=none TEST=./twister -T zephyr/test/drivers Code-Coverage: Zoss
@@ -44,6 +44,22 @@ ZTEST_USER(console_cmd_hostevent, test_hostevent) "Failed default print"); } +/* hostevent with invalid arguments */ +ZTEST_USER(console_cmd_hostevent, test_hostevent_invalid) +{ + int rv; + + /* Test invalid sub-command */ + rv = shell_execute_cmd(get_ec_shell(), "hostevent invalid 0xFFFF"); + zassert_equal(rv, EC_ERROR_PARAM1, "Expected %d, but got %d", + EC_ERROR_PARAM1, rv); + + /* Test invalid mask */ + rv = shell_execute_cmd(get_ec_shell(), "hostevent set invalid-mask"); + zassert_equal(rv, EC_ERROR_PARAM2, "Expected %d, but got %d", + EC_ERROR_PARAM2, rv); +} + ZTEST_SUITE(console_cmd_hostevent, drivers_predicate_post_main, console_cmd_hostevent_setup, console_cmd_hostevent_before, console_cmd_hostevent_after, NULL);
POLLER -> POLLERR
@@ -418,7 +418,7 @@ static void janet_loop1(void) { for (int i = 0; i < janet_vm_loop_count;) { int revents = janet_vm_pollfds[i].revents; janet_vm_pollfds[i].revents = 0; - if ((janet_vm_pollfds[i].events | POLLHUP | POLLER) & revents) { + if ((janet_vm_pollfds[i].events | POLLHUP | POLLERR) & revents) { size_t delta = janet_loop_event(i); i += (int) delta; } else {
better lovrBufferIsTemporary;
@@ -456,7 +456,7 @@ Buffer* lovrBufferCreate(BufferInfo* info, void** data) { void lovrBufferDestroy(void* ref) { Buffer* buffer = ref; - if (buffer->pointer) return; + if (lovrBufferIsTemporary(buffer)) return; gpu_buffer_destroy(buffer->gpu); free(buffer); } @@ -466,7 +466,7 @@ const BufferInfo* lovrBufferGetInfo(Buffer* buffer) { } bool lovrBufferIsTemporary(Buffer* buffer) { - return !!buffer->pointer; + return buffer->pointer != NULL; } void* lovrBufferMap(Buffer* buffer, uint32_t offset, uint32_t size) { @@ -476,7 +476,7 @@ void* lovrBufferMap(Buffer* buffer, uint32_t offset, uint32_t size) { lovrCheck(offset + size <= buffer->size, "Buffer write range [%d,%d] exceeds buffer size", offset, offset + size); - if (buffer->pointer) { + if (lovrBufferIsTemporary(buffer)) { return buffer->pointer + offset; } @@ -491,7 +491,7 @@ void lovrBufferClear(Buffer* buffer, uint32_t offset, uint32_t size) { lovrCheck(size % 4 == 0, "Buffer clear size must be a multiple of 4"); lovrCheck(offset % 4 == 0, "Buffer clear offset must be a multiple of 4"); lovrCheck(offset + size <= buffer->size, "Tried to clear past the end of the Buffer"); - if (buffer->pointer) { + if (lovrBufferIsTemporary(buffer)) { memset(buffer->pointer + offset, 0, size); } else { gpu_stream* transfers = getTransfers(); @@ -1469,7 +1469,7 @@ void lovrPassSendBuffer(Pass* pass, const char* name, size_t length, uint32_t sl uint32_t limit; if (shader->storageMask & (1 << slot)) { - lovrCheck(!buffer->pointer, "Temporary buffers can not be sent to storage buffer variables", slot + 1); + lovrCheck(!lovrBufferIsTemporary(buffer), "Temporary buffers can not be sent to storage buffer variables", slot + 1); lovrCheck((offset & (state.limits.storageBufferAlign - 1)) == 0, "Storage buffer offset (%d) is not aligned to storageBufferAlign limit (%d)", offset, state.limits.storageBufferAlign); limit = state.limits.storageBufferRange; } else {
Update LogManagerImpl.cpp Append path separator if utility function returned us a path without trailing slash
@@ -119,7 +119,11 @@ namespace ARIASDK_NS_BEGIN { std::string tenantId = (const char *)m_logConfiguration[CFG_STR_PRIMARY_TOKEN]; tenantId = MAT::tenantTokenToId(tenantId); - + if (cacheFilePath.find(PATH_SEPARATOR_CHAR) == std::string::npos) + { + // append path separator if required + cacheFilePath += PATH_SEPARATOR_CHAR; + } cacheFilePath += tenantId; cacheFilePath += ".db"; }
Fix segfault with "xwayland false" Commit failed to consider the edge case where xwayland is disabled via the sway config. This leads to a SEGFAULT when setting the xwayland cursor since the xwayland server is not running.
@@ -751,10 +751,10 @@ void seat_configure_xcursor(struct sway_seat *seat) { } #if HAVE_XWAYLAND - if (!server.xwayland.xcursor_manager || + if (config->xwayland && (!server.xwayland.xcursor_manager || !xcursor_manager_is_named(server.xwayland.xcursor_manager, cursor_theme) || - server.xwayland.xcursor_manager->size != cursor_size) { + server.xwayland.xcursor_manager->size != cursor_size)) { wlr_xcursor_manager_destroy(server.xwayland.xcursor_manager);
Fix issue in logic expression. Both operands in a logic OR expression where the same.
@@ -722,7 +722,8 @@ static int _yr_scan_verify_re_match( if ((forward_matches == -1) && (STRING_IS_WIDE(ac_match->string) && - !(STRING_IS_BASE64_WIDE(ac_match->string) || STRING_IS_BASE64_WIDE(ac_match->string)))) + !(STRING_IS_BASE64(ac_match->string) || + STRING_IS_BASE64_WIDE(ac_match->string)))) { flags |= RE_FLAGS_WIDE; FAIL_ON_ERROR(exec(
bluetooth: Validate data, ptr[5] and ptr[6] after calloc
@@ -1003,6 +1003,8 @@ static int __bt_convert_string_to_uuid(const char *string, unsigned int val0, val4; unsigned short val1, val2, val3, val5; data = calloc(1, sizeof(char) * 16); + if (data == NULL) + return BT_ERROR_OUT_OF_MEMORY; /* UUID format : %08x-%04hx-%04hx-%04hx-%08x%04hx */ strncpy(str_ptr, string, 36); @@ -1017,6 +1019,9 @@ static int __bt_convert_string_to_uuid(const char *string, /* ptr[4] contain "08x" and "04hx" */ ptr[5] = calloc(1, sizeof(char) * 8); ptr[6] = calloc(1, sizeof(char) * 4); + if (ptr[5] == NULL || ptr[6] == NULL) + return BT_ERROR_OUT_OF_MEMORY; + strncpy(ptr[5], ptr[4], 8); strncpy(ptr[6], ptr[4] + 8, 4);
feat(fabric test case): add fabric test case "BoatHlfabricWalletInit_Fail_wallet_config_NULL"
@@ -875,6 +875,19 @@ START_TEST(test_001CreateWallet_0022BoatHlfabricWalletInit_SUCCESS) } END_TEST +START_TEST(test_001CreateWallet_0023BoatHlfabricWalletInit_Fail_wallet_config_NULL) +{ + BSINT32 rtnVal; + BSINT32 index; + BoatHlfabricWallet *g_fabric_wallet_ptr = NULL; + BoatHlfabricWalletConfig wallet_config = get_fabric_wallet_settings(); + + g_fabric_wallet_ptr = BoatHlfabricWalletInit(NULL, sizeof(wallet_config)); + ck_assert(g_fabric_wallet_ptr == NULL); + +} +END_TEST + Suite *make_wallet_suite(void) { /* Create Suite */ @@ -908,6 +921,7 @@ Suite *make_wallet_suite(void) tcase_add_test(tc_wallet_api, test_001CreateWallet_0020BoatWalletDelete_Fail_WalletName_NULL); tcase_add_test(tc_wallet_api, test_001CreateWallet_0021BoatWalletDelete_Fail_WalletName_ERR); tcase_add_test(tc_wallet_api, test_001CreateWallet_0022BoatHlfabricWalletInit_SUCCESS); + tcase_add_test(tc_wallet_api, test_001CreateWallet_0023BoatHlfabricWalletInit_Fail_wallet_config_NULL); return s_wallet; }
naive: handle malformed data in transfer-point
['breach' bo] == :: + ++ address-transfer + |= params=(map @t json) + ^- (unit [@ux ?]) + ?~ data=(~(get by params) 'data') ~ + =; ans=(unit [add=(unit @ux) r=?]) + ?~ ans ~ + ?~ add.u.ans ~ + (some [u.add.u.ans r.u.ans]) + %. u.data + =, dejs-soft:format + %- ot + ~[['address' (cu to-hex so)] ['reset' bo]] + :: ++ address-ship |= params=(map @t json) ^- (unit [@ux ship]) [~ ~(params error id)] =/ sig=(unit @) (sig:extract params) =/ from=(unit [ship @t]) (from:extract params) - =/ data=(unit [@ux ?]) - ?~ data=(~(get by params) 'data') ~ - =; [add=(unit @ux) r=?] - ?~ add ~ - (some [u.add r]) - %. u.data - =, dejs:format - %- ot - ~[['address' (cu to-hex so)] ['reset' bo]] + =/ data=(unit [@ux ?]) (address-transfer:extract params) ?: |(?=(~ sig) ?=(~ from) ?=(~ data)) [~ ~(parse error id)] :_ [%result id s+'ok']
Speed up incr/decr by replacing snprintf. Uses fast itoa_u64 function instead. Fixes
@@ -4363,7 +4363,7 @@ enum delta_result_type do_add_delta(conn *c, const char *key, const size_t nkey, } pthread_mutex_unlock(&c->thread->stats.mutex); - snprintf(buf, INCR_MAX_STORAGE_LEN, "%llu", (unsigned long long)value); + itoa_u64(value, buf); res = strlen(buf); /* refcount == 2 means we are the only ones holding the item, and it is * linked. We hold the item's lock in this function, so refcount cannot
Shorten generated file name to _provides.cpp to support Windows.
@@ -6,6 +6,7 @@ SRCDIR= YMAKE=ymake ECHO=echo INCLUDE_EXTS=.h .hh .hpp .rli .cuh .inc .i +CPP_EXT=.cpp OBJ_SUF= CFLAGS= @@ -2128,8 +2129,8 @@ macro FLAT_JOIN_SRCS_GLOBAL(Out, Src...) { ### Specifies provided features. The names must be C identifiers. Different ### libraries providing the same features can not be linked into one program. macro PROVIDES(Name...) { - .CMD=$YMAKE_PYTHON ${input:"build/scripts/provides.py"} ${output;noauto;pre=provides-;suf=.cpp:REALPRJNAME} $Name ${kv;hide:"p PS"} ${kv;hide:"pc cyan"} - SRCS(GLOBAL ${pre=provides-;suf=.cpp:REALPRJNAME}) + .CMD=$YMAKE_PYTHON ${input:"build/scripts/provides.py"} ${output;noauto;pre=_provides:CPP_EXT} $Name ${kv;hide:"p PS"} ${kv;hide:"pc cyan"} + SRCS(GLOBAL ${pre=_provides:CPP_EXT}) } SSE2_CFLAGS=
fix issue of deadlock detector
@@ -49,7 +49,7 @@ extern void test_deadlock(void); #define XDAG_MUTEX_LOCK(x) \ do {\ apply_lock_before(pthread_self(), &x, #x);\ - pthread_mutex_trylock(&x);\ + pthread_mutex_lock(&x);\ apply_lock_after(pthread_self(), &x);\ } while(0)
Remove useless if in memContextFree(). If the upper bound of the loop is 0 then nothing will be done, making the if condition extraneous.
@@ -802,7 +802,6 @@ memContextFree(MemContext *this) THROW(AssertError, "cannot free inactive context"); // Free child contexts - if (this->contextChildListSize > 0) for (unsigned int contextIdx = 0; contextIdx < this->contextChildListSize; contextIdx++) if (this->contextChildList[contextIdx] && this->contextChildList[contextIdx]->state == memContextStateActive) memContextFree(this->contextChildList[contextIdx]);
phb4: Fix lost bit in PE number on config accesses A PE number can be up to 9 bits, using a uint8_t won't fly.. That was causing error on config accesses to freeze the wrong PE.
@@ -257,7 +257,7 @@ static inline void phb4_ioda_sel(struct phb4 *p, uint32_t table, */ static int64_t phb4_pcicfg_check(struct phb4 *p, uint32_t bdfn, uint32_t offset, uint32_t size, - uint8_t *pe) + uint16_t *pe) { uint32_t sm = size - 1; @@ -437,7 +437,7 @@ static int64_t phb4_pcicfg_read(struct phb4 *p, uint32_t bdfn, { uint64_t addr, val64; int64_t rc; - uint8_t pe; + uint16_t pe; bool use_asb = false; rc = phb4_pcicfg_check(p, bdfn, offset, size, &pe); @@ -530,7 +530,7 @@ static int64_t phb4_pcicfg_write(struct phb4 *p, uint32_t bdfn, { uint64_t addr; int64_t rc; - uint8_t pe; + uint16_t pe; bool use_asb = false; rc = phb4_pcicfg_check(p, bdfn, offset, size, &pe);
arch/arm/src/lc823450/lc823450_i2c.c: Remove extra rounding after MSEC2TIC change to round up
@@ -305,7 +305,7 @@ lc823450_i2c_sem_waitdone(struct lc823450_i2c_priv_s *priv) /* Get the timeout value */ - timeout = MSEC2TICK(priv->timeoms + (MSEC_PER_TICK / 2)); + timeout = MSEC2TICK(priv->timeoms); timeout += SEC2TICK(CONFIG_LC823450_I2C_TIMEOSEC); /* Signal the interrupt handler that we are waiting. NOTE: Interrupts
HV: add px cx data of bxt n3350 SOC The cpu model name of "Intel(R) Celeron(R) CPU N3350 @ 1.10GHz" is used in APL UP2 board, which is in Acrn official support list. Acked-by: Eddie Dong
@@ -64,6 +64,15 @@ static const struct cpu_px_data px_j3455[] = { {0x320UL, 0UL, 0xAUL, 0xAUL, 0x0800UL, 0x0800UL} /* P8 */ }; +/* The table includes cpu px info of Intel N3350 SoC */ +static const struct cpu_px_data px_n3350[] = { + {0x44DUL, 0UL, 0xAUL, 0xAUL, 0x1800UL, 0x1800UL}, /* P0 */ + {0x44CUL, 0UL, 0xAUL, 0xAUL, 0x0B00UL, 0x0B00UL}, /* P1 */ + {0x3E8UL, 0UL, 0xAUL, 0xAUL, 0x0A00UL, 0x0A00UL}, /* P2 */ + {0x384UL, 0UL, 0xAUL, 0xAUL, 0x0900UL, 0x0900UL}, /* P3 */ + {0x320UL, 0UL, 0xAUL, 0xAUL, 0x0800UL, 0x0800UL} /* P4 */ +}; + /* The table includes cpu cx info of Intel J3455 SoC */ static const struct cpu_cx_data cx_j3455[] = { {{SPACE_FFixedHW, 0x1U, 0x2U, 0x1U, 0x01UL}, 0x1U, 0x1U, 0x3E8UL}, /* C1 */ @@ -86,6 +95,10 @@ static const struct cpu_state_table { {"Intel(R) Celeron(R) CPU J3455 @ 1.50GHz", {(uint8_t)ARRAY_SIZE(px_j3455), px_j3455, (uint8_t)ARRAY_SIZE(cx_j3455), cx_j3455} + }, + {"Intel(R) Celeron(R) CPU N3350 @ 1.10GHz", + {(uint8_t)ARRAY_SIZE(px_n3350), px_n3350, + (uint8_t)ARRAY_SIZE(cx_a3960), cx_a3960} /* Cx is same as A3960 */ } };
links: pass contact metadata to link items
@@ -71,10 +71,10 @@ export const LinkList = (props) => { </div> { Array.from(props.graph).map(([date, node]) => { const { nickname, color, avatar } = - getContactDetails(props.contacts[ship]); - + getContactDetails(props.contacts[node?.post?.author]); return ( <LinkItem + key={date} resource={resource} node={node} nickname={nickname}
Fix UEFI defect in which transport and payload size flags persist across CLI invocations (works as expected for Windows/Linux)
@@ -119,9 +119,7 @@ static EFI_STATUS showVersion(struct Command *pCmd); static EFI_STATUS GetPbrMode(UINT32 *Mode); static EFI_STATUS SetPbrTag(CHAR16 *pName, CHAR16 *pDescription); static EFI_STATUS ResetPbrSession(UINT32 TagId); -#ifdef OS_BUILD static EFI_STATUS SetDefaultProtocolAndPayloadSizeOptions(); -#endif /** Supported commands @@ -233,12 +231,10 @@ UefiMain( #endif #endif -#ifdef OS_BUILD Rc = SetDefaultProtocolAndPayloadSizeOptions(); if (EFI_ERROR(Rc)) { goto Finish; } -#endif NVDIMM_ENTRY(); Index = 0; @@ -1039,16 +1035,23 @@ Finish: return ReturnCode; } -#ifdef OS_BUILD EFI_STATUS SetDefaultProtocolAndPayloadSizeOptions() { EFI_STATUS ReturnCode = EFI_INVALID_PARAMETER; EFI_DCPMM_CONFIG2_PROTOCOL *pNvmDimmConfigProtocol = NULL; EFI_DCPMM_CONFIG_TRANSPORT_ATTRIBS pAttribs; +#ifdef OS_BUILD + BOOLEAN IsSmBusProtocolEnabled = ConfigIsDdrtProtocolDisabled(); + BOOLEAN IsSmallPayloadEnabled = ConfigIsLargePayloadDisabled(); +#else + BOOLEAN IsSmBusProtocolEnabled = FALSE; + BOOLEAN IsSmallPayloadEnabled = TRUE; +#endif // OS_BUILD + ReturnCode = OpenNvmDimmProtocol(gNvmDimmConfigProtocolGuid, (VOID **)&pNvmDimmConfigProtocol, NULL); - if (ConfigIsDdrtProtocolDisabled()) { + if (IsSmBusProtocolEnabled) { pAttribs.Protocol = FisTransportSmbus; pAttribs.PayloadSize = FisTransportSmallMb; } @@ -1056,7 +1059,7 @@ EFI_STATUS SetDefaultProtocolAndPayloadSizeOptions() pAttribs.Protocol = FisTransportDdrt; } - if (ConfigIsLargePayloadDisabled()) { + if (IsSmallPayloadEnabled) { pAttribs.PayloadSize = FisTransportSmallMb; } else { @@ -1067,4 +1070,3 @@ EFI_STATUS SetDefaultProtocolAndPayloadSizeOptions() return ReturnCode; } -#endif
Update Sydr config We renamed `merge` to `cmin` in Sydr 1.8.0. Moreover, libFuzzer `-jobs=1000 -workers=$(FUZZ_JOBS)` asks fuzzer to find 1000 crashes/ooms/timeouts in `FUZZ_JOBS` fuzzing processes.
@@ -287,8 +287,8 @@ sydr-fuzz: $(PROJECT).sydr$(SUFFIX) $(PROJECT)$(SUFFIX) FORCE [libfuzzer] path = "$(PROJECT)$(SUFFIX)" - args = "-jobs=$(FUZZ_JOBS) -workers=$(FUZZ_JOBS) -rss_limit_mb=$(FUZZ_MEM) $(FUZZ_DIR)" - merge = false + args = "-jobs=1000 -workers=$(FUZZ_JOBS) -rss_limit_mb=$(FUZZ_MEM) $(FUZZ_DIR)" + cmin = false EOF UBSAN_OPTIONS='halt_on_error=1' sydr-fuzz -l debug run -f
arm: fix backtrace busyloop
@@ -52,14 +52,13 @@ static int backtrace(uintptr_t *base, uintptr_t *limit, if (pc) { - i++; if ((*skip)-- <= 0) { - *buffer++ = pc; + buffer[i++] = pc; } } - for (; i < size; fp = (uintptr_t *)*(fp - 1), i++) + for (; i < size; fp = (uintptr_t *)*(fp - 1)) { if (fp > limit || fp < base || *fp == 0) { @@ -68,7 +67,7 @@ static int backtrace(uintptr_t *base, uintptr_t *limit, if ((*skip)-- <= 0) { - *buffer++ = (void *)*fp; + buffer[i++] = (void *)*fp; } }
test-suite: fix stdout summary alignment for metis test
@@ -52,7 +52,7 @@ echo echo '-------------------------------------------------- SUMMARY --------------------------------------------------' echo echo Package version............... : $PACKAGE-$VERSION -echo OHPC compiler toolchain........ : $LMOD_FAMILY_COMPILER +echo OHPC compiler toolchain....... : $LMOD_FAMILY_COMPILER echo echo C compiler.................... : `which $CC` echo C compiler flags.............. : $CFLAGS
wpa_supplicant: try install gtk before send 2 of 2
@@ -1625,20 +1625,7 @@ static void wpa_supplicant_process_1_of_2(struct wpa_sm *sm, wpa_sm_set_seq(sm, key, 0); sm->key_info=key_info; - if (wpa_supplicant_send_2_of_2(sm, key, ver, key_info)) - goto failed; - - return; - -failed: - wpa_sm_deauthenticate(sm, WLAN_REASON_UNSPECIFIED); -} - -static int wpa_supplicant_send_2_of_2_txcallback(struct wpa_sm *sm) -{ - u16 key_info=sm->key_info; - u16 rekey= (WPA_SM_STATE(sm) == WPA_COMPLETED); - + /*install gtk before send 2 of 2*/ if((sm->gd).gtk_len) { if (wpa_supplicant_install_gtk(sm, &(sm->gd))) goto failed; @@ -1646,7 +1633,10 @@ static int wpa_supplicant_send_2_of_2_txcallback(struct wpa_sm *sm) goto failed; } - if (rekey) { + if (wpa_supplicant_send_2_of_2(sm, key, ver, key_info)) + goto failed; + + if ((WPA_SM_STATE(sm) == WPA_COMPLETED)) { #ifdef MSG_PRINT wpa_printf(MSG_DEBUG, "WPA: Group rekeying " "completed with " MACSTR " [GTK=%s]", @@ -1654,13 +1644,15 @@ static int wpa_supplicant_send_2_of_2_txcallback(struct wpa_sm *sm) #endif wpa_sm_cancel_auth_timeout(sm); wpa_sm_set_state(WPA_COMPLETED); - } else + } else { wpa_supplicant_key_neg_complete(sm, sm->bssid, - key_info &WPA_KEY_INFO_SECURE); - return 0; + sm->key_info &WPA_KEY_INFO_SECURE); + } + + return; failed: - return WLAN_REASON_UNSPECIFIED; + wpa_sm_deauthenticate(sm, WLAN_REASON_UNSPECIFIED); } static int wpa_supplicant_verify_eapol_key_mic(struct wpa_sm *sm, @@ -2606,7 +2598,6 @@ void eapol_txcb(void *eb) case WPA_GROUP_HANDSHAKE: if (sm->txcb_flags & WPA_GROUP_HANDSHAKE_BIT) { sm->txcb_flags &= ~WPA_GROUP_HANDSHAKE_BIT; - isdeauth = wpa_supplicant_send_2_of_2_txcallback(sm); } else { wpa_printf(MSG_DEBUG, "2/2 txcb, flags=%d\n", sm->txcb_flags); }
Fix cmake build issue This is due to a cmake oddity: when CONFIGURE_COMMAND is not set, `ExternalProject_Add` defaults to running cmake with no arguments.
@@ -575,9 +575,10 @@ ENDIF () IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/misc/h2get/CMakeLists.txt) ExternalProject_Add(h2get + CONFIGURE_COMMAND cmake -DH2GET_SSL_ROOT_DIR=${H2GET_SSL_ROOT_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/misc/h2get SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/misc/h2get BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/h2get_bin - BUILD_COMMAND cmake -DH2GET_SSL_ROOT_DIR=${H2GET_SSL_ROOT_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/misc/h2get && make + BUILD_COMMAND make INSTALL_COMMAND true) SET_TARGET_PROPERTIES(h2get PROPERTIES EXCLUDE_FROM_ALL TRUE) IF (WITH_BUNDLED_SSL)
Minor adjustments to common prefix code updated in
@@ -233,17 +233,17 @@ regExpPrefix(const String *expression) // Will there be any characters in the prefix? if (expressionIdx > 1) { - // Search again and make sure there is not another begin anchor. If so we won't be able to use the prefix + // Search the rest of the string for another begin anchor unsigned int anchorIdx = expressionIdx; - for (anchorIdx = 1; anchorIdx < expressionSize; anchorIdx++) + for (; anchorIdx < expressionSize; anchorIdx++) { // [^ and \^ are not begin anchors if (expressionZ[anchorIdx] == '^' && expressionZ[anchorIdx - 1] != '[' && expressionZ[anchorIdx - 1] != '\\') break; } - // If another begin anchor was not found then return the prefix + // If no other begin anchor was found then the prefix is usable if (anchorIdx == expressionSize) result = strSubN(expression, 1, expressionIdx - 1); }
Using 'all' as default target in Makefile.
@@ -21,11 +21,11 @@ NXT_EXEC_LINK = $NXT_EXEC_LINK $NXT_LD_OPT NXT_SHARED_LOCAL_LINK = $NXT_SHARED_LOCAL_LINK $NXT_LD_OPT NXT_MODULE_LINK = $NXT_MODULE_LINK +all: $NXT_DAEMON + .PHONY: $NXT_DAEMON $NXT_DAEMON: $NXT_BUILD_DIR/$NXT_DAEMON -all: $NXT_DAEMON - END
[UEFI] Enable CPU caching
@@ -119,6 +119,33 @@ typedef union { efi_physical_address_t phys_addr; } pte_t; +/* + * Control-register utility functions + */ + +static uintptr_t _get_cr0() { + uintptr_t cr0; + asm volatile("movq %%cr0, %0" : "=r"(cr0)); + return cr0; +} + +static void _set_cr0(uintptr_t cr0) { + asm volatile("mov %0, %%cr0" : : "r"(cr0)); +} + +static void _set_cpu_caching_enabled(bool enabled) { + uintptr_t cr0 = _get_cr0(); + if (enabled) { + cr0 &= ~(1 << 30); // Ensure cache disable bit isn't set + cr0 |= (1 << 29); // Enable not-write-through + } + else { + cr0 |= (1 << 30); // Enable cache disable bit + cr0 &= ~(1 << 29); // Disable not-write-through + } + _set_cr0(cr0); +} + uint64_t map_region_1gb_pages(pml4e_t* page_mapping_level4, uint64_t vmem_start, uint64_t vmem_size, uint64_t phys_start) { //printf("map_region_1gb_pages [phys 0x%p - 0x%p] to [virt 0x%p - 0x%p]\n", phys_start, phys_start + vmem_size - 1, vmem_start, vmem_start + vmem_size - 1); // TODO(PT): Should remaining size be padded to the nearest GB? @@ -314,6 +341,9 @@ Remove */ pml4e_t* map2(void) { + // First, ensure CPU caching is enabled + _set_cpu_caching_enabled(true); + efi_physical_address_t page_mapping_level4_addr = 0; efi_status_t status = BS->AllocatePages(AllocateAnyPages, EFI_PAL_CODE, 1, &page_mapping_level4_addr); if (EFI_ERROR(status)) {
dsp.h: fix -Wundef w/__mips_dsp_rev
@@ -93,7 +93,7 @@ extern "C" { #define WEBP_USE_MIPS32 #if (__mips_isa_rev >= 2) #define WEBP_USE_MIPS32_R2 -#if defined(__mips_dspr2) || (__mips_dsp_rev >= 2) +#if defined(__mips_dspr2) || (defined(__mips_dsp_rev) && __mips_dsp_rev >= 2) #define WEBP_USE_MIPS_DSP_R2 #endif #endif
Moved the restarting of the request timer outside of if-else clause. The conditions being checked for will now only log and the timer will be restarted regardless. Also updated the comment to explain why the timer is restarted regardless if the Get Stream Request message is published successfully or not.
@@ -1257,17 +1257,25 @@ static OTA_Err_t prvPublishGetStreamMessage( OTA_FileContext_t * C ) if( eResult != IOT_MQTT_SUCCESS ) { + /* Don't return an error. Let max momentum catch it since this may be intermittent. */ OTA_LOG_L1( "[%s] Failed: %s\r\n", OTA_METHOD_NAME, pcTopicBuffer ); - /* Don't return an error. Let max momentum catch it since this may be intermittent. - Restart the timer so that we will come back through here and try again */ - prvStartRequestTimer( C ); } else { OTA_LOG_L1( "[%s] OK: %s\r\n", OTA_METHOD_NAME, pcTopicBuffer ); - /* Restart the request timer to retry if we don't complete the update. */ - prvStartRequestTimer( C ); } + /* Restart the timer regardless if we published the Get Stream Request message + or not. + + If we published the message, then the timer will be used to time + out the OTA not continuing again. + + If we failed to publish the message, then + the timer will be used to retry publishing the message again later. + + In both cases the max momentum, if reached, will be used to stop publishing + the Get Stream Request message. */ + prvStartRequestTimer( C ); } else {
[Bender] Make sure Bender is correct
@@ -7,11 +7,11 @@ package: dependencies: axi: { git: "https://github.com/pulp-platform/axi.git", version: 0.27.1 } - common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.19.0 } - tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.1 } - cluster_interconnect: { git: "https://github.com/pulp-platform/cluster_interconnect.git", rev: dev } - snitch: { git: "[email protected]:mempool/snitch.git", rev: mempool } + cluster_interconnect: { git: "https://github.com/pulp-platform/cluster_interconnect.git", version: 1.2.0 } + common_cells: { git: "https://github.com/pulp-platform/common_cells.git", version: 1.20.0 } register_interface: { git: "https://github.com/pulp-platform/register_interface.git", version: 0.2.0 } + snitch: { path: "hardware/deps/snitch" } + tech_cells_generic: { git: "https://github.com/pulp-platform/tech_cells_generic.git", version: 0.2.1 } workspace: checkout_dir: "./hardware/deps"
Fix testing on Windows 10 Running chkdsk on Windows 8 or 10 can cause drive caching to enter a bad state. This patch adds a workaround for this by re-running chkdsk until the drive is in a good state again.
@@ -176,6 +176,16 @@ def _compute_crc(hex_file_path): return data_crc32, embedded_crc32 +def _run_chkdsk(drive): + args = ["chkdsk", drive] + process = subprocess.Popen(args, stdin=subprocess.PIPE, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + process.communicate(input='n\r\n') # Answer no if prompted + process.wait() + return process.returncode + + class AssertInfo(object): def __init__(self, file_name, line_number): @@ -360,15 +370,38 @@ class DaplinkBoard(object): """Check if the raw filesystem is valid""" if sys.platform.startswith("win"): test_info = parent_test.create_subtest('test_fs') - args = ["chkdsk", self.mount_point] - process = subprocess.Popen(args, stdin=subprocess.PIPE, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - process.communicate(input='n\r\n') # Answer no if prompted - process.wait() - test_info.info('chkdsk returned %s' % process.returncode) - if process.returncode != 0: + returncode = _run_chkdsk(self.mount_point) + test_info.info('chkdsk returned %s' % returncode) + if returncode != 0: test_info.failure('Disk corrupt') + + # Windows 8/10 workaround - rerun chkdsk until disk caching is on + # Notes about this problem: + # - This is less likely to occur when the "storage" service is + # turned off and/or you are running as administrator + # - When creating a directory with os.mkdir the + # following error occurs: "WindowsError: [Error 1392] The + # file or directory is corrupted and unreadable: '<directory>'" + # - When creating a file with open(<filename>, "wb") the + # following error occurs: "OError: [Errno 22] invalid + # mode ('wb') or filename: '<filename>'" + # - When a file or directory is created on the drive in explorer + # and you preform a refresh, the newly created file or + # directory disappears + persist_test_dir = self.get_file_path("persist_test_dir") + for _ in range(10): + try: + os.mkdir(persist_test_dir) + except EnvironmentError as exception: + test_info.info("cache check exception %s" % exception) + if os.path.exists(persist_test_dir): + os.rmdir(persist_test_dir) + break + test_info.info("running checkdisk to re-enable caching") + _run_chkdsk(self.mount_point) + else: + raise Exception("Unable to re-enable caching") + # TODO - as a future improvement add linux and mac support # Tests for the following: