Skip to content

Commit

Permalink
tests: fast_pair: Ensure reset in progress flag is deleted
Browse files Browse the repository at this point in the history
Change ensures that reset in progress flag is deleted during the Fast
Pair factory reset operation.

Jira: NCSDK-20219

Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
  • Loading branch information
MarekPieta authored and rlubos committed Jul 5, 2023
1 parent dbfb511 commit b5635a6
Showing 1 changed file with 0 additions and 29 deletions.
29 changes: 0 additions & 29 deletions tests/subsys/bluetooth/fast_pair/storage/factory_reset/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,35 +182,6 @@ static int fp_settings_data_validate_empty_cb(const char *key, size_t len, setti
return 0;
}

if (!strncmp(key, SETTINGS_RESET_IN_PROGRESS_FULL_NAME,
sizeof(SETTINGS_RESET_IN_PROGRESS_FULL_NAME))) {
int rc;
bool reset_in_progress;

if (len != sizeof(reset_in_progress)) {
*err = -EINVAL;
return *err;
}

rc = read_cb(cb_arg, &reset_in_progress, len);
if (rc < 0) {
*err = rc;
return *err;
}

if (rc != len) {
*err = -EINVAL;
return *err;
}

if (reset_in_progress) {
*err = -EFAULT;
return *err;
}

return 0;
}

*err = -EFAULT;
return *err;
}
Expand Down

0 comments on commit b5635a6

Please sign in to comment.